JPH03256117A - Multiplier - Google Patents

Multiplier

Info

Publication number
JPH03256117A
JPH03256117A JP2053791A JP5379190A JPH03256117A JP H03256117 A JPH03256117 A JP H03256117A JP 2053791 A JP2053791 A JP 2053791A JP 5379190 A JP5379190 A JP 5379190A JP H03256117 A JPH03256117 A JP H03256117A
Authority
JP
Japan
Prior art keywords
multiplier
multiplication
register
multiplicand
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2053791A
Other languages
Japanese (ja)
Inventor
Sukehiro Ootsuka
大塚 左洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2053791A priority Critical patent/JPH03256117A/en
Publication of JPH03256117A publication Critical patent/JPH03256117A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the quantity of hardware and to shorten a delay time by dividing multiplication into several steps by a reduced instruction set computer architecture, and executing the multiplication of each step by the same circuit. CONSTITUTION:A multiplication multiplier part instructing means 5 partitions off a multiplier into plural continuous bit parts in order to divide multiplication into plural steps and specifies which bit part out of plural ones is to be multiplied by a multiplicand. The sum of a product of a multiplicand stored in a multiplicand register 1 and one of plural bit parts of a multiplier stored in a multiplier register 2 and a part not defined as a multiplied result out of the contents of a multiplied result storing register 3 is shifted in accordance with a specification outputted from a multiplication multiplier part instructing means 5 and the shifted result is stored in the register 3. The step is repeatedly executed from the lower bit side of the plural bit parts of the multiplication to reduce quantity of hardware and to shorten the delay time.

Description

【発明の詳細な説明】 〔概   要〕 整数演算器における乗算を命令の機能を縮小したRIS
C(リデュースドインストラクションセントコンピュー
タ)アーキテクチャで実行する乗算器に関し、 RISCアーキテクチャにより乗算を何ステップかに分
割し、それぞれのステップの乗算を同一の回路で実行す
ることによってハードウェア量を削減し、遅延時間を小
さくすることを目的とし、被乗数レジスタ、乗数レジス
タ、および乗算結果保持レジスタを有する乗算器におい
て、乗算を複数のステップに分割するために乗数を複数
の連続するビット部分に区分し、該複数のビット部分の
うちどの部分と被乗数とを乗算しているかを示す乗算乗
数部分指示手段を設け、前記被乗数レジスタ内の被乗数
と前記乗数レジスタ内の乗数の前記複数のビット部分の
1つとの積と、乗算結果保持レジスタの内容のうち乗算
結果として確定されていない部分との和を該乗算乗数部
分指示手段の指示に従ってシフトした結果を該乗算結果
保持レジスタに格納するステップを前記乗数の複数のビ
ット部分の下位ビット側から繰り返すように構成する。
[Detailed Description of the Invention] [Summary] RIS with reduced instruction function for multiplication in an integer arithmetic unit
Regarding multipliers that run on the C (Reduced Instruction Cent Computer) architecture, the RISC architecture divides multiplication into several steps and executes each step of multiplication in the same circuit, reducing the amount of hardware and reducing delays. For the purpose of reducing time, in a multiplier having a multiplicand register, a multiplier register, and a multiplication result holding register, the multiplier is partitioned into a plurality of consecutive bit parts in order to divide the multiplication into a plurality of steps. a multiplier part indicating means for indicating which part of the bit parts of the multiplicand is being multiplied by the multiplicand, the product of the multiplicand in the multiplicand register and one of the plurality of bit parts of the multiplier in the multiplier register; , the step of storing the result of shifting the sum of the contents of the multiplication result holding register with a portion that has not been determined as the multiplication result in accordance with the instructions of the multiplication multiplier part indicating means in the multiplication result holding register; It is configured to repeat from the lower bit side of the part.

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

本発明は計算機による乗算方式に係り、さらに詳しくは
整数演算器における乗算を命令の機能を縮小したtSC
(リデュースドインストラクションセントコンピュータ
)アーキテクチャで実行する乗算器に関する。
The present invention relates to a multiplication method by a computer, and more specifically, the present invention relates to a multiplication method by a computer, and more particularly, the present invention relates to a multiplication method using an integer arithmetic unit using a tSC with reduced instruction functions.
(reduced instruction cent computer) architecture.

〔従来の技術及び発明が解決しようとする課題〕近年計
算機の性能向上のために演算器の処理速度の高速化とハ
ードウェアの削減が要求されている。従来の乗算器にお
ける最も単純な乗算方式としては、nビットの2進数の
乗算を行うに際して被乗数の各ビットと乗数の各ビット
とを乗算し、合計n2個の1ビツト部分積を発生させ、
これらの部分積を桁が合うようにシフトして加算し、積
を得るという方法を用いていた。しかしながら、この方
法では部分積の数が多く、全ての部分積をシフトして加
算するためには膨大なハードウェア量を必要とし、また
結果を得るまでに大きな遅延時間を生ずるという問題点
があった。
[Prior Art and Problems to be Solved by the Invention] In recent years, in order to improve the performance of computers, it has been required to increase the processing speed of arithmetic units and reduce the amount of hardware. The simplest multiplication method in a conventional multiplier is to multiply n-bit binary numbers by multiplying each bit of the multiplicand by each bit of the multiplier to generate a total of n2 1-bit partial products.
The method used was to shift these partial products so that the digits matched and add them to obtain the product. However, this method has the problem that there are a large number of partial products, a huge amount of hardware is required to shift and add all the partial products, and there is a large delay time before obtaining the results. Ta.

従ってこのような単純な形式に対して各種の工夫が施さ
れた回路が用いられているが、その1つの代表的な方法
はBoothのアルゴリズムとWallaceのトリー
とを組み合せた乗算回路である。Boo thのアルゴ
リズムは偶数ビットの乗数を2ビツトずつの組に分割し
、部分積の個数を半分にする方法であって、各部分積を
作る倍数は0.±1.±2倍となり、シフト回路とイン
バータだけで回路を構成することができる。また乗数の
符号ビットを含んだ形になっているために部分積の加算
の中に符号ビットの処理が含まれており、補正の計算を
必要としないという特徴がある。
Therefore, circuits with various improvements are used for such a simple format, and one typical method is a multiplication circuit that combines Booth's algorithm and Wallace's tree. Booth's algorithm divides the even-bit multiplier into groups of 2 bits each, halving the number of partial products, and the multiple used to create each partial product is 0. ±1. ±2 times, and the circuit can be configured with only a shift circuit and an inverter. Furthermore, since the form includes the sign bit of the multiplier, processing of the sign bit is included in the addition of partial products, and there is no need for correction calculation.

またWallaceのトリーは、部分積の加算段数を減
らすために連続的に1個ずつ加算せず、加算回路をトリ
ー状に積み上げるものである。このトリーでは全加算回
路を3人力2出力の加算回路と考え、これを組み合せて
複数項の人力を加算して項数を減らしていくという方法
が取られる。BoothのアルゴリズムとWallac
eのトリーとを組み合せた場合には、最終段に桁上伝播
加算回路が使用される。
Furthermore, in Wallace's tree, in order to reduce the number of partial product addition stages, adding circuits are piled up in a tree shape instead of adding them one by one successively. In this tree, the full adder circuit is considered to be an adder circuit with three human inputs and two outputs, and a method is used in which the total adder circuit is combined and the human input of multiple terms is added to reduce the number of terms. Booth's algorithm and Wallac
When combining with a tree of e, a carry propagation adder circuit is used in the final stage.

しかしながら、このようにBoo thのアルゴリズム
とWallaceのトリーとを組み合わせた乗算回路で
も、乗数と被乗数のビット数が多くなると積を計算する
ためのハードウェア量は膨大となり、また遅延時間が大
きくなるという問題点の解決には有効ではない。
However, even in a multiplication circuit that combines Booth's algorithm and Wallace's tree, as the number of bits in the multiplier and multiplicand increases, the amount of hardware required to calculate the product becomes enormous, and the delay time increases. It is not effective in solving problems.

本発明は、RISCアーキテクチャにより乗算を何ステ
ップかに分割し、それぞれのステップの乗算を同一の回
路で実行することによってハードウェア量を削減し、遅
延時間を小さくすることを目的とする。
The present invention aims to reduce the amount of hardware and delay time by dividing multiplication into several steps using the RISC architecture and executing the multiplication in each step in the same circuit.

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

第1図は本発明の原理ブロック図である。同図において
被乗数レジスタ1ば被乗数を、乗数レジスタ2は乗数を
保持し、また乗算結果保持レジスタ3は乗算結果を保持
するものである。乗算器4は例えばBoo thのデコ
ーダとIAa 11aceのトリーとを用いた乗算器で
ある。
FIG. 1 is a block diagram of the principle of the present invention. In the figure, multiplicand register 1 holds the multiplicand, multiplier register 2 holds the multiplier, and multiplication result holding register 3 holds the multiplication result. The multiplier 4 is a multiplier using, for example, a Booth decoder and an IAa 11ace tree.

乗算乗数部分指示手段5は、乗算を複数のステップに分
割するために、複数の連続するビット部分に分割された
乗数のうちでどのビット部分と被乗数とを乗算している
かを示すものである。例えば乗数と被乗数とがそれぞれ
4バイトである場合には、乗数が1バイトずつに分割さ
れ、被乗数4バイトと乗数のうちの1バイトとの乗算が
計4回、すなわち4ステップ行わ、れるが、乗算乗数部
分指示手段5は乗数のうちのどのバイトと被乗数とが乗
算されているかを示すことになる。
The multiplication multiplier part indicating means 5 indicates which bit part of the multiplier divided into a plurality of consecutive bit parts is to be multiplied by the multiplicand in order to divide the multiplication into a plurality of steps. For example, when the multiplier and the multiplicand are each 4 bytes, the multiplier is divided into 1 byte each, and the 4 bytes of the multiplicand and 1 byte of the multiplier are multiplied 4 times in total, that is, in 4 steps. The multiplication part indicating means 5 indicates which byte of the multiplier is multiplied by the multiplicand.

〔作   用〕[For production]

本発明においては乗算が複数のステップに分割されて実
行される。例えば4バイト×4バイトの乗算を実行する
ためには、4バイト×1バイトの乗算が4回繰り返され
る。すなわち、例えば被乗数レジスタ1内の被乗数4バ
イトと乗数レジスタ2内の乗数の1バイトとの積と乗算
結果保持レジスタ3の内容のうちで乗算結果として確定
されていない部分とが加算され、乗算乗数部分指示手段
5の指示に従ってそれがシフトされた結果が再び乗算結
果保持レジスタ3に格納されるが、この動作が乗数の下
位ビット側から、例えば乗数の最下位バイトから開始さ
れて乗数の最上位バイトと被乗数との積が取られるまで
繰り返される。乗数の最下位バイトと被乗数との積が取
られるステップでは乗算結果保持レジスタ3の内容はク
リア状態(0)であり、またその積はシフトされること
なく乗算結果保持レジスタ3に格納され、その最下位1
バイトは乗算結果として確定される。次に乗数の下位側
から2バイト目と被乗数との積は乗算結果保持レジスタ
3の内容のうち確定された最下位1バイトを除く部分と
加算され、乗算乗数部分指示手段5の指示に従って8ビ
ツトシフトされて乗算結果保持レジスタ3に格納される
In the present invention, multiplication is divided into multiple steps and executed. For example, to perform a 4 byte x 4 byte multiplication, the 4 byte x 1 byte multiplication is repeated four times. That is, for example, the product of 4 bytes of the multiplicand in the multiplicand register 1 and 1 byte of the multiplier in the multiplier register 2 and the part of the contents of the multiplication result holding register 3 that is not determined as the multiplication result are added, and the multiplier is obtained. The result of shifting according to the instruction from the partial instruction means 5 is stored again in the multiplication result holding register 3, but this operation starts from the lower bit side of the multiplier, for example, from the least significant byte of the multiplier, and then from the most significant byte of the multiplier. Iterates until the byte is multiplied by the multiplicand. At the step where the lowest byte of the multiplier and the multiplicand are multiplied, the contents of the multiplication result holding register 3 are in a clear state (0), and the product is stored in the multiplication result holding register 3 without being shifted. bottom 1
The bytes are determined as the result of the multiplication. Next, the product of the second byte from the least significant side of the multiplier and the multiplicand is added to the content of the multiplication result holding register 3 excluding the determined lowest 1 byte, and shifted by 8 bits according to the instruction of the multiplication multiplier portion instruction means 5. and stored in the multiplication result holding register 3.

以上のように、本発明においては乗算が複数のステップ
に分割され同一の回路で実行されることになる。なお本
発明では乗算乗数部分指示手段5は特に独立のハードウ
ェアとしては設けられず、乗数レジスタ2の中でデータ
が不要になったビットを用いてその作用が行われる。
As described above, in the present invention, multiplication is divided into multiple steps and executed by the same circuit. Incidentally, in the present invention, the multiplication/multiplier portion instruction means 5 is not particularly provided as independent hardware, and its function is performed using bits whose data is no longer needed in the multiplier register 2.

〔実  施  例〕〔Example〕

本発明の実施例として、乗数4ハイドと被乗数4バイト
との整数乗算を4つのステップに分割し、各ステップで
は4ハイド×1バイトの乗算を行って4つのステップに
よって最終的な積を求める場合を考える。被乗数4ハイ
ドをabcd、乗数4バイトをefgh(a−hはそれ
ぞれ1バイトのデータとする)とし、第1ステツプでは
被乗数4バイトと乗数の最下位バイトとの積、すなわち
abcdXhが実行される。この演算によって生成され
た40ビツト (32ビツト×8ビツト)のSumとC
arryとがCPA (桁上伝播加算回路)の人力とさ
れ、40ビツトの部分積が生成されてその結果は部分積
レジスタ(PD−reg)に格納される。
As an embodiment of the present invention, integer multiplication of 4 hides multiplier and 4 bytes multiplicand is divided into 4 steps, and in each step, multiplication of 4 hides x 1 byte is performed to obtain the final product in 4 steps. think of. Assuming that the multiplicand 4 bytes is abcd and the multiplicand 4 bytes is efgh (each of ah is 1 byte of data), the product of the 4 bytes of the multiplicand and the least significant byte of the multiplier, that is, abcdXh, is executed in the first step. The 40-bit (32 bits x 8 bits) Sum and C generated by this operation
40-bit partial product is generated and the result is stored in the partial product register (PD-reg).

そして次のステップに備えて乗数レジスタの内容が1ハ
イド右シフトされる。
The contents of the multiplier register are then right-shifted by one hide in preparation for the next step.

第2図は第1ステツプ終了後の乗数レジスタの内容の実
施例である。同図において、最上位1バイトは不要とな
るので、このハイドは第2ステツプ以後のステップで生
成される部分積を部分積レジスタに格納する際に必要な
シフト数の制御に使用される。
FIG. 2 is an example of the contents of the multiplier register after the first step. In the figure, since the most significant byte is unnecessary, this hide is used to control the number of shifts required when storing partial products generated in the second and subsequent steps in the partial product register.

第2ステツプでは、第1ステツプと同様に被乗数4バイ
トと乗数のうち下位側から2バイト目の1バイトとの積
(abcdXg)が実行される。
In the second step, as in the first step, the product (abcdXg) of the 4 bytes of the multiplicand and the 1 byte of the second byte from the lowest order of the multiplier is executed.

そして桁上伝播加算回路の出力が後述するように乗数レ
ジスタの最上位2ビツトを用いて作られる4進カウンタ
の内容に従って1バイト左シフトされ、部分積レジスタ
に格納された後に乗数レジスタの内容が更に1ハイド右
シフトされる。第3ステツプではabcdxfの乗算が
、また第4ステツプではabcdXeの乗算が第2ステ
ツプと同様にして実行され、桁上伝播加算回路の出力が
1バイト左シフトして部分積レジスタに格納され、また
乗数レジスタの内容が1バイト右シフトされる。
Then, the output of the carry propagation adder circuit is shifted to the left by 1 byte according to the contents of a quaternary counter created using the most significant two bits of the multiplier register, as described later, and stored in the partial product register, after which the contents of the multiplier register are It is further shifted to the right by one hide. In the third step, multiplication by abcdxf is performed, and in the fourth step, multiplication by abcdXe is performed in the same manner as in the second step, and the output of the carry propagation adder circuit is shifted to the left by one byte and stored in the partial product register. The contents of the multiplier register are shifted right by one byte.

第3図は本発明の乗算器の全体構成ブロック図である。FIG. 3 is a block diagram of the overall configuration of the multiplier of the present invention.

同図において乗算器は乗数レジスタ11を含むBoot
hのデコーダ10、被乗数レジスタ12 、Booth
のアルゴリズムに従って部分積を求めるために必要なイ
ンバータ13、および1ビツトシフト回路14 a、 
 14 b、 BoothのデコーダIOの出力に応じ
て被乗数レジスタ12、インバータ13および1ビツト
シフト回路14a、14bのいずれかの出力を選択する
ためのセレクタ15a 〜15 e 、 Wallac
eのトリー16、桁上伝播加算回路(CPA)17、お
よび部分積レジスタ(PD−reg)13から構成され
ている。
In the same figure, the multiplier is Boot which includes multiplier register 11.
h decoder 10, multiplicand register 12, Booth
Inverter 13 and 1-bit shift circuit 14a, which are necessary to obtain partial products according to the algorithm of
Selectors 15a to 15e, Wallac for selecting the output of the multiplicand register 12, inverter 13, and 1-bit shift circuits 14a, 14b according to the output of the decoder IO of Booth 14b.
e tree 16, a carry propagation adder (CPA) 17, and a partial product register (PD-reg) 13.

第4図は複数のステップに分割された乗算の各ステップ
における部分積レジスタの生成の実施例である。本発明
においては、例えば4バイト×10 ハイドの乗算ステップが4回繰り返され、最終的に4ハ
イド×4バイトの積が得られるが、1つのステップにお
ける部分積は40ビツトとなり、その部分積は部分積レ
ジスタ(PD=reg)に格納される。1回のステップ
では部分積40ビツトのうちの下位8ビツトが確定され
る。本発明では4回のステップのうち最初のステップを
mulsp  (マルチプライステッププロローグ)、
第2から第4のステップをmuls  (マルチプライ
スチップ)と名付ける 第4図において、Wallaceのトリーでは前のステ
ップで生成された部分積レジスタの内容(最初のステッ
プmulspではクリア状態)のうち確定された8ビツ
トを除<32ビツトと、Boothのデコーダにおいて
乗数の1バイトと拡張された符号ビットを含む計lOビ
ットが2ビツトずつの組に区切られ、各2ビツトの組と
下位の組の上位ビットの合計3ビツトのビットパターン
で決定される出力に応じたセレクタ15a〜15eの出
力結果、すなわち各33ビツトのPa−Pdと32ビツ
トのPeの6つのデータが図に示すように左シフトされ
て加算される。生成された40ビツトの部分積は、前の
ステップにおける部分積レジスタへの格納位置から8ビ
ツト左シフトされた位置に格納され、そのうちの下位8
ビツトは確定されることになる。
FIG. 4 is an example of generation of partial product registers in each step of multiplication divided into a plurality of steps. In the present invention, for example, the multiplication step of 4 bytes x 10 hides is repeated 4 times to finally obtain a product of 4 hides x 4 bytes, but the partial product in one step is 40 bits, and the partial product is It is stored in the partial product register (PD=reg). In one step, the lower 8 bits of the 40 bits of the partial product are determined. In the present invention, the first step of the four steps is mulsp (multiply step prologue),
In Figure 4, where the second to fourth steps are named muls (multi-priced chip), Wallace's tree determines the contents of the partial product register (cleared in the first step mulsp) generated in the previous step. In the Booth decoder, a total of 10 bits, including the 8 bits except < 32 bits, the 1 byte of the multiplier and the extended sign bit, are divided into groups of 2 bits, each 2-bit group and the upper half of the lower group. The output results of the selectors 15a to 15e according to the output determined by the bit pattern of a total of 3 bits, that is, 6 data of 33 bits Pa-Pd and 32 bits Pe, are shifted to the left as shown in the figure. will be added. The generated 40-bit partial product is stored in a position shifted to the left by 8 bits from the storage position in the partial product register in the previous step, and the lower 8
The bit will be confirmed.

第5図は部分積レジスタの実施例の構成を示す。FIG. 5 shows the structure of an embodiment of the partial product register.

同図において部分積レジスタ(PD−reg)は、4バ
イト×4バイトの乗算を行って、その結果を格納するた
めに64ビツト必要であり、下位32ビツトのPDL−
regと上位32ビツトのPDU−reg)とから構成
される。
In the figure, the partial product register (PD-reg) requires 64 bits to perform multiplication of 4 bytes x 4 bytes and store the result, and the PDL-reg of the lower 32 bits is
reg and the upper 32 bits of PDU-reg).

第6図は部分積レジスタへの部分積の格納方法の実施例
である。同図において、最初のステップmulspでは
部分積はそのままシフトされることなく部分積レジスタ
に格納され、そのうち下位8ビツトが確定される。第2
のステップmulsでは部分積40ビツトが8ビツト左
シフトされて部分積レジスタに格納され、そのうち最下
位8ビツトが確定される。第3のステップmulsでも
同様に40ビツトの部分積がさらに8ビツト左シフトさ
れて格納さ1 2 れ、そのうち最下位8ビツトが確定される。最後のステ
ップmulsでは部分積40ビツトがさらに8ビツト左
シフトされて部分積レジスタに格納され、その内容は最
終結果の一部となる。
FIG. 6 is an example of a method of storing partial products in a partial product register. In the figure, in the first step mulsp, the partial products are stored as they are in the partial product register without being shifted, and the lower 8 bits of them are determined. Second
In step muls, the 40 bits of the partial product are shifted to the left by 8 bits and stored in the partial product register, of which the least significant 8 bits are determined. Similarly, in the third step muls, the 40-bit partial product is further shifted to the left by 8 bits and stored 1 2 , of which the least significant 8 bits are determined. In the final step muls, the 40-bit partial product is further shifted to the left by 8 bits and stored in the partial product register, the contents of which become part of the final result.

第6図に示すように、各ステップにおける4バイト×1
バイトの部分積は、部分積レジスタに格納される際にそ
のステップに応して必要なビット数だけ左シフトされて
格納される。何ビット(バイト)シフトして格納するか
を制御するために、第3図の乗数レジスタ11 (実際
には第2図に示したように4バイトの容量がある)の最
上位2ビツトを用いて4進カウンタが作成される。本実
施例においてはmuls命令が3回繰り返されるが、例
えば割り込みが発生した場合でもこれによって何回目の
muls命令を実行中であったかを知ることができる。
As shown in Figure 6, 4 bytes x 1 in each step
When the partial product of a byte is stored in the partial product register, it is shifted to the left by the number of bits required according to the step and then stored. In order to control how many bits (bytes) to shift and store, the two most significant bits of the multiplier register 11 in Figure 3 (actually has a capacity of 4 bytes as shown in Figure 2) are used. A quaternary counter is created. In this embodiment, the muls instruction is repeated three times, but even if an interrupt occurs, for example, it is possible to know how many times the muls instruction is being executed.

第7図は乗数(MP)レジスタの最上位2ビツトを用い
て作られる4進カウンタの内容の実施例である。同図に
おいてMP (0)、MP (1)は前のステップにお
けるMPレジスタの最上位2ビツトの内容を、またbi
to、bitlは現在のステップにおけるMPレジスタ
の最上位2ビツトの内容を示す。同図において各ステッ
プにおける4進カウンタの内容bitoとbitlは次
式によって決定される。
FIG. 7 is an example of the contents of a quaternary counter created using the two most significant bits of the multiplier (MP) register. In the same figure, MP (0) and MP (1) are the contents of the most significant 2 bits of the MP register in the previous step, and
to and bitl indicate the contents of the most significant two bits of the MP register at the current step. In the figure, the contents bito and bitl of the quaternary counter at each step are determined by the following equation.

b i t O= (MP (0)→−MP (1))
  ・丁丁bitl=内丁TTT−丁丁 ここで、SPとしてmulsp命令の時に制御信号の1
が人力され、SPはmulsp命令以外の命令を実行し
ているということを意味している。
b it O= (MP (0)→-MP (1))
・Ding bitl=Inner TTT−Ding Here, when the SP is the mulsp command, the control signal 1
This means that the SP is executed manually and the SP executes an instruction other than the mulsp instruction.

第8図は各ステップにおける4進カウンタの内容の設定
法の実施例である。同図において最初のステップ、すな
わちmulsp命令においてはSPの値は1であり、ま
たMP (0)およびMP (1)は共にクリア状態の
値Oを用いるものとしてbito、bitlO値は共に
Oとなり、例えばこの命令の最後にこれらの値が乗数レ
ジスタの最上位2ビツトに格納される。第2ステツプ以
降のmuls命令においてはSPの値はOとされ、それ
ぞれ前のステップにおけるbito、bitlの値と一
部3 4 致するMP (0)、MP (1)の値を用いて4進カ
ウンクの内容が設定される。
FIG. 8 shows an example of a method for setting the contents of a quaternary counter in each step. In the same figure, in the first step, that is, in the mulsp instruction, the value of SP is 1, and the value O in the clear state is used for both MP (0) and MP (1), and the bito and bitlO values are both O, For example, at the end of this instruction, these values are stored in the two most significant bits of the multiplier register. In the muls instruction after the second step, the value of SP is set to O, and the values of MP (0) and MP (1), which partially match the values of bito and bitl in the previous step, are used to calculate The count contents are set.

〔発明の効果〕 以上詳細に説明したように、本発明によれば乗算が複数
のステップに分割されて同一の回路で実行されるために
、乗算器のハードウェアが大幅に削減される。また演算
の実行が小さなりロックサイクルで可能となり、遅延時
間を短くすることができる。さらに新たなハードウェア
を増設することなく、部分積レジスタへの部分積の格納
位置を制御することが可能となる。
[Effects of the Invention] As described above in detail, according to the present invention, multiplication is divided into a plurality of steps and executed by the same circuit, so that the hardware of the multiplier can be significantly reduced. In addition, calculations can be executed in a small lock cycle, and the delay time can be shortened. Furthermore, it becomes possible to control the storage position of partial products in the partial product register without adding new hardware.

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

第1図は本発明の原理ブロック図、 第2図は第1ステツプ終了後の乗数レジスタの内容の実
施例を示す図、 第3図は乗算器の実施例の全体構成を示すブロック図、 第4図は各ステップにおける部分積の生成法の実施例を
示す図、 第5図は部分積レジスタの構成の実施例を示す図、 第6図は部分積の格納方法の実施例を示す図、第7図ば
4進カウンタの内容の実施例を示す図、第8図ば4進カ
ウンクの内容の設定法の実施例を示す図である。 10− ・・Boothのデコーダ、 11・・・乗数(MP)レジスタ、 12・・・被乗数レジスタ、 t3・・・インバータ、 14a、14b・・・1ビツトシフト回路、15a〜1
5e・・・セレクタ、 16・・・Wallaceのトリー 17・・・桁上伝播加算回路(CPA)、18・・・部
分積レジスタ(PD−reg)。
Fig. 1 is a block diagram of the principle of the present invention; Fig. 2 is a diagram showing an embodiment of the contents of the multiplier register after the first step; Fig. 3 is a block diagram showing the overall configuration of the embodiment of the multiplier; FIG. 4 is a diagram showing an example of a partial product generation method in each step, FIG. 5 is a diagram showing an example of the structure of a partial product register, and FIG. 6 is a diagram showing an example of a partial product storage method. FIG. 7 is a diagram showing an example of the contents of a quaternary counter, and FIG. 8 is a diagram showing an example of a method for setting the contents of a quaternary count. 10-... Booth decoder, 11... Multiplier (MP) register, 12... Multiplicand register, t3... Inverter, 14a, 14b... 1-bit shift circuit, 15a-1
5e... Selector, 16... Wallace tree 17... Carry propagation adder circuit (CPA), 18... Partial product register (PD-reg).

Claims (1)

【特許請求の範囲】 被乗数レジスタ(1)、乗数レジスタ(2)、および乗
算結果保持レジスタ(3)を有する乗算器(4)におい
て、 乗算を複数のステップに分割するために乗数を複数の連
続するビット部分に区分し、該複数のビット部分のうち
どの部分と被乗数とを乗算しているかを示す乗算乗数部
分指示手段(5)を設け、前記被乗数レジスタ(1)内
の被乗数と前記乗数レジスタ(2)内の乗数の前記複数
のビット部分の1つとの積と、乗算結果保持レジスタ(
3)の内容のうち乗算結果として確定されていない部分
との和を該乗算乗数部分指示手段(5)の指示に従って
シフトした結果を該乗算結果保持レジスタ(3)に格納
するステップを前記乗数の複数のビット部分の下位ビッ
ト側から繰り返すことを特徴とする乗算器。
[Claims] In a multiplier (4) having a multiplicand register (1), a multiplier register (2), and a multiplication result holding register (3), the multiplier is divided into a plurality of successive steps in order to divide the multiplication into a plurality of steps. a multiplier part indicating means (5) for indicating which part of the plurality of bit parts is multiplied by the multiplicand; The product of the multiplier in (2) with one of the plurality of bit parts and the multiplication result holding register (
The step of storing the result of shifting the sum of the contents of 3) with the part that is not determined as the multiplication result in accordance with the instruction of the multiplication multiplier part instruction means (5) in the multiplication result holding register (3) A multiplier characterized in that iterates from the lower bit side of a plurality of bit parts.
JP2053791A 1990-03-07 1990-03-07 Multiplier Pending JPH03256117A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2053791A JPH03256117A (en) 1990-03-07 1990-03-07 Multiplier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2053791A JPH03256117A (en) 1990-03-07 1990-03-07 Multiplier

Publications (1)

Publication Number Publication Date
JPH03256117A true JPH03256117A (en) 1991-11-14

Family

ID=12952641

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2053791A Pending JPH03256117A (en) 1990-03-07 1990-03-07 Multiplier

Country Status (1)

Country Link
JP (1) JPH03256117A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844540A (en) * 1994-07-15 1996-02-16 Sgs Thomson Microelectron Sa Parallel multiplication logic circuit

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6083140A (en) * 1983-10-14 1985-05-11 Hitachi Ltd Multiplication system
JPS60144826A (en) * 1984-01-05 1985-07-31 Nec Corp Arithmetic processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6083140A (en) * 1983-10-14 1985-05-11 Hitachi Ltd Multiplication system
JPS60144826A (en) * 1984-01-05 1985-07-31 Nec Corp Arithmetic processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844540A (en) * 1994-07-15 1996-02-16 Sgs Thomson Microelectron Sa Parallel multiplication logic circuit

Similar Documents

Publication Publication Date Title
US6735611B2 (en) Arithmetic processor
US5790446A (en) Floating point multiplier with reduced critical paths using delay matching techniques
US5506799A (en) Booth array multiplying circuit having carry correction
JPH1195981A (en) Multiplication circuit
JPS6217770B2 (en)
JPH07210369A (en) Circuit and method for execution of parallel addition and average operation
JP3139466B2 (en) Multiplier and product-sum operator
JP3516503B2 (en) Electronic multiplication and addition apparatus and method
JPS6375932A (en) Digital multiplier
US20140136588A1 (en) Method and apparatus for multiplying binary operands
JPH0831025B2 (en) Multiplication circuit
US4796219A (en) Serial two&#39;s complement multiplier
US5721697A (en) Performing tree additions via multiplication
GB2262637A (en) Padding scheme for optimized multiplication.
US4843585A (en) Pipelineable structure for efficient multiplication and accumulation operations
US4190894A (en) High speed parallel multiplication apparatus with single-step summand reduction
JP3660075B2 (en) Dividing device
US5912904A (en) Method for the production of an error correction parameter associated with the implementation of modular operations according to the Montgomery method
JP2022101472A (en) Systems and methods for low latency modular multiplication
JPH03256117A (en) Multiplier
JP3227538B2 (en) Binary integer multiplier
US7167885B2 (en) Emod a fast modulus calculation for computer systems
JPH05197525A (en) Method and circuit for negating operand
JPS6259828B2 (en)
KR100386979B1 (en) Method of paralleling bit serial multiplier for Galois field and a bit serial-parallel multipiler using thereof