JPH0830439A - Method for performing double-precision multiplication and arithmetic unit - Google Patents

Method for performing double-precision multiplication and arithmetic unit

Info

Publication number
JPH0830439A
JPH0830439A JP6167577A JP16757794A JPH0830439A JP H0830439 A JPH0830439 A JP H0830439A JP 6167577 A JP6167577 A JP 6167577A JP 16757794 A JP16757794 A JP 16757794A JP H0830439 A JPH0830439 A JP H0830439A
Authority
JP
Japan
Prior art keywords
multiplier
multiplication
word
multiplicand
latch
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
JP6167577A
Other languages
Japanese (ja)
Other versions
JP3096574B2 (en
Inventor
Hideyuki Kabuo
英之 蕪尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP06167577A priority Critical patent/JP3096574B2/en
Publication of JPH0830439A publication Critical patent/JPH0830439A/en
Application granted granted Critical
Publication of JP3096574B2 publication Critical patent/JP3096574B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • G06F7/53Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel
    • G06F7/5324Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel partitioned, i.e. using repetitively a smaller parallel parallel multiplier or using an array of such smaller multipliers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • G06F7/533Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even
    • G06F7/5334Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even by using multiple bit scanning, i.e. by decoding groups of successive multiplier bits in order to select an appropriate precalculated multiple of the multiplicand as a partial product
    • G06F7/5336Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even by using multiple bit scanning, i.e. by decoding groups of successive multiplier bits in order to select an appropriate precalculated multiple of the multiplicand as a partial product overlapped, i.e. with successive bitgroups sharing one or more bits being recoded into signed digit representation, e.g. using the Modified Booth Algorithm
    • G06F7/5338Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even by using multiple bit scanning, i.e. by decoding groups of successive multiplier bits in order to select an appropriate precalculated multiple of the multiplicand as a partial product overlapped, i.e. with successive bitgroups sharing one or more bits being recoded into signed digit representation, e.g. using the Modified Booth Algorithm each bitgroup having two new bits, e.g. 2nd order MBA

Abstract

PURPOSE:To obtain the result of accurate multiplication between signed binary numbers of double precision by a single-precision multiplier. CONSTITUTION:The high-order and low-order words of a multiplicand X are denoted as XH and XL and the high-order and low-order words of a multiplier Y are denoted as YH and YL; and the products XLXYL, XLXYH, XHXYL, and XHXYH are found in order and added while the places are matched with one another. A multiplicand latch R1 and a multiplier latch Rs of one-word length, a multiplier MSB latch R3 for holding the MOSB of the YL, and a recoding part 11 which applies a the 2-bit Boothis method to the recoding of the multiplier are provided. The recoding part 11 is supplied with '0' for the recording of the low-order two bits of the YL in cases of XLXYL and XHXYL and with the output of the multiplier MSB latch R3 for the recoding of the low-order two bits of the YH in cases of XLXYH and XHXYH. A multiplication processing part 12 for the generation and addition of partial products processes the XL as an unsined binary number and the XH as a binary number in complement notation of 2 respectively according to a muliplicand polarity inversion signal C2.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、倍精度乗算を実行する
方法及び演算装置に関し、特に単精度乗算器を用いた倍
精度乗算の実行に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an arithmetic unit for executing double precision multiplication, and more particularly to execution of double precision multiplication using a single precision multiplier.

【0002】[0002]

【従来の技術】近年、通信分野や画像処理分野における
高速かつ大量のデータを対象としたデジタル信号処理を
行なうためのハードウェアの1つとして、高速なデジタ
ル・シグナル・プロセッサ(DSP)の開発が進んでい
る。特にDSPでは、乗算命令、積和演算命令等の乗算
系命令を高速に実行できることが要求される。
2. Description of the Related Art In recent years, development of a high-speed digital signal processor (DSP) has been developed as one of hardware for performing high-speed and large-volume digital signal processing in the fields of communication and image processing. It is progressing. In particular, a DSP is required to be able to execute multiplication-related instructions such as multiplication instructions and product-sum operation instructions at high speed.

【0003】高木直史ほか「冗長2進加算木を用いたV
LSI向き高速乗算器」(電子通信学会論文誌Vol.
J66−D No.6 1983年6月 pp.683
−690)には、内部計算に冗長2進表現を利用した並
列乗算器が提案されている。通常の2進表現によれば、
各桁は0又は1の値を持つ。これに対し、冗長2進表現
では符号付きの桁(SD:Signed Digit)が採用され、
各桁は−1,0又は1の値を持つ。この冗長2進表現
は、基数2のSD表現であって、2進SD表現とも呼ば
れる。部分積の個数を低減するためには、2ビットのブ
ース(Booth )の方法を利用して、基数4のSD表現す
なわち4進SD表現を乗数の内部表現に採用する。4進
SD表現では、各桁は−2,−1,0,1又は2の値を
持つ。
Naoki Takagi et al. "V using a redundant binary addition tree"
High-speed Multiplier for LSI "(Journal of the Institute of Electronics and Communication Engineers, Vol.
J66-D No. 6 June 1983 pp. 683
-690), a parallel multiplier using a redundant binary representation for internal calculation is proposed. According to the usual binary representation,
Each digit has a value of 0 or 1. On the other hand, in redundant binary representation, a digit with a sign (SD: Signed Digit) is adopted,
Each digit has a value of -1, 0 or 1. This redundant binary representation is a radix-2 SD representation and is also called a binary SD representation. In order to reduce the number of partial products, the radix-4 SD expression, that is, the quaternary SD expression is adopted as the internal expression of the multiplier by utilizing the 2-bit Booth method. In the quaternary SD representation, each digit has a value of -2, -1, 0, 1 or 2.

【0004】高木らの並列乗算器は、乗数リコード回路
と、部分積加算木と、冗長2進数/2進数変換回路とを
備えている。部分積加算木は、部分積生成回路及び冗長
2進数加算回路により構成される。この乗算器によれ
ば、各々2の補数表示の2進表現がなされた被乗数と乗
数との乗算を実行する場合、乗数である2の補数表示の
2進数は、乗数リコード回路により表1の規則に従って
4進SD数にリコードされる。そして、被乗数と乗数リ
コード結果から、部分積生成回路により冗長2進表現の
部分積が生成される。この際、4進SD表現がなされた
乗数の各桁毎に1つの部分積が生成されるので、部分積
の個数は2進表現の場合の半分になる。しかも、冗長2
進数加算回路では冗長性のゆえ桁上げ伝搬が抑制される
ので、乗算結果が高速に求められる。部分積加算木の出
力(冗長2進表現の積)は、冗長2進数/2進数変換回
路により2の補数表示の2進表現に変換される。
The parallel multiplier of Takagi et al. Comprises a multiplier recoding circuit, a partial product addition tree, and a redundant binary number / binary number converting circuit. The partial product addition tree is composed of a partial product generation circuit and a redundant binary number addition circuit. According to this multiplier, when the multiplication of the multiplicand and the multiplier, each of which is represented in binary of 2's complement, is performed, the binary number in 2's complement notation, which is a multiplier, is calculated by the multiplier recoding circuit according to the rule of Table 1. Is recoded into a quaternary SD number. Then, the partial product generation circuit generates a partial product of redundant binary representation from the multiplicand and the result of the multiplicand recoding. At this time, since one partial product is generated for each digit of the multiplier expressed in the quaternary SD representation, the number of partial products is half that in the binary representation. Moreover, redundancy 2
Since the carry propagation is suppressed due to the redundancy in the decimal addition circuit, the multiplication result can be obtained at high speed. The output of the partial product addition tree (the product of the redundant binary representation) is converted into a binary representation of 2's complement by a redundant binary number / binary number conversion circuit.

【0005】[0005]

【表1】 [Table 1]

【0006】従来、倍精度乗算の実行に単精度乗算器を
用いることがあった。倍精度乗算器は、単精度乗算器に
比べて回路規模が大きい。そこで、ハードウェアコス
ト、チップ上に占める面積、消費電力、倍精度乗算の実
行頻度等を考慮して、単一の単精度乗算器を繰り返し使
用することで倍精度乗算の結果を得るようにしていたの
である。
Conventionally, a single precision multiplier is sometimes used to execute double precision multiplication. The double-precision multiplier has a larger circuit scale than the single-precision multiplier. Therefore, considering the hardware cost, the area occupied on the chip, the power consumption, the execution frequency of double-precision multiplication, etc., the single-precision multiplier is repeatedly used to obtain the result of double-precision multiplication. It was.

【0007】図4は、単一の単精度乗算器を用いた従来
の倍精度乗算実行方法を示している。各々2の補数表示
の2進表現がなされた倍精度被乗数Xと倍精度乗数Yと
の乗算を実行する。被乗数X及び乗数Yは、いずれも2
ワード長の固定小数点数である。被乗数Xは上位ワード
XH と下位ワードXL とで構成され、乗数Yは上位ワー
ドYH と下位ワードYL とで構成される。1ワードは、
n桁(nは偶数、例えば16)で構成される。積X×Y
は、4つの積XL ×YL 、XL ×YH 、XH ×YL 及び
XH ×YH の桁合わせ加算により求められる。
FIG. 4 shows a conventional double-precision multiplication execution method using a single single-precision multiplier. The multiplication of the double precision multiplicand X and the double precision multiplier Y, which are each represented by the binary representation of 2's complement, is executed. The multiplicand X and the multiplier Y are both 2
It is a fixed-point number of word length. The multiplicand X is composed of the upper word XH and the lower word XL, and the multiplier Y is composed of the upper word YH and the lower word YL. 1 word is
It is composed of n digits (n is an even number, for example, 16). Product X × Y
Is obtained by digit-matching addition of four products XL × YL, XL × YH, XH × YL and XH × YH.

【0008】さて、被乗数下位ワードXL は、符号なし
2進数であり、最上位ビット(MSB)が符号を表わす
2の補数表示の2進数とは違って、全てのビットが有効
桁として扱われるべきものである。乗数下位ワードYL
もまた、符号なし2進数である。ところが、従来の乗算
器は与えられた被乗数及び乗数を各々2の補数表示の2
進数として扱う結果、MSBが1である被乗数下位ワー
ドXL をそのまま乗算器に入力したり、MSBが1であ
る乗数下位ワードYL をそのまま乗算器に入力したりす
ると、正しい積が得られない。
Now, the multiplicand lower word XL is an unsigned binary number, and unlike the binary number of 2's complement notation in which the most significant bit (MSB) represents the sign, all bits should be treated as significant digits. It is a thing. Multiplier lower word YL
Is also an unsigned binary number. However, in the conventional multiplier, the given multiplicand and multiplier are each represented by the two's complement of two.
As a result of treating it as a base number, if the multiplicand lower word XL having MSB of 1 is input as it is to the multiplier or the multiplier lower word YL having MSB of 1 is input as it is to the multiplier, a correct product cannot be obtained.

【0009】そこで、従来は、図4に示すように、誤演
算を回避するためにやむを得ず、被乗数下位ワードXL
及び乗数下位ワードYL の各々の最下位ビット(LS
B)を捨てていた。具体的に説明すると、被乗数下位ワ
ードXL に1桁右シフト処理を施す。この際、被乗数下
位ワードXL のMSBは0に設定され、そのLSBは捨
てられる。このようにして得られた新たな被乗数下位ワ
ードXL'が、元の被乗数下位ワードXL に代えて用いら
れる。また、乗数下位ワードYL に1桁右シフト処理を
施す。この際、乗数下位ワードYL のMSBは0に設定
され、そのLSBは捨てられる。このようにして得られ
た新たな乗数下位ワードYL'が、元の乗数下位ワードY
L に代えて用いられる。そして、4つの積XL'×YL'、
XL'×YH、XH ×YL'及びXH ×YH の桁合わせ加算
により、倍精度乗算結果を求めるのである。なお、乗数
上位ワードYH の最下位2ビットのリコード処理には、
乗数下位ワードYL の最下位2ビットのリコード処理の
場合と同様に、更なる下位ビットとして値0が用いられ
る。
Therefore, conventionally, as shown in FIG. 4, in order to avoid an erroneous operation, the multiplicand lower word XL is unavoidable.
And the least significant bit (LS) of each of the multiplier lower word YL.
B) was thrown away. More specifically, the lower-order word XL of the multiplicand is right-shifted by one digit. At this time, the MSB of the multiplicand lower word XL is set to 0 and its LSB is discarded. The new multiplicand lower word XL 'thus obtained is used in place of the original multiplicand lower word XL. Further, the lower digit of the multiplier YL is shifted by one digit to the right. At this time, the MSB of the multiplier lower word YL is set to 0 and the LSB is discarded. The new multiplier lower word YL 'thus obtained is the original multiplier lower word YL.
Used in place of L. And four products XL '× YL',
The double precision multiplication result is obtained by the digit-matching addition of XL '* YH, XH * YL' and XH * YH. For the recoding process of the least significant 2 bits of the multiplier upper word YH,
The value 0 is used as a further lower bit, as in the case of recoding the least significant 2 bits of the multiplier lower word YL.

【0010】[0010]

【発明が解決しようとする課題】上記単一の単精度乗算
器を用いた従来の倍精度乗算実行方法は、誤演算を回避
するために被乗数下位ワードXL 及び乗数下位ワードY
L の各々のLSBを捨てるようにしていたので、演算結
果が最大2-(2n-2) の誤差を含むという問題点を有して
いた。
In the conventional double precision multiplication execution method using the single single precision multiplier described above, the multiplicand lower word XL and the multiplier lower word Y are avoided in order to avoid an erroneous operation.
Since each LSB of L is thrown away, there is a problem that the operation result includes an error of maximum 2 − (2n−2) .

【0011】本発明の目的は、単一の単精度乗算器を用
いて正確な倍精度乗算を実行できるようにすることにあ
る。
It is an object of the present invention to be able to perform accurate double precision multiplication using a single single precision multiplier.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するた
め、本発明は、単一の単精度乗算器を備えた演算装置に
おいて、乗数下位ワードYL のMSBが1である場合に
該乗数下位ワードYL の変換結果である4進SD数が負
の数になっても問題が生じないように、乗数下位ワード
YL のMSBを乗数上位ワードYH の最下位2ビットの
リコード処理に反映させることとしたものである。ま
た、該演算装置において、被乗数下位ワードXL を符号
なし2進数として、被乗数上位ワードXH を2の補数表
示の2進数として各々区別して取り扱うこととした。
In order to achieve the above object, the present invention provides an arithmetic unit having a single single-precision multiplier, in the case where the MSB of the multiplier lower word YL is 1, the multiplier lower word. In order not to cause a problem even if the quaternary SD number which is the conversion result of YL becomes a negative number, the MSB of the multiplier lower word YL is reflected in the recoding process of the least significant 2 bits of the multiplier upper word YH. It is a thing. Further, in the arithmetic unit, the multiplicand lower word XL is treated as an unsigned binary number, and the multiplicand upper word XH is treated as a two's complement binary number.

【0013】具体的に説明すると、請求項1の発明に係
る倍精度乗算実行方法は、単精度乗算のための各々2の
補数表示の2進数対応のリコード部と乗算処理部とを備
えた演算装置において各々2の補数表示の2進表現がな
された倍精度被乗数Xと倍精度乗数Yとの乗算を実行す
るための方法であって、乗数下位ワードYL のMSBを
保存するステップと、乗数下位ワードYL の表現を4進
SD表現に変換するようにかつ該乗数下位ワードYL の
最下位2ビットの処理には更なる下位ビットとして値0
を用いて前記リコード部で乗数下位ワードYL にリコー
ド処理を施すステップと、被乗数Xの1ワード(XL 又
はXH )と前記リコード処理が施された乗数下位ワード
YL との部分積を生成し該生成した部分積を加え合わせ
ることにより前記乗算処理部で第1の乗算結果(XL ×
YL 又はXH ×YL )を求めるステップと、乗数上位ワ
ードYH の表現を4進SD表現に変換するようにかつ該
乗数上位ワードYH の最下位2ビットの処理には更なる
下位ビットとして前記保存された乗数下位ワードYL の
MSBを用いて前記リコード部で乗数上位ワードYH に
リコード処理を施すステップと、前記被乗数Xの1ワー
ド(XL 又はXH )と前記リコード処理が施された乗数
上位ワードYH との部分積を生成し該生成した部分積を
加え合わせることにより前記乗算処理部で第2の乗算結
果(XL ×YH 又はXH ×YH )を求めるステップと、
前記第1及び第2の乗算結果の倍精度桁合わせ加算を実
行するステップとを備えた構成を採用したものである。
More specifically, the double-precision multiplication executing method according to the invention of claim 1 comprises an arithmetic operation comprising a binary-corresponding binary code unit for each two-complement representation for single-precision multiplication and a multiplication processing unit. A method for performing a multiplication of a double-precision multiplicand X and a double-precision multiplier Y, each represented by a binary representation in two's complement, in a device, the method comprising the step of storing the MSB of the multiplier lower word YL; To convert the representation of the word YL into a quaternary SD representation and to process the least significant 2 bits of the multiplier lower word YL, the value 0 as a further lower bit.
And a step of recoding the lower word of the multiplier YL in the recoding section, and a partial product of one word (XL or XH) of the multiplicand X and the lower word of the multiplier YL subjected to the recoding is generated. The first multiplication result (XL ×
YL or XH xYL), converting the representation of the multiplier upper word YH into a quaternary SD representation and processing the least significant 2 bits of the multiplier upper word YH as the further lower bits. A step of recoding the multiplier upper word YH in the recoding unit using the MSB of the multiplier lower word YL, and one word (XL or XH) of the multiplicand X and the multiplier upper word YH subjected to the recoding. Generating a second partial product and adding the generated partial products together to obtain a second multiplication result (XL × YH or XH × YH) in the multiplication processing unit,
And a step of executing double precision digit-matching addition of the first and second multiplication results.

【0014】請求項2の発明では、前記第1及び第2の
乗算結果を求めるステップのそれぞれにおいて、被乗数
下位ワードXL を前記乗算処理部で例外的に符号なし2
進数として処理することとした。
According to the second aspect of the present invention, in each of the steps of obtaining the first and second multiplication results, the multiplicand lower word XL is exceptionally unsigned 2 in the multiplication processing unit.
We decided to process it as a decimal number.

【0015】請求項3の発明では、前記第1及び第2の
乗算結果を求めるステップのそれぞれにおいて、被乗数
上位ワードXH を前記乗算処理部で2の補数表示の2進
数として処理することとした。
According to the third aspect of the invention, in each of the steps of obtaining the first and second multiplication results, the multiplicand upper word XH is processed as a binary number in a two's complement representation by the multiplication processing unit.

【0016】請求項4の発明では、前記乗数上位ワード
YH にリコード処理を施すステップを起動できることを
示すように、前記乗数下位ワードYL のMSBを保存す
るステップと、前記乗数下位ワードYL にリコード処理
を施すステップと、前記第1の乗算結果を求めるステッ
プとの完了時に下位乗算実行フラグをセットするステッ
プを更に備えることとした。
According to the invention of claim 4, the step of storing the MSB of the multiplier lower word YL and the recoding processing to the multiplier lower word YL are performed so that the step of performing the recoding processing on the multiplier upper word YH can be activated. And a step of setting a lower-order multiplication execution flag at the completion of the step of applying and the step of obtaining the first multiplication result.

【0017】また、請求項5の発明に係る演算装置は、
各々2の補数表示の2進表現がなされた倍精度被乗数X
と倍精度乗数Yとの乗算を実行するための演算装置であ
って、次のような被乗数ラッチ手段と、乗数ラッチ手段
と、乗数MSBラッチ手段と、選択手段と、リコード手
段と、乗算手段と、桁合わせ加算手段とを備えた構成を
採用したものである。すなわち、被乗数ラッチ手段は、
被乗数下位ワードXLと被乗数上位ワードXH とを選択
的に保持するものである。乗数ラッチ手段は、乗数下位
ワードYL と乗数上位ワードYH とを選択的に保持する
ものである。乗数MSBラッチ手段は、乗数下位ワード
YL のMSBを保持するものである。選択手段は、乗数
ラッチ手段に乗数下位ワードYL が保持された場合には
値0を、乗数ラッチ手段に乗数上位ワードYH が保持さ
れた場合には乗数MSBラッチ手段の出力(乗数下位ワ
ードYL のMSB)を各々選択出力するものである。リ
コード手段は、乗数ラッチ手段の出力(YL 又はYH )
の表現を4進SD表現に変換するように、かつ該乗数ラ
ッチ手段の出力の最下位2ビットの処理には更なる下位
ビットとして前記選択手段の出力(0又はYL のMS
B)を用いて、乗数ラッチ手段の出力にリコード処理を
施すものである。乗算手段は、被乗数ラッチ手段の出力
(XL 又はXH )とリコード手段の出力との部分積を生
成し、該生成した部分積を加え合わせることにより、前
記乗数ラッチ手段に乗数下位ワードYLが保持された場
合には第1の乗算結果(XL ×YL 又はXH ×YL )を
求め、前記乗数ラッチ手段に乗数上位ワードYH が保持
された場合には第2の乗算結果(XL ×YH 又はXH ×
YH )を求めるものである。そして、桁合わせ加算手段
は、乗算手段で求められた第1及び第2の乗算結果の倍
精度桁合わせ加算を実行するものである。
The arithmetic unit according to the invention of claim 5 is
Double precision multiplicand X, each of which is a binary representation of 2's complement
And a double-precision multiplier Y, which is an arithmetic unit for performing the following multiplicand latch means, multiplier latch means, multiplier MSB latch means, selecting means, recoding means, and multiplying means. , A configuration including a digit alignment and addition means is adopted. That is, the multiplicand latch means is
The multiplicand lower word XL and the multiplicand upper word XH are selectively retained. The multiplier latch means selectively holds the multiplier lower word YL and the multiplier upper word YH. The multiplier MSB latch means holds the MSB of the multiplier lower word YL. The selecting means outputs a value of 0 when the multiplier lower word YL is held in the multiplier latch means, and outputs the multiplier MSB latch means when the multiplier lower word YL is held (in the multiplier lower word YL). MSB) is selectively output. The recoding means outputs the output of the multiplier latch means (YL or YH).
Is converted to a quaternary SD representation, and the least significant 2 bits of the output of the multiplier latch means are processed as further lower bits by the output of the selecting means (MS of 0 or YL).
B) is used to recode the output of the multiplier latch means. The multiplication means generates a partial product of the output of the multiplicand latch means (XL or XH) and the output of the recoding means, and adds the generated partial products to hold the lower multiplier word YL in the multiplier latch means. If the multiplier latch means holds the multiplier high-order word YH, the second multiplication result (XL × YH or XH × XL × YL or XH × YL) is obtained.
YH). The digit-matching addition means executes double-precision digit-matching addition of the first and second multiplication results obtained by the multiplication means.

【0018】請求項6の発明では、前記乗算手段は、被
乗数ラッチ手段に被乗数下位ワードXL が保持された場
合には該被乗数下位ワードXL を符号なし2進数として
処理する一方、被乗数ラッチ手段に被乗数上位ワードX
H が保持された場合には該被乗数上位ワードXH を2の
補数表示の2進数として処理する機能を備えることとし
た。
In the sixth aspect of the present invention, when the multiplicand latch means holds the multiplicand lower word XL, the multiplying means processes the multiplicand lower word XL as an unsigned binary number and the multiplicand latch means. Upper word X
When H is retained, it is provided with a function of processing the multiplicand high order word XH as a binary number in 2's complement notation.

【0019】請求項7の発明では、前記桁合わせ加算手
段は、前記第1の乗算結果に右シフト処理を施すための
アライナと、その右シフト処理が施された第1の乗算結
果と前記第2の乗算結果との倍精度加算を実行するため
の加算器とを備えることとした。
According to a seventh aspect of the present invention, the digit aligning and adding means is an aligner for performing a right shift process on the first multiplication result, a first multiplication result after the right shift process, and the first aligning result. An adder for executing double precision addition with the multiplication result of 2 is provided.

【0020】請求項8の発明では、前記リコード手段に
よる乗数上位ワードYH の処理を開始できることを示す
ように、前記乗数下位ワードYL に基づく第1の乗算結
果の算出時にセットされる下位乗算実行フラグを格納す
るための状態レジスタ手段を更に備えることとした。
According to the eighth aspect of the present invention, the lower multiplication execution flag is set when the first multiplication result is calculated based on the multiplier lower word YL so as to indicate that the processing of the multiplier upper word YH can be started by the recoding means. Is further provided with status register means for storing

【0021】[0021]

【作用】請求項1の発明によれば、乗数下位ワードYL
の最下位2ビットのリコード処理には更なる下位ビット
として値0が、乗数上位ワードYH の最下位2ビットの
リコード処理には更なる下位ビットとして乗数下位ワー
ドYL のMSBが各々用いられる。つまり、乗数上位ワ
ードYH と乗数下位ワードYL とが一連の符号付き倍精
度数として扱われる結果、単一の単精度乗算器を備えた
演算装置において、乗数下位ワードYL のMSBが1で
あっても、該乗数下位ワードYL の全体を反映させた正
確な倍精度乗算結果が得られる。
According to the invention of claim 1, the multiplier lower word YL
The value 0 is used as the further lower bit for the recoding process of the least significant 2 bits of the above, and the MSB of the multiplier lower word YL is used as the further lower bit for the recoding process of the least significant 2 bits of the multiplier upper word YH. That is, the multiplier upper word YH and the multiplier lower word YL are treated as a series of signed double-precision numbers, and as a result, in the arithmetic unit having a single single-precision multiplier, the MSB of the multiplier lower word YL is one. Also, an accurate double precision multiplication result reflecting the entire lower word of the multiplier YL can be obtained.

【0022】請求項2の発明によれば、部分積の生成・
加算にあたって被乗数下位ワードXL が例外的に符号な
し2進数として扱われる。この結果、被乗数下位ワード
XLのMSBが1であっても、積XL ×YL 及びXL ×
YH が正しく演算される。
According to the invention of claim 2, the generation of partial products
In addition, the multiplicand lower word XL is exceptionally treated as an unsigned binary number. As a result, even if the MSB of the multiplicand lower word XL is 1, the products XL × YL and XL ×
YH is calculated correctly.

【0023】請求項3の発明によれば、部分積の生成・
加算にあたって被乗数上位ワードXH が2の補数表示の
2進数として扱われる。この結果、被乗数上位ワードX
H のMSBの値に応じて、積XH ×YL 及びXH ×YH
が正しく演算される。
According to the invention of claim 3, the generation of partial products
Upon addition, the multiplicand upper word XH is treated as a binary number in 2's complement notation. As a result, the multiplicand upper word X
Depending on the MSB value of H, the product XH xYL and XH xYH
Is calculated correctly.

【0024】請求項4の発明によれば、乗数下位ワード
YL に関する一連の処理が完了した時点で下位乗算実行
フラグがセットされる。下位乗算実行フラグがセットさ
れている場合には、乗数上位ワードYH にリコード処理
を施すステップから始まる倍精度乗算の残りのステップ
を実行する前に、当該演算装置を該倍精度乗算以外の演
算に利用できる。また、下位乗算実行フラグのセットを
認識できれば、乗数上位ワードYH の最下位2ビットの
リコード処理に更なる下位ビットとして乗数下位ワード
YL のMSBを用いればよいことが確認される。
According to the fourth aspect of the present invention, the lower multiplication execution flag is set at the time when the series of processes for the multiplier lower word YL is completed. If the lower-order multiplication execution flag is set, the arithmetic unit is set to an operation other than the double-precision multiplication before the remaining steps of the double-precision multiplication starting from the step of recoding the multiplier upper-order word YH are executed. Available. Further, if the set of the lower multiplication execution flag can be recognized, it is confirmed that the MSB of the multiplier lower word YL may be used as a further lower bit for the recoding process of the lowest 2 bits of the multiplier upper word YH.

【0025】請求項5の発明によれば、選択手段からリ
コード手段へ、乗数下位ワードYLのリコード処理時に
は値0が、乗数上位ワードYH のリコード処理時には乗
数MSBラッチ手段の出力すなわち乗数下位ワードYL
のMSBが各々供給される。これにより乗数上位ワード
YH と乗数下位ワードYL とが一連の符号付き倍精度数
として扱われる結果、乗算手段が単精度数入力対応であ
りながら、乗数下位ワードYL の全体を反映させた正確
な倍精度乗算結果が得られる。
According to the fifth aspect of the present invention, the value 0 is sent from the selecting means to the recoding means when the multiplier lower word YL is recoded, and the output of the multiplier MSB latch means, that is, the multiplier lower word YL is processed when the multiplier upper word YH is recoded.
MSB of each is supplied. As a result, the multiplier high-order word YH and the multiplier low-order word YL are treated as a series of signed double-precision numbers, and as a result, the multiplication means is capable of inputting a single-precision number, but is an accurate double that reflects the entire multiplier low-order word YL. The precision multiplication result is obtained.

【0026】請求項6の発明によれば、乗算手段におけ
る部分積の生成・加算にあたって、被乗数下位ワードX
L が符号なし2進数として、被乗数上位ワードXH が2
の補数表示の2進数として各々扱われる。つまり、被乗
数上位ワードXH と被乗数下位ワードXL とが一連の符
号付き倍精度数として扱われる結果、乗算手段が単精度
数入力対応でありながら、被乗数下位ワードXL のMS
Bが1であっても、該被乗数下位ワードXL の全体を反
映させた正確な倍精度乗算結果が得られる。
According to the sixth aspect of the present invention, the multiplicand lower word X is generated when the partial products are generated and added by the multiplication means.
The multiplicand upper word XH is 2 as L is an unsigned binary number
Are treated as binary numbers in the complement notation. That is, as a result of the multiplicand upper word XH and the multiplicand lower word XL being treated as a series of signed double-precision numbers, the MS of the multiplicand low-order word XL can be obtained while the multiplying means is capable of inputting single-precision numbers.
Even if B is 1, an accurate double precision multiplication result that reflects the entire lower word of the multiplicand XL is obtained.

【0027】請求項7の発明によれば、乗算手段で順次
求められた第1及び第2の乗算結果の加算にあたって、
桁合わせのために第1の乗算結果(XL ×YL 又はXH
×YL )に右シフト処理が施されたうえ、該右シフト処
理の結果と第2の乗算結果(XL ×YH 又はXH ×YH
)との倍精度加算が実行される。
According to the invention of claim 7, in adding the first and second multiplication results sequentially obtained by the multiplication means,
The first multiplication result (XL × YL or XH for digit alignment)
XYL) is right-shifted, and the result of the right-shifting and the second multiplication result (XL × YH or XH × YH)
) And double precision addition are performed.

【0028】請求項8の発明によれば、乗数下位ワード
YL に基づく第1の乗算結果の算出時に状態レジスタ手
段中の下位乗算実行フラグがセットされる。下位乗算実
行フラグがセットされている場合には、乗数上位ワード
YH に基づく第2の乗算結果の算出過程を実行する前
に、例えば桁合わせ加算手段を該倍精度乗算以外の演算
に利用できる。また、第2の乗算結果の算出過程開始時
に下位乗算実行フラグのセットを認識できれば、選択手
段からリコード手段へ乗数MSBラッチ手段の出力(乗
数下位ワードYL のMSB)を供給すればよいことが確
認される。
According to the eighth aspect of the present invention, the lower multiplication execution flag in the state register means is set when the first multiplication result based on the multiplier lower word YL is calculated. When the lower-order multiplication execution flag is set, for example, the digit-matching addition means can be used for operations other than the double-precision multiplication before executing the process of calculating the second multiplication result based on the multiplier upper-order word YH. Further, if the setting of the lower multiplication execution flag can be recognized at the start of the process of calculating the second multiplication result, it is confirmed that the output of the multiplier MSB latch means (the MSB of the multiplier lower word YL) should be supplied from the selecting means to the recoding means. To be done.

【0029】[0029]

【実施例】図1は、単一の単精度乗算器を用いた本発明
に係る倍精度乗算実行方法における乗数上位ワードYH
及び乗数下位ワードYL のリコード処理方法を示す説明
図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows a multiplier upper word YH in a double precision multiplication execution method according to the present invention using a single single precision multiplier.
FIG. 7 is an explanatory diagram showing a method of recoding a multiplier lower word YL.

【0030】各々2の補数表示の2進表現がなされた倍
精度被乗数Xと倍精度乗数Yとの乗算を実行する場合、
乗数下位ワードYL は、前掲の表1の規則に従って4進
SD数にリコードされる。この乗数下位ワードYL の最
下位2ビットYL1,YL0のリコード処理には、更なる下
位ビットとして値0が用いられる。乗数上位ワードYH
も、表1の規則に従って4進SD数にリコードされる。
ただし、乗数上位ワードYH の最下位2ビットYH1,Y
H0のリコード処理には、更なる下位ビットとして、値0
に代えて乗数下位ワードYL のMSBすなわちYLn-1が
用いられる。つまり、乗数上位ワードYH と乗数下位ワ
ードYL とが一連の符号付き倍精度数として扱われる結
果、乗数下位ワードYL のMSB(YLn-1)が1である
場合に該乗数下位ワードYL の変換結果である4進SD
数が負の数になっても問題が生じない。
When performing a multiplication of a double precision multiplicand X and a double precision multiplier Y, each of which is represented by a binary representation of 2's complement,
The multiplier lower word YL is recoded into a quaternary SD number according to the rules of Table 1 above. The value 0 is used as a further lower bit in the recoding process of the least significant 2 bits YL1 and YL0 of the multiplier lower word YL. Multiplier high word YH
Is also recoded into a quaternary SD number according to the rules of Table 1.
However, the least significant 2 bits YH1 and Y of the multiplier upper word YH
For the H0 recoding process, the value 0 is set as the further lower bit.
Instead, the MSB of the lower word of the multiplier YL, that is, YLn-1 is used. That is, the multiplier upper word YH and the multiplier lower word YL are treated as a series of signed double-precision numbers. As a result, when the MSB (YLn-1) of the multiplier lower word YL is 1, the conversion result of the multiplier lower word YL Is a quaternary SD
There is no problem even if the number becomes negative.

【0031】以下、図1のリコード処理方法を適用した
本発明の実施例に係る2つの演算装置について順次説明
する。
The two arithmetic units according to the embodiments of the present invention to which the recoding method of FIG. 1 is applied will be sequentially described below.

【0032】(実施例1)図2は、各々2の補数表示の
2進表現がなされた倍精度被乗数Xと倍精度乗数Yとの
乗算を実行するための本発明の第1の実施例に係る演算
装置のブロック図である。被乗数X及び乗数Yは、いず
れも2ワード長の固定小数点数である。被乗数Xは上位
ワードXH と下位ワードXL とで構成され、乗数Yは上
位ワードYH と下位ワードYL とで構成される。1ワー
ドは、n桁(nは偶数、例えば16)で構成される。
(Embodiment 1) FIG. 2 shows a first embodiment of the present invention for executing multiplication of a double precision multiplicand X and a double precision multiplier Y, each of which is represented by a binary representation of 2's complement. It is a block diagram of the arithmetic unit which concerns. Both the multiplicand X and the multiplier Y are fixed-point numbers having a 2-word length. The multiplicand X is composed of the upper word XH and the lower word XL, and the multiplier Y is composed of the upper word YH and the lower word YL. One word is composed of n digits (n is an even number, for example, 16).

【0033】図2において、31は3つのポートを有す
る記憶装置、32,33は該記憶装置31に接続された
第1及び第2のデータバスである。被乗数X及び乗数Y
は、いずれも記憶装置31に格納されている。
In FIG. 2, reference numeral 31 is a storage device having three ports, and 32 and 33 are first and second data buses connected to the storage device 31. Multiplicand X and multiplier Y
Are stored in the storage device 31.

【0034】R1〜R7は全てラッチである。このう
ち、R1は第1のデータバス32上のデータを保持する
ための1ワード長の被乗数ラッチ、R2は第2のデータ
バス33上のデータを保持するための1ワード長の乗数
ラッチ、R3は乗数ラッチR2のMSBを保持するため
の1ビット長の乗数MSBラッチ、R4は2ワード長の
乗算結果ラッチ、R5及びR6は各々2ワード長の第1
及び第2の加算器入力ラッチ、R7は2ワード長の加算
結果ラッチである。
R1 to R7 are all latches. Of these, R1 is a 1-word length multiplicand latch for holding data on the first data bus 32, R2 is a 1-word length multiplier latch for holding data on the second data bus 33, and R3 Is a 1-bit length multiplier MSB latch for holding the MSB of the multiplier latch R2, R4 is a 2-word length multiplication result latch, and R5 and R6 are first 2-word lengths, respectively.
And a second adder input latch, R7 is a 2-word long addition result latch.

【0035】11は、乗数ラッチR2の出力の表現を4
進SD表現に変換するように、該乗数ラッチR2の出力
にリコード処理を施すためのリコード部である。12
は、被乗数ラッチR1の出力とリコード部11の出力と
の部分積を生成し、該生成した部分積を加え合わせるこ
とにより乗算中間結果を求めるための乗算処理部であ
る。乗算処理部12の出力は、乗算結果ラッチR4に保
持される。13は、第1の加算器入力ラッチR5の出力
をそのまま出力し、もしくは該第1の加算器入力ラッチ
R5の出力に右シフト処理を施し、又は2ワード定数
“0”を出力するためのアライナである。14は、第2
の加算器入力ラッチR6の出力とアライナ13の出力と
の倍精度加算を実行するための加算器である。
Numeral 11 is a representation of the output of the multiplier latch R2.
It is a recoding unit for performing recoding processing on the output of the multiplier latch R2 so as to convert it into a base SD expression. 12
Is a multiplication processing unit for generating a partial product of the output of the multiplicand latch R1 and the output of the recoding unit 11 and adding the generated partial products to obtain a multiplication intermediate result. The output of the multiplication processing unit 12 is held in the multiplication result latch R4. 13 is an aligner for outputting the output of the first adder input latch R5 as it is, or for performing a right shift process on the output of the first adder input latch R5, or outputting a two-word constant "0". Is. 14 is the second
Is an adder for executing double-precision addition of the output of the adder input latch R6 and the output of the aligner 13.

【0036】21〜24は、全てセレクタである。この
うち、21は、乗数MSBラッチR3の出力又は1ビッ
ト定数“0”を最下位2ビットのリコード処理のために
リコード部11へ供給する第1のセレクタである。22
は、加算結果ラッチR7の上位ワード又は下位ワードを
選択出力する第2のセレクタである。第2のセレクタ2
2の出力は、記憶装置31に格納される。23は、加算
結果ラッチR7の出力又は第1のデータバス32上のデ
ータを第1の加算器入力ラッチR5へ出力する第1の加
算器入力セレクタである。24は、乗算結果ラッチR4
の出力又は第2のデータバス33上のデータを第2の加
算器入力ラッチR6へ出力する第2の加算器入力セレク
タである。
Reference numerals 21 to 24 are all selectors. Of these, 21 is a first selector that supplies the output of the multiplier MSB latch R3 or the 1-bit constant "0" to the recoding unit 11 for the recoding process of the least significant 2 bits. 22
Is a second selector for selectively outputting the upper word or the lower word of the addition result latch R7. Second selector 2
The output of 2 is stored in the storage device 31. Reference numeral 23 is a first adder input selector that outputs the output of the addition result latch R7 or the data on the first data bus 32 to the first adder input latch R5. 24 is a multiplication result latch R4
2 or the data on the second data bus 33 is output to the second adder input latch R6.

【0037】41は命令デコード及び制御部、42は状
態レジスタ、43は下位乗算実行フラグ、44はAND
ゲートである。命令デコード及び制御部41は、命令を
デコードし、かつ状態レジスタ42の中に設けられた下
位乗算実行フラグ43を設定する機能を持っている。ま
た、命令デコード及び制御部41は、第1及び第2の読
み出しデータアドレスRA1,RA2、書き込みデータ
アドレスWA、乗算入力ラッチイネーブル信号E1、乗
算結果ラッチイネーブル信号E2、第1及び第2の加算
器入力ラッチイネーブル信号E3A,E3B、加算結果
ラッチイネーブル信号E4、乗数MSBラッチイネーブ
ル信号E5、第1〜第4のセレクタ制御信号S1〜S
4、アライナ制御信号C1、及び、被乗数極性反転信号
C2を出力する。
41 is an instruction decoding and control unit, 42 is a status register, 43 is a lower multiplication execution flag, and 44 is an AND.
It is a gate. The instruction decoding and control unit 41 has a function of decoding an instruction and setting a lower multiplication execution flag 43 provided in the state register 42. The instruction decoding and control unit 41 also includes first and second read data addresses RA1 and RA2, write data address WA, multiplication input latch enable signal E1, multiplication result latch enable signal E2, and first and second adders. Input latch enable signals E3A, E3B, addition result latch enable signal E4, multiplier MSB latch enable signal E5, first to fourth selector control signals S1 to S
4. Aligner control signal C1 and multiplicand polarity inversion signal C2 are output.

【0038】第1の読み出しデータアドレスRA1は第
1のデータバス32へのデータの読み出しのために、第
2の読み出しデータアドレスRA2は第2のデータバス
33へのデータの読み出しのために、書き込みデータア
ドレスWAは第2のセレクタ22の出力の書き込みのた
めに各々記憶装置31に与えられる。
The first read data address RA1 is written for reading data to the first data bus 32, and the second read data address RA2 is written for reading data to the second data bus 33. The data address WA is provided to the storage device 31 for writing the output of the second selector 22.

【0039】乗算入力ラッチイネーブル信号E1は、第
1及び第2のデータバス32,33上のデータを保持す
るように被乗数ラッチR1及び乗数ラッチR2に共通に
与えられる。乗算結果ラッチイネーブル信号E2は、乗
算処理部12の出力を保持するように乗算結果ラッチR
4に与えられる。第1の加算器入力ラッチイネーブル信
号E3Aは第1の加算器入力セレクタ23の出力を保持
するように第1の加算器入力ラッチR5に、第2の加算
器入力ラッチイネーブル信号E3Bは第2の加算器入力
セレクタ24の出力を保持するように第2の加算器入力
ラッチR6に各々与えられる。加算結果ラッチイネーブ
ル信号E4は、加算器14の出力を保持するように加算
結果ラッチR7に与えられる。乗数MSBラッチイネー
ブル信号E5は、乗数ラッチR2のMSBを保持するよ
うに乗数MSBラッチR3に与えられる。
The multiplication input latch enable signal E1 is commonly applied to the multiplicand latch R1 and the multiplier latch R2 so as to hold the data on the first and second data buses 32 and 33. The multiplication result latch enable signal E2 holds the output of the multiplication processing unit 12 so as to hold the multiplication result latch R.
Given to 4. The first adder input latch enable signal E3A is stored in the first adder input latch R5 so that the output of the first adder input selector 23 is held, and the second adder input latch enable signal E3B is stored in the second adder input latch enable signal E3B. It is applied to the second adder input latch R6 so as to hold the output of the adder input selector 24, respectively. The addition result latch enable signal E4 is given to the addition result latch R7 so as to hold the output of the adder 14. Multiplier MSB latch enable signal E5 is applied to multiplier MSB latch R3 so as to hold the MSB of multiplier latch R2.

【0040】第1のセレクタ制御信号S1は、下位乗算
実行フラグ43とともにANDゲート44に入力され
る。第1のセレクタ21は、ANDゲート44の出力が
“1”(High)ならば乗数MSBラッチR3の出力
を、“0”(Low)ならば1ビット定数“0”を各々
選択する。第2〜第4のセレクタ制御信号S2,S3,
S4は、第2〜第4のセレクタ22,23,24におけ
る選択の制御にそれぞれ供される。第2のセレクタ22
は、第2のセレクタ制御信号S2が“1”ならば加算結
果ラッチR7の上位ワードを、“0”ならば該加算結果
ラッチR7の下位ワードを各々選択する。第3のセレク
タ23は、第3のセレクタ制御信号S3が“1”ならば
加算結果ラッチR7の出力を、“0”ならば第1のデー
タバス32上のデータを各々選択する。第4のセレクタ
24は、第4のセレクタ制御信号S4が“1”ならば乗
算結果ラッチR4の出力を、“0”ならば第2のデータ
バス33上のデータを各々選択する。
The first selector control signal S1 is input to the AND gate 44 together with the lower multiplication execution flag 43. The first selector 21 selects the output of the multiplier MSB latch R3 if the output of the AND gate 44 is "1" (High), and the 1-bit constant "0" if it is "0" (Low). Second to fourth selector control signals S2, S3
S4 is used for controlling selection in the second to fourth selectors 22, 23 and 24, respectively. Second selector 22
Selects the upper word of the addition result latch R7 if the second selector control signal S2 is "1", and selects the lower word of the addition result latch R7 if "2". The third selector 23 selects the output of the addition result latch R7 if the third selector control signal S3 is "1" and the data on the first data bus 32 if it is "0". The fourth selector 24 selects the output of the multiplication result latch R4 when the fourth selector control signal S4 is "1", and selects the data on the second data bus 33 when it is "0".

【0041】アライナ制御信号C1は、アライナ13の
動作を制御するための2ビットの信号である。すなわ
ち、アライナ制御信号C1が“00”ならば、アライナ
13は2ワード定数“0”を出力する。アライナ制御信
号C1が“01”ならば、アライナ13は第1の加算器
入力ラッチR5の出力に右シフト処理を施し、該右シフ
ト処理の結果を出力する。アライナ制御信号C1が“1
0”ならば、アライナ13は第1の加算器入力ラッチR
5の出力をそのまま加算器14に供給する。
The aligner control signal C1 is a 2-bit signal for controlling the operation of the aligner 13. That is, if the aligner control signal C1 is "00", the aligner 13 outputs a 2-word constant "0". If the aligner control signal C1 is "01", the aligner 13 performs the right shift process on the output of the first adder input latch R5, and outputs the result of the right shift process. Aligner control signal C1 is "1"
If it is "0", the aligner 13 receives the first adder input latch R
The output of 5 is supplied to the adder 14 as it is.

【0042】被乗数極性反転信号C2は、乗算処理部1
2の動作を制御するための1ビットの信号である。乗算
処理部12は、被乗数極性反転信号C2が“1”ならば
被乗数ラッチR1の出力を符号なし2進数として扱い、
“0”ならば被乗数ラッチR1の出力を2の補数表示の
2進数として扱う。具体的には、被乗数極性反転信号C
2は、乗算処理部12の一部を構成する部分積生成回路
及び冗長2進数加算回路の中で、被乗数ワードのMSB
の符号反転制御に使用され、あるいは加減算の切り替え
信号として使用される。
The multiplicand polarity inversion signal C2 is supplied to the multiplication processing unit 1
This is a 1-bit signal for controlling the operation of No. 2. The multiplication processor 12 treats the output of the multiplicand latch R1 as an unsigned binary number if the multiplicand polarity inversion signal C2 is "1",
If it is "0", the output of the multiplicand latch R1 is treated as a binary number of 2's complement. Specifically, the multiplicand polarity inversion signal C
2 is the MSB of the multiplicand word in the partial product generation circuit and redundant binary number addition circuit that form part of the multiplication processing unit 12;
It is used for the sign inversion control of, or as a switching signal for addition and subtraction.

【0043】図2の演算装置は、表2に示す7つの命令
A〜Gを順次実行することにより、4つの積XL ×YL
、XL ×YH 、XH ×YL 及びXH ×YH を順次求
め、かつそれらの桁合わせ加算により積X×Yを求め
る。表2は、命令ごとの、演算装置の中のデータの流れ
並びに乗算処理部12及び加算器14の処理内容を示し
ている。
The arithmetic unit of FIG. 2 sequentially executes the seven instructions A to G shown in Table 2 to obtain four products XL × YL.
, XL × YH, XH × YL and XH × YH are sequentially obtained, and the product X × Y is obtained by digit-addition thereof. Table 2 shows the flow of data in the arithmetic unit and the processing contents of the multiplication processing unit 12 and the adder 14 for each instruction.

【0044】[0044]

【表2】 [Table 2]

【0045】表2において、RA1−0及びRA1−1
は被乗数下位ワードXL の読み出しアドレス、RA1−
2及びRA1−2は被乗数上位ワードXH の読み出しア
ドレス、RA2−0及びRA2−2は乗数下位ワードY
L の読み出しアドレス、RA2−1及びRA2−3は乗
数上位ワードYH の読み出しアドレスである。WA−0
〜WA−3は、4ワード長の積X×Yの書き込みアドレ
スである。なお、初期状態では、下位乗算実行フラグ4
3、全てのラッチイネーブル信号E1〜E5、全てのセ
レクタ制御信号S1〜S4、及び、被乗数極性反転信号
C2が“0”であるものとする。また、アライナ制御信
号C1は“00”であるものとする。
In Table 2, RA1-0 and RA1-1
Is the read address of the multiplicand lower word XL, RA1-
2 and RA1-2 are read addresses of the multiplicand upper word XH, and RA2-0 and RA2-2 are lower multiplier word Y.
The read address of L, RA2-1 and RA2-3, are the read addresses of the multiplier upper word YH. WA-0
WA-3 is a write address of a product X × Y having a length of 4 words. In the initial state, the lower multiplication execution flag 4
3, all latch enable signals E1 to E5, all selector control signals S1 to S4, and the multiplicand polarity inversion signal C2 are assumed to be "0". Further, the aligner control signal C1 is assumed to be "00".

【0046】以下、図2の演算装置の動作シーケンスを
詳細に説明する。
The operation sequence of the arithmetic unit of FIG. 2 will be described in detail below.

【0047】まず、命令Aが命令デコード及び制御部4
1によりデコードされる。命令デコード及び制御部41
は、命令Aのデコード結果に応じて、RA1−0及びR
A2−0を記憶装置31に供給し、乗算入力ラッチイネ
ーブル信号E1及び乗数MSBラッチイネーブル信号E
5を“1”とし、第1のセレクタ制御信号S1を“1”
とし、被乗数極性反転信号C2を“1”とする。
First, the instruction A is the instruction decoding and control section 4.
It is decoded by 1. Instruction decoding and control unit 41
Depending on the decoding result of the instruction A, RA1-0 and R1
A2-0 is supplied to the memory device 31, and the multiplication input latch enable signal E1 and the multiplier MSB latch enable signal E are supplied.
5 is set to "1" and the first selector control signal S1 is set to "1"
And the multiplicand polarity inversion signal C2 is set to "1".

【0048】記憶装置31は、RA1−0及びRA2−
0で指定されるデータXL ,YL をそれぞれ第1及び第
2のデータバス32,33に出力する。これら第1及び
第2のデータバス32,33に出力されたデータXL ,
YL は、それぞれ被乗数ラッチR1及び乗数ラッチR2
に保持される。データYL のMSBは、乗数MSBラッ
チR3に保持される。第1のセレクタ制御信号S1が
“1”になっても、下位乗算実行フラグ43が“0”な
のでANDゲート44の出力が“0”となり、第1のセ
レクタ21は1ビット定数“0”を選択出力する。乗数
ラッチR2に保持されたデータYL は、第1のセレクタ
21の出力を該データYL の最下位2ビットの更なる下
位ビットとしてリコード部11においてリコード処理さ
れる。リコード処理されたデータYL は、被乗数ラッチ
R1に保持されたデータXL とともに乗算処理部12に
供給される。乗算処理部12は、両データXL ,YL の
部分積の生成と該生成した部分積の加え合わせとを実行
する。この際、被乗数極性反転信号C2が“1”なの
で、データXL は符号なし2進数として扱われる。そし
て、積XL ×YL が乗算結果ラッチR4に供給される。
The storage device 31 has RA1-0 and RA2-.
The data XL and YL designated by 0 are output to the first and second data buses 32 and 33, respectively. The data XL output to the first and second data buses 32 and 33,
YL is a multiplicand latch R1 and a multiplier latch R2, respectively.
Is held. The MSB of the data YL is held in the multiplier MSB latch R3. Even if the first selector control signal S1 becomes "1", the output of the AND gate 44 becomes "0" because the lower multiplication execution flag 43 is "0", and the first selector 21 sets the 1-bit constant "0". Select and output. The data YL held in the multiplier latch R2 is recoded in the recoding section 11 by using the output of the first selector 21 as a further lower bit of the least significant 2 bits of the data YL. The recoded data YL is supplied to the multiplication processing unit 12 together with the data XL held in the multiplicand latch R1. The multiplication processing unit 12 executes generation of partial products of both data XL and YL and addition of the generated partial products. At this time, since the multiplicand polarity inversion signal C2 is "1", the data XL is treated as an unsigned binary number. Then, the product XL × YL is supplied to the multiplication result latch R4.

【0049】更に、命令デコード及び制御部41は、状
態レジスタ42の中の下位乗算実行フラグ43に“1”
をセットし、乗算結果ラッチイネーブル信号E2を
“1”とし、アライナ13が2ワード定数“0”を出力
するようにアライナ制御信号C1を“00”とする。乗
算処理部12の出力XL ×YL は、乗算結果ラッチR4
に保持される。
Further, the instruction decoding and control unit 41 sets the lower multiplication execution flag 43 in the status register 42 to "1".
Is set, the multiplication result latch enable signal E2 is set to "1", and the aligner control signal C1 is set to "00" so that the aligner 13 outputs a 2-word constant "0". The output XL × YL of the multiplication processing unit 12 is the multiplication result latch R4.
Is held.

【0050】次に、命令Bが命令デコード及び制御部4
1によりデコードされる。命令デコード及び制御部41
は、命令Bのデコード結果に応じて、RA1−1及びR
A2−1を記憶装置31に供給し、乗算入力ラッチイネ
ーブル信号E1を“1”とし、乗数MSBラッチイネー
ブル信号E5を“0”とし、第1及び第4のセレクタ制
御信号S1,S4を“1”とし、被乗数極性反転信号C
2を“1”とし、第2の加算器入力ラッチイネーブル信
号E3Bを“1”とする。
Next, the instruction B is the instruction decoding and control unit 4.
It is decoded by 1. Instruction decoding and control unit 41
Depending on the decoding result of the instruction B, RA1-1 and R
A2-1 is supplied to the memory device 31, the multiplication input latch enable signal E1 is set to "1", the multiplier MSB latch enable signal E5 is set to "0", and the first and fourth selector control signals S1 and S4 are set to "1". , And multiplicand polarity inversion signal C
2 is set to "1", and the second adder input latch enable signal E3B is set to "1".

【0051】記憶装置31は、RA1−1及びRA2−
1で指定されるデータXL ,YH をそれぞれ第1及び第
2のデータバス32,33に出力する。これら第1及び
第2のデータバス32,33に出力されたデータXL ,
YH は、それぞれ被乗数ラッチR1及び乗数ラッチR2
に保持される。乗数MSBラッチイネーブル信号E5が
“0”なので、乗数MSBラッチR3に保持されていた
データYL のMSBは更新されない。
The storage device 31 includes RA1-1 and RA2-.
The data XL and YH designated by 1 are output to the first and second data buses 32 and 33, respectively. The data XL output to the first and second data buses 32 and 33,
YH is a multiplicand latch R1 and a multiplier latch R2, respectively.
Is held. Since the multiplier MSB latch enable signal E5 is "0", the MSB of the data YL held in the multiplier MSB latch R3 is not updated.

【0052】乗算結果ラッチR4に保持されていた積X
L ×YL は、第2の加算器入力セレクタ24を通して第
2の加算器入力ラッチR6に供給され、ここに保持され
る。加算器14は、アライナ13の2ワード定数出力
“0”と第2の加算器入力ラッチR6の出力との倍精度
加算を実行する。その加算結果すなわちXL ×YL は、
加算結果ラッチR7に供給される。
The product X held in the multiplication result latch R4
L × YL is supplied to the second adder input latch R6 through the second adder input selector 24 and held there. The adder 14 performs double-precision addition of the 2-word constant output “0” of the aligner 13 and the output of the second adder input latch R6. The addition result, that is, XL × YL is
It is supplied to the addition result latch R7.

【0053】一方、第1のセレクタ制御信号S1が
“1”になると、該第1のセレクタ制御信号S1と下位
乗算実行フラグ43との論理積(ANDゲート44の出
力)が“1”となり、第1のセレクタ21は乗数MSB
ラッチR3の出力すなわちデータYL のMSBを選択出
力する。乗数ラッチR2に保持されたデータYH は、第
1のセレクタ21の出力を該データYH の最下位2ビッ
トの更なる下位ビットとしてリコード部11においてリ
コード処理される。リコード処理されたデータYHは、
被乗数ラッチR1に保持されたデータXL とともに乗算
処理部12に供給される。乗算処理部12は、両データ
XL ,YH の部分積の生成と該生成した部分積の加え合
わせとを実行する。この際、被乗数極性反転信号C2が
“1”なので、データXL は符号なし2進数として扱わ
れる。そして、積XL ×YH が乗算結果ラッチR4に供
給される。
On the other hand, when the first selector control signal S1 becomes "1", the logical product (output of the AND gate 44) of the first selector control signal S1 and the lower multiplication execution flag 43 becomes "1", The first selector 21 is a multiplier MSB
The output of the latch R3, that is, the MSB of the data YL is selectively output. The data YH held in the multiplier latch R2 is recoded in the recoding section 11 by using the output of the first selector 21 as a further lower bit of the least significant 2 bits of the data YH. The recoded data YH is
It is supplied to the multiplication processing section 12 together with the data XL held in the multiplicand latch R1. The multiplication processing unit 12 executes generation of partial products of both data XL and YH and addition of the generated partial products. At this time, since the multiplicand polarity inversion signal C2 is "1", the data XL is treated as an unsigned binary number. Then, the product XL × YH is supplied to the multiplication result latch R4.

【0054】更に、命令デコード及び制御部41は、状
態レジスタ42の中の下位乗算実行フラグ43を“0”
にリセットし、加算結果ラッチイネーブル信号E4を
“1”とし、乗算結果ラッチイネーブル信号E2を
“1”とし、アライナ13が第1の加算器入力ラッチR
5の出力に右シフト処理を施すことができるようにアラ
イナ制御信号C1を“01”とする。加算器14の出力
XL ×YL は加算結果ラッチR7に、乗算処理部12の
出力XL ×YH は乗算結果ラッチR4に各々保持され
る。
Further, the instruction decoding and control section 41 sets the lower multiplication execution flag 43 in the status register 42 to "0".
Reset, the addition result latch enable signal E4 is set to "1", the multiplication result latch enable signal E2 is set to "1", and the aligner 13 sets the first adder input latch R
The aligner control signal C1 is set to "01" so that the output of 5 can be right-shifted. The output XL × YL of the adder 14 is held in the addition result latch R7, and the output XL × YH of the multiplication processing unit 12 is held in the multiplication result latch R4.

【0055】次に、命令Cが命令デコード及び制御部4
1によりデコードされる。命令デコード及び制御部41
は、命令Cのデコード結果に応じて、RA1−2、RA
2−2及びWA−0を記憶装置31に供給し、乗算入力
ラッチイネーブル信号E1及び乗数MSBラッチイネー
ブル信号E5を“1”とし、第1、第3及び第4のセレ
クタ制御信号S1,S3,S4を“1”とし、被乗数極
性反転信号C2を“0”とし、第1及び第2の加算器入
力ラッチイネーブル信号E3A,E3Bを“1”とす
る。
Next, the instruction C is the instruction decoding and control unit 4.
It is decoded by 1. Instruction decoding and control unit 41
Depending on the decoding result of the instruction C, RA1-2, RA
2-2 and WA-0 are supplied to the memory device 31, the multiplication input latch enable signal E1 and the multiplier MSB latch enable signal E5 are set to "1", and the first, third and fourth selector control signals S1, S3 are provided. S4 is set to "1", the multiplicand polarity inversion signal C2 is set to "0", and the first and second adder input latch enable signals E3A and E3B are set to "1".

【0056】記憶装置31は、RA1−2及びRA2−
2で指定されるデータXH ,YL をそれぞれ第1及び第
2のデータバス32,33に出力する。これら第1及び
第2のデータバス32,33に出力されたデータXH ,
YL は、それぞれ被乗数ラッチR1及び乗数ラッチR2
に保持される。データYL のMSBは、乗数MSBラッ
チR3に保持される。
The storage device 31 includes RA1-2 and RA2-.
The data XH and YL designated by 2 are output to the first and second data buses 32 and 33, respectively. The data XH output to the first and second data buses 32 and 33,
YL is a multiplicand latch R1 and a multiplier latch R2, respectively.
Is held. The MSB of the data YL is held in the multiplier MSB latch R3.

【0057】第2のセレクタ制御信号S2が“0”なの
で、加算結果ラッチR7に保持されていた加算結果XL
×YL のうちの下位ワード(XL ×YL )L は、第2の
セレクタ22を通して記憶装置31に書き込まれる。同
加算結果XL ×YL の全体は、第1の加算器入力セレク
タ23を通して第1の加算器入力ラッチR5に供給さ
れ、ここに保持される。アライナ13は、第1の加算器
入力ラッチR5の出力XL ×YL のうちの上位ワードが
下位側にシフトするように、該第1の加算器入力ラッチ
R5の出力に右シフト処理を施したうえ、該シフト処理
の結果すなわちrshift(XL ×YL )を出力する。この
際、(XL ×YL )L は捨てられる。一方、乗算結果ラ
ッチR4に保持されていた積XL ×YH は、第2の加算
器入力セレクタ24を通して第2の加算器入力ラッチR
6に供給され、ここに保持される。加算器14は、アラ
イナ13の出力rshift(XL ×YL )と第2の加算器入
力ラッチR6の出力XL ×YH との倍精度加算を実行す
る。その加算結果すなわちXL ×YH +rshift(XL ×
YL )は、加算結果ラッチR7に供給される。
Since the second selector control signal S2 is "0", the addition result XL held in the addition result latch R7 is
The lower word (XL × YL) L of × YL is written in the storage device 31 through the second selector 22. The entire addition result XL × YL is supplied to the first adder input latch R5 through the first adder input selector 23 and held there. The aligner 13 right-shifts the output of the first adder input latch R5 so that the upper word of the output XL × YL of the first adder input latch R5 shifts to the lower side. , The result of the shift process, that is, rshift (XL × YL) is output. At this time, (XL × YL) L is discarded. On the other hand, the product XL × YH held in the multiplication result latch R4 is passed through the second adder input selector 24 to the second adder input latch R4.
6 and is held here. The adder 14 performs double precision addition of the output rshift (XL * YL) of the aligner 13 and the output XL * YH of the second adder input latch R6. The addition result, that is, XL × YH + rshift (XL ×
YL) is supplied to the addition result latch R7.

【0058】一方、第1のセレクタ制御信号S1が
“1”になっても、下位乗算実行フラグ43が“0”な
のでANDゲート44の出力が“0”となり、第1のセ
レクタ21は1ビット定数“0”を選択出力する。乗数
ラッチR2に保持されたデータYL は、第1のセレクタ
21の出力を該データYL の最下位2ビットの更なる下
位ビットとしてリコード部11においてリコード処理さ
れる。リコード処理されたデータYL は、被乗数ラッチ
R1に保持されたデータXH とともに乗算処理部12に
供給される。乗算処理部12は、両データXH ,YL の
部分積の生成と該生成した部分積の加え合わせとを実行
する。この際、被乗数極性反転信号C2が“0”なの
で、データXH は2の補数表示の2進数として扱われ
る。そして、積XH ×YL が乗算結果ラッチR4に供給
される。
On the other hand, even when the first selector control signal S1 becomes "1", the output of the AND gate 44 becomes "0" because the lower multiplication execution flag 43 is "0", and the first selector 21 has 1 bit. Selects and outputs the constant "0". The data YL held in the multiplier latch R2 is recoded in the recoding section 11 by using the output of the first selector 21 as a further lower bit of the least significant 2 bits of the data YL. The recoded data YL is supplied to the multiplication processing unit 12 together with the data XH held in the multiplicand latch R1. The multiplication processing unit 12 executes generation of partial products of both data XH and YL and addition of the generated partial products. At this time, since the multiplicand polarity inversion signal C2 is "0", the data XH is treated as a binary number in 2's complement notation. Then, the product XH * YL is supplied to the multiplication result latch R4.

【0059】更に、命令デコード及び制御部41は、状
態レジスタ42の中の下位乗算実行フラグ43に“1”
をセットし、加算結果ラッチイネーブル信号E4を
“1”とし、乗算結果ラッチイネーブル信号E2を
“1”とし、アライナ13が第1の加算器入力ラッチR
5の出力をそのまま出力できるようにアライナ制御信号
C1を“10”とする。加算器14の出力XL ×YH +
rshift(XL ×YL )は加算結果ラッチR7に、乗算処
理部12の出力XH ×YL は乗算結果ラッチR4に各々
保持される。
Furthermore, the instruction decoding and control section 41 sets the lower multiplication execution flag 43 in the status register 42 to "1".
Is set, the addition result latch enable signal E4 is set to "1", the multiplication result latch enable signal E2 is set to "1", and the aligner 13 sets the first adder input latch R
The aligner control signal C1 is set to "10" so that the output of No. 5 can be output as it is. Output of adder 14 XL x YH +
rshift (XL × YL) is held in the addition result latch R7, and the output XH × YL of the multiplication processing unit 12 is held in the multiplication result latch R4.

【0060】次に、命令Dが命令デコード及び制御部4
1によりデコードされる。命令デコード及び制御部41
は、命令Dのデコード結果に応じて、RA1−3及びR
A2−3を記憶装置31に供給し、乗算入力ラッチイネ
ーブル信号E1を“1”とし、乗数MSBラッチイネー
ブル信号E5を“0”とし、第1、第3及び第4のセレ
クタ制御信号S1,S3,S4を“1”とし、被乗数極
性反転信号C2を“0”とし、第1及び第2の加算器入
力ラッチイネーブル信号E3A,E3Bを“1”とす
る。
Next, the instruction D is the instruction decoding and control unit 4.
It is decoded by 1. Instruction decoding and control unit 41
RA1-3 and R1 depending on the decoding result of the instruction D.
A2-3 is supplied to the memory device 31, the multiplication input latch enable signal E1 is set to "1", the multiplier MSB latch enable signal E5 is set to "0", and the first, third and fourth selector control signals S1, S3 are set. , S4 are set to "1", the multiplicand polarity inversion signal C2 is set to "0", and the first and second adder input latch enable signals E3A and E3B are set to "1".

【0061】記憶装置31は、RA1−3及びRA2−
3で指定されるデータXH ,YH をそれぞれ第1及び第
2のデータバス32,33に出力する。これら第1及び
第2のデータバス32,33に出力されたデータXH ,
YH は、それぞれ被乗数ラッチR1及び乗数ラッチR2
に保持される。乗数MSBラッチイネーブル信号E5が
“0”なので、乗数MSBラッチR3に保持されていた
データYL のMSBは更新されない。
The storage device 31 includes RA1-3 and RA2-.
The data XH and YH designated by 3 are output to the first and second data buses 32 and 33, respectively. The data XH output to the first and second data buses 32 and 33,
YH is a multiplicand latch R1 and a multiplier latch R2, respectively.
Is held. Since the multiplier MSB latch enable signal E5 is "0", the MSB of the data YL held in the multiplier MSB latch R3 is not updated.

【0062】加算結果ラッチR7に保持されていた加算
結果XL ×YH +rshift(XL ×YL )の全体は、第1
の加算器入力セレクタ23を通して第1の加算器入力ラ
ッチR5に供給され、ここに保持される。アライナ13
は、第1の加算器入力ラッチR5の出力XL ×YH +rs
hift(XL ×YL )をそのまま出力する。一方、乗算結
果ラッチR4に保持されていた積XH ×YL は、第2の
加算器入力セレクタ24を通して第2の加算器入力ラッ
チR6に供給され、ここに保持される。加算器14は、
アライナ13の出力XL ×YH +rshift(XL ×YL )
と第2の加算器入力ラッチR6の出力XH ×YL との倍
精度加算を実行する。その加算結果すなわちXH ×YL
+XL ×YH +rshift(XL ×YL )は、加算結果ラッ
チR7に供給される。
The entire addition result XL × YH + rshift (XL × YL) held in the addition result latch R7 is the first
Is supplied to the first adder input latch R5 through the adder input selector 23 and is held there. Aligner 13
Is the output of the first adder input latch R5 XL × YH + rs
Output hift (XL x YL) as is. On the other hand, the product XH * YL held in the multiplication result latch R4 is supplied to the second adder input latch R6 through the second adder input selector 24 and held there. The adder 14 is
Output of aligner 13 XL × YH + rshift (XL × YL)
And double-precision addition of the output XH * YL of the second adder input latch R6. The addition result, that is, XH xYL
+ XL * YH + rshift (XL * YL) is supplied to the addition result latch R7.

【0063】一方、第1のセレクタ制御信号S1が
“1”になると、該第1のセレクタ制御信号S1と下位
乗算実行フラグ43との論理積(ANDゲート44の出
力)が“1”となり、第1のセレクタ21は乗数MSB
ラッチR3の出力すなわちデータYL のMSBを選択出
力する。乗数ラッチR2に保持されたデータYH は、第
1のセレクタ21の出力を該データYH の最下位2ビッ
トの更なる下位ビットとしてリコード部11においてリ
コード処理される。リコード処理されたデータYHは、
被乗数ラッチR1に保持されたデータXH とともに乗算
処理部12に供給される。乗算処理部12は、両データ
XH ,YH の部分積の生成と該生成した部分積の加え合
わせとを実行する。この際、被乗数極性反転信号C2が
“0”なので、データXH は2の補数表示の2進数とし
て扱われる。そして、積XH ×YH が乗算結果ラッチR
4に供給される。
On the other hand, when the first selector control signal S1 becomes "1", the logical product (output of the AND gate 44) of the first selector control signal S1 and the lower multiplication execution flag 43 becomes "1", The first selector 21 is a multiplier MSB
The output of the latch R3, that is, the MSB of the data YL is selectively output. The data YH held in the multiplier latch R2 is recoded in the recoding section 11 by using the output of the first selector 21 as a further lower bit of the least significant 2 bits of the data YH. The recoded data YH is
It is supplied to the multiplication processing unit 12 together with the data XH held in the multiplicand latch R1. The multiplication processing unit 12 executes generation of partial products of both data XH and YH and addition of the generated partial products. At this time, since the multiplicand polarity inversion signal C2 is "0", the data XH is treated as a binary number in 2's complement notation. The product XH x YH is the multiplication result latch R
4 is supplied.

【0064】更に、命令デコード及び制御部41は、状
態レジスタ42の中の下位乗算実行フラグ43を“0”
にリセットし、加算結果ラッチイネーブル信号E4を
“1”とし、乗算結果ラッチイネーブル信号E2を
“1”とし、アライナ13が第1の加算器入力ラッチR
5の出力に右シフト処理を施すことができるようにアラ
イナ制御信号C1を“01”とする。加算器14の出力
XH ×YL +XL ×YH +rshift(XL ×YL )は加算
結果ラッチR7に、乗算処理部12の出力XH ×YHは
乗算結果ラッチR4に各々保持される。
Further, the instruction decoding and control section 41 sets the lower multiplication execution flag 43 in the status register 42 to "0".
Reset, the addition result latch enable signal E4 is set to "1", the multiplication result latch enable signal E2 is set to "1", and the aligner 13 sets the first adder input latch R
The aligner control signal C1 is set to "01" so that the output of 5 can be right-shifted. The output XH * YL + XL * YH + rshift (XL * YL) of the adder 14 is held in the addition result latch R7, and the output XH * YH of the multiplication processing unit 12 is held in the multiplication result latch R4.

【0065】次に、命令Eが命令デコード及び制御部4
1によりデコードされる。命令デコード及び制御部41
は、命令Eのデコード結果に応じて、WA−1を記憶装
置31に供給し、乗算入力ラッチイネーブル信号E1を
“0”とし、第3及び第4のセレクタ制御信号S3,S
4を“1”とし、第1及び第2の加算器入力ラッチイネ
ーブル信号E3A,E3Bを“1”とする。
Next, the instruction E is the instruction decoding and control unit 4.
It is decoded by 1. Instruction decoding and control unit 41
Supplies WA-1 to the memory device 31 in accordance with the decoding result of the instruction E, sets the multiplication input latch enable signal E1 to "0", and sets the third and fourth selector control signals S3, S.
4 is set to "1" and the first and second adder input latch enable signals E3A and E3B are set to "1".

【0066】第2のセレクタ制御信号S2が“0”なの
で、加算結果ラッチR7に保持されていた加算結果XH
×YL +XL ×YH +rshift(XL ×YL )のうちの下
位ワード{XH ×YL +XL ×YH +rshift(XL ×Y
L )}L は、第2のセレクタ22を通して記憶装置31
に書き込まれる。同加算結果XH ×YL +XL ×YH+r
shift(XL ×YL )の全体は、第1の加算器入力セレ
クタ23を通して第1の加算器入力ラッチR5に供給さ
れ、ここに保持される。アライナ13は、第1の加算器
入力ラッチR5の出力XH ×YL +XL ×YH +rshift
(XL ×YL )のうちの上位ワードが下位側にシフトす
るように、該第1の加算器入力ラッチR5の出力に右シ
フト処理を施したうえ、該シフト処理の結果すなわちrs
hift{XH ×YL +XL ×YH +rshift(XL ×YL
)}を出力する。この際、{XH ×YL +XL ×YH
+rshift(XL ×YL )}L は捨てられる。一方、乗算
結果ラッチR4に保持されていた積XH ×YH は、第2
の加算器入力セレクタ24を通して第2の加算器入力ラ
ッチR6に供給され、ここに保持される。加算器14
は、アライナ13の出力rshift{XH ×YL +XL ×Y
H +rshift(XL ×YL )}と第2の加算器入力ラッチ
R6の出力XH ×YH との倍精度加算を実行する。その
加算結果すなわちXH ×YH +rshift{XH ×YL +X
L ×YH +rshift(XL ×YL )}は、加算結果ラッチ
R7に供給される。
Since the second selector control signal S2 is "0", the addition result XH held in the addition result latch R7 is
XYL + XL xYH + rshift (XL xYL) lower word {XH xYL + XL xYH + rshift (XL xY
L)} L is stored in the storage device 31 through the second selector 22.
Is written to. Same addition result XH xYL + XL xYH + r
The entire shift (XL × YL) is supplied to the first adder input latch R5 through the first adder input selector 23 and held there. The aligner 13 outputs the output XH × YL + XL × YH + rshift of the first adder input latch R5.
The output of the first adder input latch R5 is right-shifted so that the upper word of (XL × YL) is shifted to the lower side, and the result of the shift processing, that is, rs
hift {XH xYL + XL xYH + rshift (XL xYL
)} Is output. At this time, {XH xYL + XL xYH
+ Rshift (XL xYL)} L is discarded. On the other hand, the product XH xYH held in the multiplication result latch R4 is
Is supplied to the second adder input latch R6 through the adder input selector 24 and is held there. Adder 14
Is the output rshift of the aligner 13 {XH xYL + XL xY
H + rshift (XL × YL)} and the output XH × YH of the second adder input latch R6 are subjected to double precision addition. The addition result, that is, XH xYH + rshift {XH xYL + X
L * YH + rshift (XL * YL)} is supplied to the addition result latch R7.

【0067】更に、命令デコード及び制御部41は、加
算結果ラッチイネーブル信号E4を“1”とし、乗算結
果ラッチイネーブル信号E2を“0”とし、アライナ制
御信号C1を“00”に戻す。加算器14の出力XH ×
YH +rshift{XH ×YL +XL ×YH +rshift(XL
×YL )}は加算結果ラッチR7に保持される。
Further, the instruction decoding and control section 41 sets the addition result latch enable signal E4 to "1", the multiplication result latch enable signal E2 to "0", and returns the aligner control signal C1 to "00". Output of adder 14 XH ×
YH + rshift {XH xYL + XL xYH + rshift (XL
× YL)} is held in the addition result latch R7.

【0068】次に、命令Fが命令デコード及び制御部4
1によりデコードされる。命令デコード及び制御部41
は、命令Fのデコード結果に応じて、WA−2を記憶装
置31に供給し、第1及び第2の加算器入力ラッチイネ
ーブル信号E3A,E3Bを“0”とする。
Next, the instruction F is the instruction decoding and control unit 4.
It is decoded by 1. Instruction decoding and control unit 41
Supplies WA-2 to the storage device 31 according to the decoding result of the instruction F and sets the first and second adder input latch enable signals E3A and E3B to "0".

【0069】第2のセレクタ制御信号S2が“0”なの
で、加算結果ラッチR7に保持されていた加算結果XH
×YH +rshift{XH ×YL +XL ×YH +rshift(X
L ×YL )}のうちの下位ワード[XH ×YH +rshift
{XH ×YL +XL ×YH +rshift(XL ×YL )}]
L は、第2のセレクタ22を通して記憶装置31に書き
込まれる。
Since the second selector control signal S2 is "0", the addition result XH held in the addition result latch R7 is
XYH + rshift {XH xYL + XL xYH + rshift (X
L * YL)} lower word [XH * YH + rshift
{XH xYL + XL xYH + rshift (XL xYL)}]
L is written in the storage device 31 through the second selector 22.

【0070】更に、命令デコード及び制御部41は、加
算結果ラッチイネーブル信号E4を“0”とし、第2の
セレクタ制御信号S2を“1”とする。
Further, the instruction decoding and control section 41 sets the addition result latch enable signal E4 to "0" and sets the second selector control signal S2 to "1".

【0071】次に、命令Gが命令デコード及び制御部4
1によりデコードされる。命令デコード及び制御部41
は、命令Gのデコード結果に応じて、WA−3を記憶装
置31に供給する。
Next, the instruction G is the instruction decoding and control unit 4.
It is decoded by 1. Instruction decoding and control unit 41
Supplies WA-3 to the storage device 31 in accordance with the result of decoding the instruction G.

【0072】第2のセレクタ制御信号S2が“1”なの
で、加算結果ラッチR7に保持されていた加算結果XH
×YH +rshift{XH ×YL +XL ×YH +rshift(X
L ×YL )}のうちの上位ワード[XH ×YH +rshift
{XH ×YL +XL ×YH +rshift(XL ×YL )}]
H は、第2のセレクタ22を通して記憶装置31に書き
込まれる。
Since the second selector control signal S2 is "1", the addition result XH held in the addition result latch R7 is
XYH + rshift {XH xYL + XL xYH + rshift (X
L × YL)} upper word [XH × YH + rshift
{XH xYL + XL xYH + rshift (XL xYL)}]
H is written to the storage device 31 through the second selector 22.

【0073】以上のとおり、4つの単精度乗算命令(命
令A〜D)を含む7命令を順次実行することにより、4
ワード長の倍精度乗算結果X×Yが記憶装置31の中に
格納される。しかも、本実施例によれば、第1のセレク
タ21からリコード部11へ、乗数下位ワードYL のリ
コード処理時には1ビット定数“0”が、乗数上位ワー
ドYH のリコード処理時には乗数MSBラッチR3の出
力すなわち乗数下位ワードYL のMSBが各々供給され
ので、乗数上位ワードYH と乗数下位ワードYL とが一
連の符号付き倍精度数として扱われる。また、乗算処理
部12における部分積の生成・加算にあたって、被乗数
極性反転信号C2に従い、被乗数下位ワードXL が符号
なし2進数として、被乗数上位ワードXH が2の補数表
示の2進数として各々扱われる。つまり、被乗数上位ワ
ードXH と被乗数下位ワードXLとが一連の符号付き倍
精度乗数として扱われる。したがって、本実施例の演算
装置によれば、乗算処理部12が単精度数入力対応であ
りながら、従来とは違って、被乗数下位ワードXL と乗
数下位ワードYL との全体を反映させた正確な倍精度乗
算結果が得られる。
As described above, 7 instructions including 4 single precision multiplication instructions (instructions A to D) are sequentially executed to obtain 4
The word length double precision multiplication result X × Y is stored in the storage device 31. Moreover, according to this embodiment, the 1-bit constant "0" is output from the first selector 21 to the recoding unit 11 when the multiplier lower word YL is recoded, and the multiplier MSB latch R3 is output when the multiplier upper word YH is recoded. That is, since the MSBs of the multiplier lower word YL are supplied, the multiplier upper word YH and the multiplier lower word YL are treated as a series of signed double-precision numbers. Further, in the generation / addition of the partial products in the multiplication processing unit 12, the multiplicand lower word XL is treated as an unsigned binary number and the multiplicand upper word XH is treated as a two's complement binary number in accordance with the multiplicand polarity inversion signal C2. That is, the multiplicand upper word XH and the multiplicand lower word XL are treated as a series of signed double precision multipliers. Therefore, according to the arithmetic unit of this embodiment, although the multiplication processing unit 12 is capable of inputting a single-precision number, unlike the conventional case, it is possible to accurately reflect the whole of the multiplicand lower word XL and the multiplier lower word YL. A double precision multiplication result is obtained.

【0074】また、本実施例によれば、乗数下位ワード
YL に基づく乗算を実行した時に状態レジスタ42の中
の下位乗算実行フラグ43に“1”をセットし、乗数上
位ワードYH に基づく乗算を実行した時に該下位乗算実
行フラグ43を“0”にリセットする構成を採用したの
で、プログラミングの自由度が高められる。例えば、上
述の命令Aと命令Bとの間に当該倍精度乗算に関係しな
い命令Jが挿入され、命令デコード及び制御部41が命
令A,J,Bをこの順にデコードする場合でも、命令B
の実行時には第1のセレクタ21が乗数MSBラッチR
3の出力を正しく選択できる。また、上述の命令Bと命
令Cとの間に当該倍精度乗算に関係しない命令Kが挿入
され、命令デコード及び制御部41が命令B,K,Cを
この順にデコードする場合でも、命令Cの実行時には第
1のセレクタ21が1ビット定数“0”を正しく選択で
きる。
Further, according to this embodiment, when the multiplication based on the multiplier lower word YL is executed, the lower multiplication execution flag 43 in the state register 42 is set to "1", and the multiplication based on the multiplier upper word YH is performed. Since the lower multiplication execution flag 43 is reset to "0" when it is executed, the degree of freedom in programming is increased. For example, even when the instruction J not related to the double-precision multiplication is inserted between the instruction A and the instruction B described above and the instruction decoding and control unit 41 decodes the instructions A, J, and B in this order, the instruction B
The first selector 21 outputs the multiplier MSB latch R
The output of 3 can be selected correctly. Even when the instruction K not related to the double-precision multiplication is inserted between the instruction B and the instruction C and the instruction decoding and control unit 41 decodes the instructions B, K, and C in this order, the instruction C At the time of execution, the first selector 21 can correctly select the 1-bit constant "0".

【0075】上記の命令J,Kは、加算器14とその周
辺回路とを使用する加算命令であってもよい。例えば、
第3及び第4のセレクタ制御信号S3,S4を“0”と
すれば、記憶装置31から第1及び第2のデータバス3
2,33上に読み出された2つのデータを、被乗数ラッ
チR1及び乗数ラッチR2を介さずに、加算器14へ直
接導くことも可能である。ただし、加算結果ラッチR7
に保持された倍精度乗算の途中結果を壊さないようにす
るためには、加算命令の場合の加算器14の出力を保持
するための他の加算結果ラッチを設ける。
The above instructions J and K may be addition instructions using the adder 14 and its peripheral circuits. For example,
When the third and fourth selector control signals S3 and S4 are set to “0”, the storage device 31 is connected to the first and second data buses 3 and 3.
It is also possible to directly lead the two pieces of data read out on 2, 33 to the adder 14 without going through the multiplicand latch R1 and the multiplier latch R2. However, addition result latch R7
In order not to destroy the intermediate result of the double-precision multiplication held in, the other addition result latch for holding the output of the adder 14 in the case of the addition instruction is provided.

【0076】(実施例2)図3は、各々2の補数表示の
2進表現がなされた倍精度被乗数Xと倍精度乗数Yとの
乗算を実行するための本発明の第2の実施例に係る演算
装置のブロック図である。本実施例は、乗数上位ワード
YH に基づく乗算が乗数下位ワードYL に基づく乗算の
直後に必ず実行される場合に好適な実施例である。
(Embodiment 2) FIG. 3 shows a second embodiment of the present invention for executing a multiplication of a double precision multiplicand X and a double precision multiplier Y, each of which is represented by a binary representation of 2's complement. It is a block diagram of the arithmetic unit which concerns. This embodiment is a preferred embodiment when the multiplication based on the multiplier upper word YH is always executed immediately after the multiplication based on the multiplier lower word YL.

【0077】図3中のR8は2ワード長のパイプライン
ラッチであって、図2中の乗算結果ラッチR4に相当す
るものである。図3中のR9は2ワード長の累算結果ラ
ッチであって、図2中の加算結果ラッチR7に相当する
ものである。本実施例では、図2中の第1の加算器入力
セレクタ23及び第1の加算器入力ラッチR5の配設は
省略され、累算結果ラッチR9の出力がアライナ13に
直接入力される。また、図2中の第2の加算器入力セレ
クタ24及び第2の加算器入力ラッチR6の配設は省略
され、パイプラインラッチR8の出力が加算器14に直
接入力される。パイプラインラッチイネーブル信号E8
は乗算処理部12の出力を保持するようにパイプライン
ラッチR8に、累算結果ラッチイネーブル信号E9は加
算器14の出力を保持するように累算結果ラッチR9に
各々命令デコード及び制御部41から与えられる。
R8 in FIG. 3 is a pipeline latch having a length of 2 words, and corresponds to the multiplication result latch R4 in FIG. R9 in FIG. 3 is a 2-word length accumulation result latch, and corresponds to the addition result latch R7 in FIG. In this embodiment, the arrangement of the first adder input selector 23 and the first adder input latch R5 in FIG. 2 is omitted, and the output of the accumulation result latch R9 is directly input to the aligner 13. Also, the arrangement of the second adder input selector 24 and the second adder input latch R6 in FIG. 2 is omitted, and the output of the pipeline latch R8 is directly input to the adder 14. Pipeline latch enable signal E8
Is stored in the pipeline latch R8 so as to hold the output of the multiplication processing unit 12, and the accumulation result latch R9 is held in the accumulation result latch enable signal E9 so as to hold the output of the adder 14 from the instruction decoding and control unit 41, respectively. Given.

【0078】本実施例では、被乗数ラッチR1及び乗数
ラッチR2に共通の乗算入力ラッチイネーブル信号が与
えられるのではなく、被乗数ラッチイネーブル信号E6
と乗数ラッチイネーブル信号E7とが分離されている。
また、命令デコード及び制御部41から出力される第1
のセレクタ制御信号S1は、ANDゲートを介さずに第
1のセレクタ21に直接供給される。第1のセレクタ2
1は、第1のセレクタ制御信号S1が“1”ならば乗数
MSBラッチR3の出力を、“0”ならば1ビット定数
“0”を各々選択する。
In the present embodiment, the multiplicand latch enable signal E6 is not applied to the multiplicand latch R1 and the multiplier latch R2 but the common multiplication input latch enable signal is applied.
And the multiplier latch enable signal E7 are separated.
In addition, the first instruction output from the instruction decoding and control unit 41
The selector control signal S1 of 1 is directly supplied to the first selector 21 without passing through the AND gate. First selector 2
1 selects the output of the multiplier MSB latch R3 if the first selector control signal S1 is "1" and the 1-bit constant "0" if it is "0".

【0079】その他の点は図2と同様であるので、構成
の詳細説明は省略する。
Since the other points are the same as those in FIG. 2, detailed description of the configuration will be omitted.

【0080】図3の演算装置は、2つの単精度数/倍精
度数乗算命令P,Qを順次実行することにより、倍精度
乗算結果X×Yを求める。命令Pは、符号なし2進表現
がなされた単精度被乗数XL と2の補数表示の2進表現
がなされた倍精度乗数Yとの乗算のための命令である。
命令Qは、2の補数表示の2進表現がなされた単精度被
乗数XH と前記倍精度乗数Yとの乗算のための命令であ
る。命令Pの実行により2つの積XL ×YL 及びXL ×
YH が順次求められ、命令Qの実行により2つの積XH
×YL 及びXH ×YH が順次求められる。
The arithmetic unit of FIG. 3 obtains a double precision multiplication result X × Y by sequentially executing two single precision number / double precision number multiplication instructions P and Q. The instruction P is an instruction for multiplying the single-precision multiplicand XL represented in unsigned binary representation and the double-precision multiplier Y represented in binary notation of 2's complement.
The instruction Q is an instruction for multiplying the single precision multiplicand XH expressed in binary notation of 2's complement and the double precision multiplier Y. Execution of instruction P results in two products XL × YL and XL ×
YH is sequentially obtained, and when the instruction Q is executed, two products XH
XYL and XH * YH are sequentially obtained.

【0081】図3の演算装置の動作シーケンスは、第1
の実施例と同様である。ただし、乗算XL ×YL に続く
乗算XL ×YH の実行時には、また乗算XH ×YL に続
く乗算XH ×YH の実行時には、命令デコード及び制御
部41は、被乗数ラッチイネーブル信号E6と乗数ラッ
チイネーブル信号E7とのうちの後者のみを“1”とす
る。この場合、第1の読み出しデータアドレスRA1を
記憶装置31に供給する必要はない。
The operation sequence of the arithmetic unit shown in FIG.
This is the same as the embodiment. However, at the time of executing the multiplication XL × YH subsequent to the multiplication XL × YL and at the time of executing the multiplication XH × YH subsequent to the multiplication XH × YL, the instruction decoding and control unit 41 causes the multiplicand latch enable signal E6 and the multiplier latch enable signal E7. Only the latter of and is set to "1". In this case, it is not necessary to supply the first read data address RA1 to the storage device 31.

【0082】本実施例の場合にも、第1のセレクタ21
からリコード部11へ、乗数下位ワードYL のリコード
処理時には1ビット定数“0”が、乗数上位ワードYH
のリコード処理時には乗数MSBラッチR3の出力すな
わち乗数下位ワードYL のMSBが各々供給されので、
乗数上位ワードYH と乗数下位ワードYL とが一連の符
号付き倍精度数として扱われる。また、乗算処理部12
における部分積の生成・加算にあたって、被乗数極性反
転信号C2に従い、被乗数下位ワードXL が符号なし2
進数として、被乗数上位ワードXH が2の補数表示の2
進数として各々扱われる。つまり、被乗数上位ワードX
H と被乗数下位ワードXL とが一連の符号付き倍精度数
として扱われる。したがって、本実施例の演算装置によ
っても、乗算処理部12が単精度数入力対応でありなが
ら、従来とは違って、被乗数下位ワードXL と乗数下位
ワードYL との全体を反映させた正確な倍精度乗算結果
が得られる。
Also in the case of this embodiment, the first selector 21
From the recode unit 11 to the multiplier lower word YL, the 1-bit constant “0” is stored in the multiplier upper word YH.
Since the output of the multiplier MSB latch R3, that is, the MSB of the multiplier lower word YL, is supplied during the recoding process of
The multiplier upper word YH and the multiplier lower word YL are treated as a series of signed double precision numbers. In addition, the multiplication processing unit 12
In generating / adding the partial product in, the multiplicand lower word XL is unsigned 2 according to the multiplicand polarity inversion signal C2.
As a base number, the multiplicand upper word XH is 2 in 2's complement notation.
Each is treated as a base number. That is, the multiplicand upper word X
H and the multiplicand lower word XL are treated as a series of signed double precision numbers. Therefore, according to the arithmetic unit of the present embodiment as well, although the multiplication processing unit 12 is capable of inputting a single precision number, unlike the conventional case, an accurate multiplication that reflects the whole of the multiplicand lower word XL and the multiplier lower word YL is performed. The precision multiplication result is obtained.

【0083】[0083]

【発明の効果】以上説明してきたとおり、請求項1,5
の発明によれば、乗数上位ワードYHと乗数下位ワード
YL とが一連の符号付き倍精度数として扱われるよう
に、乗数下位ワードYL のMSBを乗数上位ワードYH
の最下位2ビットのリコード処理に反映させる構成を採
用したので、乗数下位ワードYL のMSBが1であって
も、単一の単精度乗算器で正確な倍精度乗算を実行でき
るようになる。
As described above, claims 1 and 5
According to the invention, the MSB of the multiplier lower word YL is treated as a series of signed double precision numbers so that the multiplier upper word YH and the multiplier lower word YL are treated as a series of signed double precision numbers.
Since the configuration is reflected in the recoding process of the least significant 2 bits of the above, even if the MSB of the multiplier lower word YL is 1, it becomes possible to execute accurate double precision multiplication with a single single precision multiplier.

【0084】請求項2,3,6の発明によれば、被乗数
下位ワードXL を符号なし2進数として、被乗数上位ワ
ードXH を2の補数表示の2進数として各々区別して取
り扱う構成を採用したので、被乗数下位ワードXL のM
SBが1であっても、単一の単精度乗算器で正確な倍精
度乗算を実行できるようになる。
According to the second, third, and sixth aspects of the invention, the multiplicand lower word XL is treated as an unsigned binary number, and the multiplicand upper word XH is treated as a two's complement binary number. M of multiplicand lower word XL
Even if SB is 1, it becomes possible to perform accurate double precision multiplication with a single single precision multiplier.

【0085】請求項4,8の発明によれば、乗数下位ワ
ードYL に関する一連の処理が完了した時点で下位乗算
実行フラグをセットする構成を採用したので、該乗数下
位ワードYL に関する一連の処理と乗数上位ワードYH
に関する一連の処理とを分離することが可能となる。
According to the fourth and eighth aspects of the invention, since the lower multiplication execution flag is set when the series of processing for the multiplier lower word YL is completed, the series of processing for the multiplier lower word YL is Multiplier high word YH
It is possible to separate the series of processing related to.

【0086】請求項7の発明によれば、単精度乗算器で
順次求められた第1及び第2の乗算結果の加算にあたっ
て、桁合わせのために第1の乗算結果に右シフト処理を
施したうえ該右シフト処理の結果と第2の乗算結果との
倍精度加算を実行する構成を採用したので、正確な倍精
度桁合わせ加算の実行が保証される。
According to the invention of claim 7, when the first and second multiplication results sequentially obtained by the single precision multiplier are added, the first multiplication result is right-shifted for digit alignment. Moreover, since the double-precision addition of the result of the right shift processing and the second multiplication result is adopted, the execution of accurate double-precision digit alignment addition is guaranteed.

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

【図1】本発明に係る倍精度乗算実行方法における乗数
上位ワード及び乗数下位ワードのリコード処理方法を示
す説明図である。
FIG. 1 is an explanatory diagram showing a method of recoding a multiplier upper word and a multiplier lower word in a double precision multiplication executing method according to the present invention.

【図2】本発明の第1の実施例に係る演算装置のブロッ
ク図である。
FIG. 2 is a block diagram of an arithmetic unit according to the first embodiment of the present invention.

【図3】本発明の第2の実施例に係る演算装置のブロッ
ク図である。
FIG. 3 is a block diagram of an arithmetic unit according to a second embodiment of the present invention.

【図4】単一の単精度乗算器を用いた従来の倍精度乗算
実行方法を概念的に示す説明図である。
FIG. 4 is an explanatory diagram conceptually showing a conventional double-precision multiplication executing method using a single single-precision multiplier.

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

R1 被乗数ラッチ(被乗数ラッチ手段) R2 乗数ラッチ(乗数ラッチ手段) R3 乗数MSBラッチ(乗数MSBラッチ手段) R4 乗算結果ラッチ R5 第1の加算器入力ラッチ R6 第2の加算器入力ラッチ R7 加算結果ラッチ R8 パイプラインラッチ R9 累算結果ラッチ 11 リコード部(リコード手段) 12 乗算処理部(乗算手段) 13 アライナ(桁合わせ加算手段) 14 加算器(桁合わせ加算手段) 21 第1のセレクタ(選択手段) 22 第2のセレクタ 23,24 第1及び第2の加算器入力セレクタ 31 記憶装置 32,33 第1及び第2のデータバス 41 命令デコード及び制御部 42 状態レジスタ(状態レジスタ手段) 43 下位乗算実行フラグ 44 ANDゲート C1 アライナ制御信号 C2 被乗数極性反転信号 E1 乗算入力ラッチイネーブル信号 E2 乗算結果ラッチイネーブル信号 E3A 第1の加算器入力ラッチイネーブル信号 E3B 第2の加算器入力ラッチイネーブル信号 E4 加算結果ラッチイネーブル信号 E5 乗数MSBラッチイネーブル信号 E6 被乗数ラッチイネーブル信号 E7 乗数ラッチイネーブル信号 E8 パイプラインラッチイネーブル信号 E9 累算結果ラッチイネーブル信号 RA1 第1の読み出しデータアドレス RA2 第2の読み出しデータアドレス S1〜S4 第1〜第4のセレクタ制御信号 WA 書き込みデータアドレス XH 被乗数上位ワード XL 被乗数下位ワード YH 乗数上位ワード YL 乗数下位ワード R1 Multiplicand latch (multiplicand latch means) R2 Multiplier latch (multiplier latch means) R3 Multiplier MSB latch (multiplier MSB latch means) R4 Multiplication result latch R5 First adder input latch R6 Second adder input latch R7 Addition result latch R8 pipeline latch R9 accumulation result latch 11 recoding section (recoding means) 12 multiplication processing section (multiplication means) 13 aligner (digit matching addition means) 14 adder (digit matching addition means) 21 first selector (selecting means) 22 second selector 23, 24 first and second adder input selector 31 storage device 32, 33 first and second data bus 41 instruction decoding and control unit 42 status register (status register means) 43 lower multiplication execution Flag 44 AND gate C1 Aligner control signal C2 Multiplicand polarity inversion signal E1 Multiply input latch enable signal E2 Multiply result latch enable signal E3A First adder input latch enable signal E3B Second adder input latch enable signal E4 Addition result latch enable signal E5 Multiplier MSB latch enable signal E6 Multiplicand latch enable signal E7 Multiplier latch enable signal E8 Pipeline latch enable signal E9 Accumulation result latch enable signal RA1 First read data address RA2 Second read data address S1 to S4 First to fourth selector control signals WA Write data address XH Multiplicand higher Word XL Multiplicand lower word YH Multiplier upper word YL Multiplier lower word

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 単精度乗算のための各々2の補数表示の
2進数対応のリコード部と乗算処理部とを備えた演算装
置において各々2の補数表示の2進表現がなされた倍精
度被乗数と倍精度乗数との乗算を実行するための方法で
あって、 乗数下位ワードの最上位ビットを保存するステップと、 前記乗数下位ワードの表現を各桁が−2,−1,0,1
又は2の値を持つ4進SD表現に変換するように、かつ
該乗数下位ワードの最下位2ビットの処理には更なる下
位ビットとして値0を用いて、前記リコード部で乗数下
位ワードにリコード処理を施すステップと、 被乗数の1ワードと前記リコード処理が施された乗数下
位ワードとの部分積を生成し、該生成した部分積を加え
合わせることにより、前記乗算処理部で第1の乗算結果
を求めるステップと、 乗数上位ワードの表現を各桁が−2,−1,0,1又は
2の値を持つ4進SD表現に変換するように、かつ該乗
数上位ワードの最下位2ビットの処理には更なる下位ビ
ットとして前記保存された乗数下位ワードの最上位ビッ
トを用いて、前記リコード部で乗数上位ワードにリコー
ド処理を施すステップと、 前記被乗数の1ワードと前記リコード処理が施された乗
数上位ワードとの部分積を生成し、該生成した部分積を
加え合わせることにより、前記乗算処理部で第2の乗算
結果を求めるステップと、 前記第1及び第2の乗算結果の倍精度桁合わせ加算を実
行するステップとを備えたことを特徴とする倍精度乗算
実行方法。
1. A double precision multiplicand in which a binary representation of each two's complement representation is made in an arithmetic unit including a binary corresponding recoding unit of each two's complement representation for single precision multiplication and a multiplication processing unit. A method for performing a multiplication with a double precision multiplier, the method comprising: storing the most significant bits of the multiplier low word; each digit represents a representation of the multiplier low word, where each digit is -2, -1, 0, 1;
Alternatively, a value 0 is used as a further lower bit for processing the least significant 2 bits of the lower word of the multiplier so as to convert it to a quaternary SD representation having a value of 2, and the lower part of the multiplier is recoded into the lower word of the multiplier. A step of performing processing, and a partial product of one word of the multiplicand and the lower word of the multiplier subjected to the recoding processing is generated, and the generated partial products are added to each other, whereby the first multiplication result is obtained by the multiplication processing unit. To convert the representation of the multiplier upper word into a quaternary SD representation in which each digit has a value of -2, -1, 0, 1 or 2, and the least significant 2 bits of the multiplier upper word In the processing, the most significant bit of the stored lower word of the multiplier is used as a further lower bit, and a step of performing a recoding process on the upper word of the multiplier in the recoding unit; Generating a partial product with the high-order multiplier upper word and adding the generated partial products to obtain a second multiplication result in the multiplication processing unit, and the first and second And a step of executing double-precision digit-matching addition of the multiplication result.
【請求項2】 請求項1記載の倍精度乗算実行方法にお
いて、 前記第1及び第2の乗算結果を求めるステップは、被乗
数下位ワードを前記乗算処理部で例外的に符号なし2進
数として処理するステップをそれぞれ備えたことを特徴
とする倍精度乗算実行方法。
2. The double-precision multiplication execution method according to claim 1, wherein in the step of obtaining the first and second multiplication results, the multiplicand lower word is exceptionally processed as an unsigned binary number by the multiplication processing unit. A double-precision multiplication execution method, characterized in that each step is provided.
【請求項3】 請求項1記載の倍精度乗算実行方法にお
いて、 前記第1及び第2の乗算結果を求めるステップは、被乗
数上位ワードを前記乗算処理部で2の補数表示の2進数
として処理するステップをそれぞれ備えたことを特徴と
する倍精度乗算実行方法。
3. The double-precision multiplication executing method according to claim 1, wherein in the step of obtaining the first and second multiplication results, the multiplicand upper word is processed by the multiplication processing unit as a binary number represented by two's complement. A double-precision multiplication execution method, characterized in that each step is provided.
【請求項4】 請求項1記載の倍精度乗算実行方法にお
いて、 前記乗数上位ワードにリコード処理を施すステップを起
動できることを示すように、前記乗数下位ワードの最上
位ビットを保存するステップと、前記乗数下位ワードに
リコード処理を施すステップと、前記第1の乗算結果を
求めるステップとの完了時に下位乗算実行フラグをセッ
トするステップを更に備えたことを特徴とする倍精度乗
算実行方法。
4. The method of performing double-precision multiplication according to claim 1, wherein the most significant bit of the lower word of the multiplier is stored to indicate that the step of recoding the upper word of the multiplier can be activated. A double precision multiplication execution method further comprising the step of setting a lower multiplication execution flag at the completion of the step of recoding the lower word of the multiplier and the step of obtaining the first multiplication result.
【請求項5】 各々2の補数表示の2進表現がなされた
倍精度被乗数と倍精度乗数との乗算を実行するための演
算装置であって、 被乗数下位ワードと被乗数上位ワードとを選択的に保持
するための被乗数ラッチ手段と、 乗数下位ワードと乗数上位ワードとを選択的に保持する
ための乗数ラッチ手段と、 乗数下位ワードの最上位ビットを保持するための乗数M
SBラッチ手段と、 前記乗数ラッチ手段に乗数下位ワードが保持された場合
には値0を、前記乗数ラッチ手段に乗数上位ワードが保
持された場合には前記乗数MSBラッチ手段の出力を各
々選択出力するための選択手段と、 前記乗数ラッチ手段の出力の表現を各桁が−2,−1,
0,1又は2の値を持つ4進SD表現に変換するよう
に、かつ該乗数ラッチ手段の出力の最下位2ビットの処
理には更なる下位ビットとして前記選択手段の出力を用
いて、前記乗数ラッチ手段の出力にリコード処理を施す
ためのリコード手段と、 前記被乗数ラッチ手段の出力と前記リコード手段の出力
との部分積を生成し、該生成した部分積を加え合わせる
ことにより、前記乗数ラッチ手段に乗数下位ワードが保
持された場合には第1の乗算結果を求め、前記乗数ラッ
チ手段に乗数上位ワードが保持された場合には第2の乗
算結果を求めるための乗算手段と、 前記乗算手段で求められた第1及び第2の乗算結果の倍
精度桁合わせ加算を実行するための桁合わせ加算手段と
を備えたことを特徴とする演算装置。
5. An arithmetic unit for executing a multiplication of a double precision multiplicand and a double precision multiplicand, each of which is represented by a binary representation of two's complement, wherein the multiplicand lower word and the multiplicand upper word are selectively selected. A multiplicand latch means for holding, a multiplier latch means for selectively holding the multiplier lower word and the multiplier upper word, and a multiplier M for holding the most significant bit of the multiplier lower word
The SB latch means and the output of the multiplier MSB latch means are selected and output when the multiplier lower word is held in the multiplier latch means and the output of the multiplier MSB latch means is selected when the multiplier upper word is held in the multiplier latch means. For selecting the output of the multiplier latch means and each digit is -2, -1,
The output of the selecting means is used as a further lower bit for converting into a quaternary SD representation having a value of 0, 1 or 2 and for processing the least significant 2 bits of the output of the multiplier latch means, Recoding means for subjecting the output of the multiplier latch means to recoding processing, a partial product of the output of the multiplicand latch means and the output of the recoding means, and adding the generated partial products to add the multiplier latch Multiplication means for obtaining a first multiplication result when the multiplier lower word is held in the means, and second multiplication result when the multiplier upper word is held in the multiplier latch means; A digit-matching addition means for executing double-precision digit-matching addition of the first and second multiplication results obtained by the means.
【請求項6】 請求項5記載の演算装置において、 前記乗算手段は、前記被乗数ラッチ手段に被乗数下位ワ
ードが保持された場合には該被乗数下位ワードを符号な
し2進数として処理し、前記被乗数ラッチ手段に被乗数
上位ワードが保持された場合には該被乗数上位ワードを
2の補数表示の2進数として処理する機能を備えたこと
を特徴とする演算装置。
6. The arithmetic unit according to claim 5, wherein when the multiplicand latch unit holds a multiplicand lower word, the multiplying unit processes the multiplicand lower word as an unsigned binary number, and the multiplicand latch. An arithmetic unit having a function of processing a multiplicand upper word as a binary number in a two's complement representation when the multiplicand upper word is held in the means.
【請求項7】 請求項5記載の演算装置において、 前記桁合わせ加算手段は、 前記第1の乗算結果に右シフト処理を施すためのアライ
ナと、 前記右シフト処理が施された第1の乗算結果と、前記第
2の乗算結果との倍精度加算を実行するための加算器と
を備えたことを特徴とする演算装置。
7. The arithmetic unit according to claim 5, wherein the digit-matching and adding means includes an aligner for performing a right shift process on the first multiplication result, and a first multiplication after the right shift process. An arithmetic unit comprising: a result and an adder for executing a double precision addition with the second multiplication result.
【請求項8】 請求項5記載の演算装置において、 前記リコード手段による乗数上位ワードの処理を開始で
きることを示すように前記乗数下位ワードに基づく第1
の乗算結果の算出時にセットされる下位乗算実行フラグ
を格納するための状態レジスタ手段を更に備えたことを
特徴とする演算装置。
8. The arithmetic unit according to claim 5, wherein the first lower order is based on the lower multiplier word to indicate that the processing of the upper multiplier word by the recoding means can be started.
An arithmetic unit further comprising state register means for storing a lower-order multiplication execution flag which is set when the multiplication result is calculated.
JP06167577A 1994-07-20 1994-07-20 Method and arithmetic device for performing double precision multiplication Expired - Fee Related JP3096574B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP06167577A JP3096574B2 (en) 1994-07-20 1994-07-20 Method and arithmetic device for performing double precision multiplication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP06167577A JP3096574B2 (en) 1994-07-20 1994-07-20 Method and arithmetic device for performing double precision multiplication

Publications (2)

Publication Number Publication Date
JPH0830439A true JPH0830439A (en) 1996-02-02
JP3096574B2 JP3096574B2 (en) 2000-10-10

Family

ID=15852332

Family Applications (1)

Application Number Title Priority Date Filing Date
JP06167577A Expired - Fee Related JP3096574B2 (en) 1994-07-20 1994-07-20 Method and arithmetic device for performing double precision multiplication

Country Status (1)

Country Link
JP (1) JP3096574B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0890899A2 (en) * 1997-07-09 1999-01-13 Matsushita Electric Industrial Co., Ltd. Multiplication method and apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0890899A2 (en) * 1997-07-09 1999-01-13 Matsushita Electric Industrial Co., Ltd. Multiplication method and apparatus
EP0890899A3 (en) * 1997-07-09 2000-01-05 Matsushita Electric Industrial Co., Ltd. Multiplication method and apparatus
US6233597B1 (en) 1997-07-09 2001-05-15 Matsushita Electric Industrial Co., Ltd. Computing apparatus for double-precision multiplication
EP0890899B1 (en) * 1997-07-09 2004-02-04 Matsushita Electric Industrial Co., Ltd. Multiplication method and apparatus

Also Published As

Publication number Publication date
JP3096574B2 (en) 2000-10-10

Similar Documents

Publication Publication Date Title
US6564239B2 (en) Computer method and apparatus for division and square root operations using signed digit
EP1293891B2 (en) Arithmetic processor accomodating different finite field size
JP3605181B2 (en) Data processing using multiply-accumulate instructions
US5991785A (en) Determining an extremum value and its index in an array using a dual-accumulation processor
JP7096828B2 (en) Devices and methods for processing input operand values
US5426600A (en) Double precision division circuit and method for digital signal processor
JP2002108606A (en) Sticky bit generating circuit and multiplier
US5132925A (en) Radix-16 divider using overlapped quotient bit selection and concurrent quotient rounding and correction
JP2001524698A (en) Device for multi-precision integer arithmetic
US5023827A (en) Radix-16 divider using overlapped quotient bit selection and concurrent quotient rounding and correction
US6728744B2 (en) Wide word multiplier using booth encoding
JP2006146644A (en) Processor
JPH0844540A (en) Parallel multiplication logic circuit
JPH07271556A (en) Apparatus and method for electronic multiplication and addition
US5734599A (en) Performing a population count using multiplication
JPS6227412B2 (en)
JP3096574B2 (en) Method and arithmetic device for performing double precision multiplication
US5912904A (en) Method for the production of an error correction parameter associated with the implementation of modular operations according to the Montgomery method
US8219604B2 (en) System and method for providing a double adder for decimal floating point operations
JP3336986B2 (en) Signal processor and multiply-accumulate unit with rounding function used therefor
JP2508286B2 (en) Square root calculator
JPH04314126A (en) Inverse number generating device
JPWO2002029546A1 (en) Arithmetic unit and electronic circuit device using the same
WO2023220537A1 (en) Simple and linear fast adder
JPH0833815B2 (en) High digit multiplier

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000725

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

Free format text: PAYMENT UNTIL: 20070804

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20080804

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20080804

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090804

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090804

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100804

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110804

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20110804

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20120804

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees