JP3695561B2 - Accumulator - Google Patents

Accumulator Download PDF

Info

Publication number
JP3695561B2
JP3695561B2 JP16001997A JP16001997A JP3695561B2 JP 3695561 B2 JP3695561 B2 JP 3695561B2 JP 16001997 A JP16001997 A JP 16001997A JP 16001997 A JP16001997 A JP 16001997A JP 3695561 B2 JP3695561 B2 JP 3695561B2
Authority
JP
Japan
Prior art keywords
sum
product
multiplier
data
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP16001997A
Other languages
Japanese (ja)
Other versions
JPH117439A (en
Inventor
登 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP16001997A priority Critical patent/JP3695561B2/en
Publication of JPH117439A publication Critical patent/JPH117439A/en
Application granted granted Critical
Publication of JP3695561B2 publication Critical patent/JP3695561B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は積和器に関し、高速の積和処理を行う積和器に関する。
近年、DSP(Digital Signal Processor) が幅広い分野で適用されている。
DSPは信号処理演算によく現われる積和処理を高速に実行することが求められており、このため、DSP内で積和処理を実行する積和器の高速動作が要望されている。
【0002】
【従来の技術】
図7は並列乗算器の構成図を示す。同図中、乗算器10は入力A,Bの部分積を作り、その部分積を加算して乗算結果を得ている。部分積の加算はキャリの伝播の発生しないように考慮されたツリー状の構成の加算器回路(ワレサのツリー)によって行われる。具体的には部分積を半加算していき、ビット数をしぼりこんでいく。
【0003】
例えば部分積の生成にBoothのアルゴリズムを用いれば16ビット×16ビット乗算の場合、部分積は16×8ビット発生する。この128ビット(16×8)を3入力2出力の半加算器により各桁を計算することで最終的には2つ(サム,キャリー)のデータが得られる。この2つのデータをキャリ伝播のある全加算器12で加算することで最終結果が得られる。
【0004】
この乗算器を使用して積和器も作られる。積和器はΣAi・Biのように乗算結果を加算し続けるように構成される。図8に積和器の構成図を示す。積和器は乗算器とほぼ同じ構成をとるが、乗算器14の乗算結果がサム(S),キャリー(C)にしぼりこまれた2つのデータと直前までの積和処理の結果Accとを加算する必要があるため、ここでもう一度、3入力2出力の半加算器16でサム+キャリー+直前の積和結果を行い、最終のサム,キャリーを計算する。最後にこれを全加算器18で全加算して積和結果を得る。この積和器では図9に示す積和のサイクル時間TSは部分積の生成及び半加算器による絞り込みを行う時間T1と、得られた結果と直前の積和結果を加算する時間T2で決定される。
【0005】
この積和のサイクル時間を短くして積和サイクルの低減を図る方法としてパイプライン化が従来行われてきた。この方法は図10に示すように、部分積の生成・絞り込みの部分と全加算の部分で処理をレジスタ19,20で時間的に分けることにより、レイテンシは増加するものの処理サイクルは短くなり、全体の処理時間を短くすることができる。図11に示すように、部分積の生成・絞り込みの時間T1と、最終結果計算の時間T2のうちの長い方の時間をサイクルとしてパイプライン化することができる。つまり、部分積の絞り込みの時間と最終結果の加算の時間が等しい場合には、積和処理のサイクル時間は、1/2になる。
【0006】
また別の方法として図12に示すように単純に2つの積和器を設け、デュアル化する構成がある。この構成ではそれぞれの積和器に積和結果記憶用のレジスタ22A,22Bを設け、積和演算を2つの積和器14A,16A,18Aと14B,16B,18Bとに分けて求める。それぞれの積和処理が終了した時点で、この2つの積和結果を全加算器24で加算し最終結果を得てレジスタ26に格納する。この方法では積和に要する時間は部分積生成や最終結果加算の時間に関係なく1/2とすることができる。
【0007】
【発明が解決しようとする課題】
図8に示す構成のパイプライン化では、一般的に部分積の絞り込みの時間T1と、最終結果の加算の時間T2とが一致せず、いずれか長い方の時間がサイクル時間となって、パイプライン化によりサイクル時間を1/2とすることはできない。
【0008】
図12に示す構成のデュアル化では、サイクル時間を1/2とすることができるが、最終結果を得るためにレジスタ22A,22Bと、全加算器24とを設ける必要があり、ハードウェア規模が大きくなり、また、積和処理終了後に加算処理が必要になるという問題がある。また、積和器はDSPの命令により制御され、積和器のレジスタ構成が変わる(レジスタ22A,22Bが増す)ことは命令セットの変更を意味し、ファームウェア資産を生かせないという問題が発生する。
【0009】
本発明は上記の点に鑑みなされたもので、サイクル時間を半分にできると共に、ハードウェア規模が大きくなることを抑制でき、レジスタ構成の変更がない積和器を提供することを目的とする。
【0010】
【課題を解決するための手段】
請求項1に記載の発明は、2入力の乗算の部分積を半加算してサムとキャリーを出力する第一の乗算部と、
2入力の乗算の部分積を半加算してサムとキャリーを出力する第二の乗算部と、
前記第一の乗算部の出力と、前記第二の乗算部の出力と、第二の最終結果加算部の出力とを入力し加算を行い積和結果を出力する第一の最終結果加算部と、
前記第二の乗算部の出力と、前記第一の乗算部の出力と、前記第一の最終結果加算部の出力とを入力し加算を行い積和結果を出力する第二の最終結果加算部とを
備える。
【0011】
このように、第一、第二の最終結果加算部で第一、第二の乗算部からの今回の入力に対するサム及びキャリーと、第二、第一の乗算部からの前回の入力に対するサム及びキャリーと、第二、第一の最終結果加算部からの前前回の入力に対する積和結果を加算して、今回の入力に対する積和結果を得ることができ、従来のデュアル化と同様にサイクル時間を半分にすることができると共に、従来のデュアル化に対して半加算器を削減でき、ハードウェア規模の増大を抑制でき、かつ、レジスタ構成の変更が生じない。
【0012】
請求項に記載の発明は、請求項1記載の積和器において、
前記第一の乗算部と前記第二の乗算部の代りに、単一の乗算部を時分割で使用する。
このため、乗算部が単一で済み、更にハードウェア規模を小さくできる。
請求項に記載の発明は、請求項1記載の積和器において、
前記第一の最終結果加算部と第二の最終結果加算部の代りに、単一の最終結果加算部を時分割で使用する。
【0013】
このため、最終結果加算部が単一で済み、更にハードウェア規模を小さくできる。
【0014】
【発明の実施の形態】
図1は本発明の第1実施例の構成図を示す。同図中、入力A,Bは図2(A)に示すタイミングで供給され、このうち奇数番目の入力A,Bはレジスタ30A,32Aにラッチされて乗算器34Aに供給され、偶数番目の入力A,Bはレジスタ30B,32Bにラッチされて乗算器34Bに供給される。
【0015】
乗算器(乗算部)34A,34B夫々は入力A,Bの部分積を作り、その部分積を加算して絞り込み、サム(S)とキャリー(C)の2つのデータを生成する。図2(B),(C)は乗算器34A,34B夫々のデータS,Cの出力タイミングを示す。乗算器34Aの出力データS,Cは半加算器36A及びレジスタ38Bに供給され乗算器34Bの出力データS,Cは半加算器36B及びレジスタ38Aに供給される。
【0016】
半加算器36Aに乗算器34Aからn+1番目の入力に対する乗算データS,Cが供給されるとき、レジスタ38Aからは図2(E)に示すn番目の入力に対する乗算データS,Cが供給され、レジスタ40Aからは図2(G)に示すn−1番目の入力に対する積和データが供給され、これらのデータに対するサム(S),キャリー(C)の2つのデータが出力される。全加算器42Aでは上記のデータS,Cの加算が行われ最終結果つまりn+1番目の入力に対する積和データが求められる。この積和データはセレクタ44で選択されてレジスタ46,40B夫々に格納される。図2(H)はレジスタ46の内容を示す。
【0017】
半加算器36Bに乗算器34Bからn+2番目の入力に対する乗算データS,Cが供給されるとき、レジスタ38Bからは図2(D)に示すn+1番目の入力に対する乗算データS,Cが供給され、レジスタ40Bからは図2(F)に示すn番目の入力に対する積和データが供給され、これらのデータに対するサム(S),キャリー(C)の2つのデータが出力される。全加算器42Bでは上記のデータS,Cの加算が行われ最終結果つまりn+2番目の入力に対する積和データが求められる。この積和データはセレクタ44で選択されてレジスタ46,40A夫々に格納される。図2(H)はレジスタ46の内容を示す。
【0018】
上記の乗算器34Aが第一の乗算部に対応し、乗算器34Bが第二の乗算部に対応し、半加算器36Aと全加算器42A及びレジスタ40A,38Aが第一の最終結果加算部に対応し、半加算器36Bと全加算器42B及びレジスタ40B,38Bが第二の最終結果加算部に対応する。
図3は半加算器36A,36Bとして使用される4ビット5入力半加算器の構成図を示す。端子50にはレジスタ40Aより積和データが入来し、端子51,52にはレジスタ38Aから2つのデータS,Cが入来し、これらのデータは半加算器54a〜54dで加算され、これらで得られたデータSは半加算器56a〜56dに供給され、またデータCは半加算器58a,56a〜56c夫々に供給される。半加算器56a〜56dには端子53より乗算器34A出力のデータSが供給されて加算される。半加算器56a〜56dの出力するデータSは半加算器58b〜58eに供給され、半加算器58a〜58dの出力するデータCは半加算器58a〜58dに供給される。また、半加算器58b〜58eには端子55より乗算器34A出力のデータCが供給されて加算される。上記の半加算器58a〜58e夫々の出力するデータC,Sが全加算器42Aに供給される。
【0019】
ここでは、端子50〜52に入力するデータの加算は段数が多く遅延時間が大きいと考えられるが、レジスタ40A,38A夫々のデータは加算サイクルの開始時点で既に値が決定しており、乗算器34Aの出力データS,Cの加算はこれより遅れて開始されることを考慮すると、上記半加算器58a〜58dにおける遅延は全体に何ら影響を与えない。
【0020】
このように乗算器34A,34B,半加算器36A,36B,全加算器42A,42Bで構成される2つの積和回路を180度位相をずらして交互に動作させることで、積和処理に必要なサイクル時間をデュアル化と同様に半分にすることができる。また、デュアル化のように余分なレジスタ22A,22B及び全加算器24が必要ないためハードウェアが大規模化することがなく、かつ、レジスタ構成の変更が生じない。
【0021】
図4は本発明の第2実施例の構成図を示す。同図中、入力A,Bは図5(A)に示すタイミングで供給され、乗算器33に供給される。乗算器33は入力A,Bの部分積を作り、その部分積を加算して絞り込み、サム(S)とキャリー(C)の2つのデータを生成する。図5(B)は乗算器33のデータS,Cの出力タイミングを示す。乗算器33の出力データS,Cはレジスタ35A,35Bに供給される。
【0022】
レジスタ35Aは図5(C)に示すラッチクロックのローレベル期間に奇数番目の入力に対する乗算器33出力S,Cを図5(D)に示すように格納し、レジスタ35Bは上記ラッチクロックのハイレベル期間に偶数番目の入力に対する乗算器33出力S,Cを図5(G)に示すように格納する。レジスタ35Aに格納された奇数番目の2つのデータS,Cは半加算器36A及びレジスタ38Bに供給され、レジスタ35Bに格納された偶数番目の2つのデータは半加算器36B及びレジスタ38Aに供給される。
【0023】
半加算器36Aにレジスタ35Aからn+1番目の入力に対する乗算データS,Cが供給されるとき、レジスタ38Aからは図5(E)に示すn番目の入力に対する乗算データS,Cが供給され、レジスタ40Aからは図5(F)に示すn−1番目の入力に対する積和データが供給され、これらのデータに対するサム(S),キャリー(C)の2つのデータが出力される。全加算器42Aでは上記のデータS,Cの加算が行われ最終結果つまりn+1番目の入力に対する積和データが求められる。この積和データはセレクタ44で選択されてレジスタ46,40B夫々に格納される。図5(J)はレジスタ46の内容を示す。
【0024】
半加算器36Bにレジスタ35Bからn+2番目の入力に対する乗算データS,Cが供給されるとき、レジスタ38Bからは図5(H)に示すn+1番目の入力に対する乗算データS,Cが供給され、レジスタ40Bからは図5(I)に示すn番目の入力に対する積和データが供給され、これらのデータに対するサム(S),キャリー(C)の2つのデータが出力される。全加算器42Bでは上記のデータS,Cの加算が行われ最終結果つまりn+2番目の入力に対する積和データが求められる。この積和データはセレクタ44で選択されてレジスタ46,40A夫々に格納される。図5(J)はレジスタ46の内容を示す。
【0025】
部分積の絞り込みの時間が最終結果の加算時間よりも短いとした場合、乗算器33は積和サイクルの半分以下の時間で動作することになり、この実施例では乗算器33を時分割で使用することで乗算器を1つに削除でき回路規模を小さくしている。この実施例でも従来のデュアル化と同様に積和処理に必要なサイクル時間を半分にすることができる。
【0026】
これとは逆に、部分積の絞り込みの時間が最終結果の加算時間よりも長い場合は図6に示す第3実施例の回路構成とする。図6において、入力A,Bのうち奇数番目の入力A,Bはレジスタ30A,32Aにラッチされて乗算器34Aに供給され、偶数番目の入力A,Bはレジスタ30B,32Bにラッチされて乗算器34Bに供給される。
【0027】
乗算器34A,34B夫々は入力A,Bの部分積を作り、その部分積を加算して絞り込み、サム(S)とキャリー(C)の2つのデータを生成する。乗算器34Aの出力データS,C夫々はセレクタ37,39に供給され乗算器34Bの出力データS,C夫々はセレクタ37,39に供給される。
セレクタ37,39は2つのデータS,Cを奇数番目、偶数番目で順次選択して半加算器41に供給する。半加算器41にはレジスタ45から前サイクルで得られた積和データが供給されており、半加算器41はこれらのデータに対するS,Cの2つのデータを出力する。全加算器43は上記のデータS,Cの加算を行い、最終結果の積和データがレジスタ45に格納される。
【0028】
この場合は最終結果の加算時間が短いため、時分割多重を行って1つの半加算器41及び1つの全加算器43で処理している。逆に部分積の絞り込みの時間が長いため、2つの乗算器34A,34Bを使用してサイクルタイムの短縮を行っている。この実施例でも従来のデュアル化と同様に積和処理に必要なサイクル時間を半分にすることができる。
【0029】
【発明の効果】
上述の如く、請求項1に記載の発明によれば、第一、第二の最終結果加算部で第一、第二の乗算部からの今回の入力に対するサム及びキャリーと、第二、第一の乗算部からの前回の入力に対するサム及びキャリーと、第二、第一の最終結果加算部からの前前回の入力に対する積和結果を加算して、今回の入力に対する積和結果を得ることができ、従来のデュアル化と同様にサイクル時間を半分にすることができると共に、従来のデュアル化に対して半加算器を削減でき、ハードウェア規模の増大を抑制でき、かつ、レジスタ構成の変更が生じない。
【0031】
また、請求項に記載の発明によれば、乗算部が単一で済み、更にハードウェア規模を小さくできる。
また、請求項に記載の発明によれば、最終結果加算部が単一で済み、更にハードウェア規模を小さくできる。
【図面の簡単な説明】
【図1】本発明の構成図である。
【図2】図1の信号タイミングチャートである。
【図3】半加算器の構成図である。
【図4】本発明の構成図である。
【図5】図4の信号タイミングチャートである。
【図6】本発明の構成図である。
【図7】従来の乗算器の構成図である。
【図8】従来の積和器の構成図である。
【図9】図7の乗算サイクルを説明するための図である。
【図10】従来の積和器の構成図である。
【図11】図10の乗算サイクルを説明するための図である。
【図12】従来の積和器の構成図である。
【符号の説明】
30A,30B,32A,32B,35A,35B,38A,38B,40A,40B,45,46 レジスタ
33,34A,34B 乗算器
36A,36B,41 半加算器
42A,42B,43 全加算器
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a product-sum device, and more particularly to a product-sum device that performs high-speed product-sum processing.
In recent years, DSPs (Digital Signal Processors) have been applied in a wide range of fields.
DSPs are required to perform product-sum processing that often appears in signal processing operations at high speed. For this reason, high-speed operation of a product-sum machine that performs product-sum processing in the DSP is desired.
[0002]
[Prior art]
FIG. 7 shows a configuration diagram of the parallel multiplier. In the figure, a multiplier 10 creates partial products of inputs A and B, and adds the partial products to obtain a multiplication result. The addition of the partial products is performed by an adder circuit (Walesa tree) having a tree-like structure so that carry propagation does not occur. Specifically, the partial product is half-added to reduce the number of bits.
[0003]
For example, if Boot's algorithm is used to generate a partial product, a 16 × 8-bit multiplication results in a 16 × 8-bit partial product. By calculating each digit of this 128 bits (16 × 8) with a half-adder with 3 inputs and 2 outputs, two (sum, carry) data are finally obtained. The final result is obtained by adding these two data by the full adder 12 having carry propagation.
[0004]
Using this multiplier, a sum of products is also made. The accumulator is configured to continue adding the multiplication results as ΣAi · Bi. FIG. 8 shows a configuration diagram of the sum of products. The product-sum multiplier has almost the same configuration as that of the multiplier. However, the multiplication result of the multiplier 14 is obtained by summing up two data, which are stored in the sum (S) and carry (C), and the result Acc of the previous product-sum processing. Since it is necessary to add, here, the half sum adder 16 with 3 inputs and 2 outputs once again performs sum + carry + the previous product-sum result to calculate the final sum and carry. Finally, this is fully added by the full adder 18 to obtain a product-sum result. In this product-sumer, the product-sum cycle time TS shown in FIG. 9 is determined by a time T1 for generating a partial product and narrowing down by a half adder, and a time T2 for adding the obtained result and the previous product-sum result. The
[0005]
Pipelining has been conventionally performed as a method of reducing the product-sum cycle time by shortening the cycle time of the product-sum. In this method, as shown in FIG. 10, by dividing the processing by the registers 19 and 20 in the partial product generation / narrowing part and the full addition part, the latency increases, but the processing cycle becomes shorter. The processing time can be shortened. As shown in FIG. 11, the longer one of the partial product generation / narrowing time T1 and the final result calculation time T2 can be pipelined as a cycle. That is, when the partial product narrowing time is equal to the final result adding time, the product-sum processing cycle time is halved.
[0006]
As another method, as shown in FIG. 12, there is a configuration in which two multipliers / summers are simply provided to make dual. In this configuration, registers 22A and 22B for storing product-sum results are provided in each product-sum unit, and the product-sum operation is obtained by dividing into two product-sum units 14A, 16A, 18A and 14B, 16B, 18B. At the end of each product-sum process, the two product-sum results are added by the full adder 24 to obtain the final result and stored in the register 26. In this method, the time required for the product sum can be halved regardless of the time for partial product generation and final result addition.
[0007]
[Problems to be solved by the invention]
In the pipelining of the configuration shown in FIG. 8, in general, the time T1 for narrowing the partial product and the time T2 for adding the final result do not coincide with each other, and the longer time becomes the cycle time. The cycle time cannot be halved due to line formation.
[0008]
In the dual configuration shown in FIG. 12, the cycle time can be halved, but it is necessary to provide the registers 22A and 22B and the full adder 24 in order to obtain the final result. In addition, there is a problem that an addition process is required after the product-sum process is completed. In addition, the sum of products is controlled by a DSP instruction, and changing the register configuration of the sum of products (increasing the registers 22A and 22B) means changing the instruction set, causing a problem that firmware assets cannot be utilized.
[0009]
The present invention has been made in view of the above points, and an object of the present invention is to provide a accumulator that can halve the cycle time, suppress an increase in hardware scale, and does not change the register configuration.
[0010]
[Means for Solving the Problems]
The invention according to claim 1 is a first multiplication unit that half-adds a partial product of two-input multiplication and outputs a sum and carry;
A second multiplication unit that half-adds a partial product of two-input multiplication and outputs a sum and a carry;
A first final result adding unit that inputs the output of the first multiplying unit, the output of the second multiplying unit, and the output of the second final result adding unit and outputs a product-sum result; ,
A second final result adder that inputs the output of the second multiplier, the output of the first multiplier, and the output of the first final result adder, adds the result, and outputs the product-sum result. And
Prepare.
[0011]
Thus, the sum and carry for the current input from the first and second multipliers in the first and second final result adders, and the sum and carry for the previous input from the second and first multipliers, Carry and the product-sum result for the previous input from the second and first final result adders can be added to obtain the product-sum result for the current input. Can be halved, half adders can be reduced compared to the conventional dual configuration, an increase in hardware scale can be suppressed, and no change in register configuration occurs.
[0012]
According to a fourth aspect of the present invention, there is provided the sum of products according to the first aspect,
Instead of the first multiplier and the second multiplier, a single multiplier is used in a time division manner.
For this reason, a single multiplication unit is sufficient, and the hardware scale can be further reduced.
The invention as set forth in claim 5 is the sum of the multipliers according to claim 1,
Instead of the first final result adding unit and the second final result adding unit, a single final result adding unit is used in a time division manner.
[0013]
Therefore, a single final result adding unit is sufficient, and the hardware scale can be further reduced.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 shows a block diagram of a first embodiment of the present invention. In FIG. 2, inputs A and B are supplied at the timing shown in FIG. 2A. Among them, odd-numbered inputs A and B are latched by registers 30A and 32A and supplied to multiplier 34A, and even-numbered inputs. A and B are latched by the registers 30B and 32B and supplied to the multiplier 34B.
[0015]
Each of the multipliers (multipliers) 34A and 34B creates partial products of inputs A and B, adds the partial products, narrows down, and generates two data of a sum (S) and a carry (C). 2B and 2C show the output timings of the data S and C of the multipliers 34A and 34B, respectively. The output data S and C of the multiplier 34A are supplied to the half adder 36A and the register 38B, and the output data S and C of the multiplier 34B are supplied to the half adder 36B and the register 38A.
[0016]
When the multiplication data S and C for the (n + 1) th input are supplied from the multiplier 34A to the half adder 36A, the multiplication data S and C for the nth input shown in FIG. 2 (E) are supplied from the register 38A. The product sum data for the (n-1) th input shown in FIG. 2G is supplied from the register 40A, and two data of the sum (S) and carry (C) for these data are output. In the full adder 42A, the above data S and C are added, and the final result, that is, the product-sum data for the (n + 1) th input is obtained. The product-sum data is selected by the selector 44 and stored in the registers 46 and 40B. FIG. 2 (H) shows the contents of the register 46.
[0017]
When the multiplication data S and C for the (n + 2) th input are supplied from the multiplier 34B to the half adder 36B, the multiplication data S and C for the (n + 1) th input shown in FIG. 2D are supplied from the register 38B. The product sum data for the nth input shown in FIG. 2F is supplied from the register 40B, and two data of the sum (S) and carry (C) for these data are output. In the full adder 42B, the above-described data S and C are added to obtain the final result, that is, the product-sum data for the (n + 2) th input. The product-sum data is selected by the selector 44 and stored in the registers 46 and 40A. FIG. 2 (H) shows the contents of the register 46.
[0018]
The multiplier 34A corresponds to the first multiplier, the multiplier 34B corresponds to the second multiplier, the half adder 36A, the full adder 42A, and the registers 40A and 38A are the first final result adder. The half adder 36B, the full adder 42B, and the registers 40B and 38B correspond to the second final result adder.
FIG. 3 shows a configuration diagram of a 4-bit 5-input half adder used as the half adders 36A and 36B. The product-sum data is input from the register 40A to the terminal 50, and the two data S and C are input from the register 38A to the terminals 51 and 52. These data are added by the half adders 54a to 54d. The data S obtained in the above is supplied to the half adders 56a to 56d, and the data C is supplied to the half adders 58a and 56a to 56c. Data S output from the multiplier 34A is supplied from the terminal 53 to the half adders 56a to 56d and added. Data S output from the half adders 56a to 56d is supplied to the half adders 58b to 58e, and data C output from the half adders 58a to 58d is supplied to the half adders 58a to 58d. Further, the data C output from the multiplier 34A is supplied from the terminal 55 to the half adders 58b to 58e and added. Data C and S output from the half adders 58a to 58e are supplied to the full adder 42A.
[0019]
Here, the addition of data input to the terminals 50 to 52 is considered to have a large number of stages and a large delay time. However, the values of the data of the registers 40A and 38A have already been determined at the start of the addition cycle. Considering that the addition of the output data S and C of 34A starts later than this, the delay in the half adders 58a to 58d has no influence on the whole.
[0020]
As described above, the two product-sum circuits composed of the multipliers 34A and 34B, the half adders 36A and 36B, and the full adders 42A and 42B are alternately operated with a phase difference of 180 degrees, which is necessary for the product-sum processing. Cycle time can be halved as with dualization. Further, since the extra registers 22A and 22B and the full adder 24 are not required unlike the dual configuration, the hardware is not enlarged and the register configuration is not changed.
[0021]
FIG. 4 shows a block diagram of the second embodiment of the present invention. In the figure, inputs A and B are supplied at the timing shown in FIG. 5A and supplied to the multiplier 33. The multiplier 33 creates partial products of the inputs A and B, adds the partial products, narrows down, and generates two data of a sum (S) and a carry (C). FIG. 5B shows the output timing of the data S and C of the multiplier 33. Output data S and C of the multiplier 33 are supplied to the registers 35A and 35B.
[0022]
The register 35A stores the outputs 33 and S of the multiplier 33 for odd-numbered inputs as shown in FIG. 5D during the low level period of the latch clock shown in FIG. 5C, and the register 35B stores the high level of the latch clock. Multiplier 33 outputs S and C for even-numbered inputs are stored as shown in FIG. The odd-numbered two data S and C stored in the register 35A are supplied to the half adder 36A and the register 38B, and the even-numbered two data stored in the register 35B are supplied to the half adder 36B and the register 38A. The
[0023]
When the multiplication data S and C for the (n + 1) th input are supplied from the register 35A to the half adder 36A, the multiplication data S and C for the nth input shown in FIG. The product-sum data for the (n-1) th input shown in FIG. 5F is supplied from 40A, and two data, sum (S) and carry (C), for these data are output. In the full adder 42A, the above data S and C are added, and the final result, that is, the product-sum data for the (n + 1) th input is obtained. The product-sum data is selected by the selector 44 and stored in the registers 46 and 40B. FIG. 5J shows the contents of the register 46.
[0024]
When the multiplication data S and C for the (n + 2) th input are supplied from the register 35B to the half adder 36B, the multiplication data S and C for the (n + 1) th input shown in FIG. 5 (H) are supplied from the register 38B. The product-sum data for the nth input shown in FIG. 5 (I) is supplied from 40B, and two data of sum (S) and carry (C) for these data are output. In the full adder 42B, the above-described data S and C are added to obtain the final result, that is, the product-sum data for the (n + 2) th input. The product-sum data is selected by the selector 44 and stored in the registers 46 and 40A. FIG. 5J shows the contents of the register 46.
[0025]
If the time for narrowing down the partial product is shorter than the addition time of the final result, the multiplier 33 operates in a time that is less than half of the product-sum cycle. In this embodiment, the multiplier 33 is used in a time division manner. By doing so, one multiplier can be eliminated, and the circuit scale is reduced. In this embodiment as well, the cycle time required for the product-sum processing can be halved as in the conventional dual configuration.
[0026]
On the contrary, if the time for narrowing down the partial product is longer than the addition time of the final result, the circuit configuration of the third embodiment shown in FIG. 6 is adopted. In FIG. 6, odd-numbered inputs A and B of inputs A and B are latched by registers 30A and 32A and supplied to multiplier 34A, and even-numbered inputs A and B are latched and multiplied by registers 30B and 32B. Is supplied to the vessel 34B.
[0027]
Each of the multipliers 34A and 34B creates partial products of the inputs A and B, adds the partial products, narrows down, and generates two data of a sum (S) and a carry (C). The output data S and C of the multiplier 34A are supplied to the selectors 37 and 39, respectively, and the output data S and C of the multiplier 34B are supplied to the selectors 37 and 39, respectively.
The selectors 37 and 39 sequentially select the two data S and C in odd and even numbers and supply them to the half adder 41. The product-sum data obtained in the previous cycle is supplied from the register 45 to the half adder 41, and the half adder 41 outputs two data of S and C for these data. The full adder 43 adds the data S and C, and the final product-sum data is stored in the register 45.
[0028]
In this case, since the addition time of the final result is short, time division multiplexing is performed and processing is performed by one half adder 41 and one full adder 43. On the contrary, since the time for narrowing the partial product is long, the cycle time is shortened by using two multipliers 34A and 34B. In this embodiment as well, the cycle time required for the product-sum processing can be halved as in the conventional dual configuration.
[0029]
【The invention's effect】
As described above , according to the first aspect of the present invention , the first and second final result adder units perform the sum and carry for the current input from the first and second multiplier units, and the second and first units. The sum and carry for the previous input from the multiplication unit and the product-sum result for the previous previous input from the second and first final result addition units may be added to obtain the product-sum result for the current input. The cycle time can be halved in the same way as in the conventional dual configuration, half adders can be reduced compared to the conventional dual configuration, the increase in hardware scale can be suppressed, and the register configuration can be changed. Does not occur.
[0031]
In addition, according to the fourth aspect of the present invention , a single multiplication unit is sufficient, and the hardware scale can be further reduced.
Further , according to the invention described in claim 5 , a single final result adding unit is sufficient, and the hardware scale can be further reduced.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of the present invention.
FIG. 2 is a signal timing chart of FIG. 1;
FIG. 3 is a configuration diagram of a half adder.
FIG. 4 is a configuration diagram of the present invention.
FIG. 5 is a signal timing chart of FIG. 4;
FIG. 6 is a configuration diagram of the present invention.
FIG. 7 is a configuration diagram of a conventional multiplier.
FIG. 8 is a configuration diagram of a conventional sum of products.
9 is a diagram for explaining a multiplication cycle in FIG. 7; FIG.
FIG. 10 is a configuration diagram of a conventional sum of products.
11 is a diagram for explaining a multiplication cycle in FIG. 10; FIG.
FIG. 12 is a block diagram of a conventional sum of products.
[Explanation of symbols]
30A, 30B, 32A, 32B, 35A, 35B, 38A, 38B, 40A, 40B, 45, 46 Registers 33, 34A, 34B Multipliers 36A, 36B, 41 Half adders 42A, 42B, 43 Full adders

Claims (5)

2入力の乗算の部分積を半加算してサムとキャリーを出力する第一の乗算部と、
2入力の乗算の部分積を半加算してサムとキャリーを出力する第二の乗算部と、
前記第一の乗算部の出力と、前記第二の乗算部の出力と、第二の最終結果加算部の出力とを入力し加算を行い積和結果を出力する第一の最終結果加算部と、
前記第二の乗算部の出力と、前記第一の乗算部の出力と、前記第一の最終結果加算部の出力とを入力し加算を行い積和結果を出力する第二の最終結果加算部とを
備えたことを特徴とする積和器。
A first multiplier that half-adds a partial product of two-input multiplication and outputs a sum and a carry;
A second multiplication unit that half-adds a partial product of two-input multiplication and outputs a sum and a carry;
A first final result adding unit that inputs the output of the first multiplying unit, the output of the second multiplying unit, and the output of the second final result adding unit and outputs a product-sum result; ,
A second final result adder that inputs the output of the second multiplier, the output of the first multiplier, and the output of the first final result adder, adds the result, and outputs the product-sum result. And
Product-sum unit, characterized in that it includes.
請求項1記載の積和器において、
前記第一の乗算部と第二の乗算部においては、交互に2入力を取り込み乗算を行うことを特徴とする積和器。
The accumulator according to claim 1, wherein
The first multiplier and the second multiplier alternately take in two inputs and perform multiplication .
請求項1記載の積和器において、
前記第一の最終結果加算部においては、前々サイクルの入力に対する第二の最終結果加算部の出力と、前サイクルの入力に対する第二の乗算部の出力と、現サイクルの入力に対する第一の乗算部の出力とを加算し、現サイクルの入力に対する積和結果として出力することを特徴とする積和器。
The accumulator according to claim 1, wherein
In the first final result adder, the output of the second final result adder with respect to the input of the previous cycle, the output of the second multiplier with respect to the input of the previous cycle, and the first with respect to the input of the current cycle A sum of products summed with the output of the multiplication unit and output as a product sum result for the input of the current cycle .
請求項1記載の積和器において、The accumulator according to claim 1, wherein
前記第一の乗算部と前記第二の乗算部の代りに、単一の乗算部を時分割で使用することを特徴とする積和器。  Instead of the first multiplier and the second multiplier, a single multiplier is used in a time division manner.
請求項1記載の積和器において、The accumulator according to claim 1, wherein
前記第一の最終結果加算部と第二の最終結果加算部の代りに、単一の最終結果加算部を時分割で使用することを特徴とする積和器。  Instead of the first final result addition unit and the second final result addition unit, a single product finalizer is used in a time division manner.
JP16001997A 1997-06-17 1997-06-17 Accumulator Expired - Lifetime JP3695561B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16001997A JP3695561B2 (en) 1997-06-17 1997-06-17 Accumulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16001997A JP3695561B2 (en) 1997-06-17 1997-06-17 Accumulator

Publications (2)

Publication Number Publication Date
JPH117439A JPH117439A (en) 1999-01-12
JP3695561B2 true JP3695561B2 (en) 2005-09-14

Family

ID=15706226

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16001997A Expired - Lifetime JP3695561B2 (en) 1997-06-17 1997-06-17 Accumulator

Country Status (1)

Country Link
JP (1) JP3695561B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591615A (en) * 2012-01-16 2012-07-18 中国人民解放军国防科学技术大学 Structured mixed bit-width multiplying method and structured mixed bit-width multiplying device

Also Published As

Publication number Publication date
JPH117439A (en) 1999-01-12

Similar Documents

Publication Publication Date Title
JP5866128B2 (en) Arithmetic processor
KR970007613A (en) SRT hardware and square root units that generate multiple share digits per clock cycle
JP2004326112A (en) Multiple modulus selector, accumulator, montgomery multiplier, method of generating multiple modulus, method of producing partial product, accumulating method, method of performing montgomery multiplication, modulus selector, and booth recorder
US5528529A (en) Electronic multiplying and adding apparatus and method
US4796219A (en) Serial two's complement multiplier
JP2722412B2 (en) Calculation method of error correction parameter accompanying execution of modular operation by Montgomery method
US7240204B1 (en) Scalable and unified multiplication methods and apparatus
US5661673A (en) Power efficient booth multiplier using clock gating
JP3529622B2 (en) Arithmetic circuit
US5957999A (en) Booth multiplier with squaring operation accelerator
JP3695561B2 (en) Accumulator
US7607165B2 (en) Method and apparatus for multiplication and/or modular reduction processing
US5724280A (en) Accelerated booth multiplier using interleaved operand loading
US5948051A (en) Device improving the processing speed of a modular arithmetic coprocessor
US7167885B2 (en) Emod a fast modulus calculation for computer systems
US5684731A (en) Booth multiplier using data path width adder for efficient carry save addition
JPS588353A (en) Multiplier
JP4223819B2 (en) Power residue calculation apparatus and program
US5309385A (en) Vector division processing method and system
JP2864598B2 (en) Digital arithmetic circuit
JP4850884B2 (en) Power-residue calculator
Huai et al. Efficient architecture for long integer modular multiplication over Solinas prime
JP3851024B2 (en) Multiplier
JP2790327B2 (en) Remainder multiplication circuit and remainder multiplication method
KR100386979B1 (en) Method of paralleling bit serial multiplier for Galois field and a bit serial-parallel multipiler using thereof

Legal Events

Date Code Title Description
A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20040819

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20040827

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040915

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041005

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041203

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050621

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050622

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080708

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20090708

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100708

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100708

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110708

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110708

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20110708

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120708

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120708

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130708

Year of fee payment: 8

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term