JPH09185491A - Comulative adder - Google Patents

Comulative adder

Info

Publication number
JPH09185491A
JPH09185491A JP34200295A JP34200295A JPH09185491A JP H09185491 A JPH09185491 A JP H09185491A JP 34200295 A JP34200295 A JP 34200295A JP 34200295 A JP34200295 A JP 34200295A JP H09185491 A JPH09185491 A JP H09185491A
Authority
JP
Japan
Prior art keywords
output
adder
register
cumulative
addition
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.)
Withdrawn
Application number
JP34200295A
Other languages
Japanese (ja)
Inventor
Haruo Fukuda
春生 福田
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP34200295A priority Critical patent/JPH09185491A/en
Publication of JPH09185491A publication Critical patent/JPH09185491A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To accelerate an entire cumulative adder by operating adding processing at high speed by executing adding processing for each output of multiplier divided into plural parts. SOLUTION: Cumulative adding processing is performed by inputting the low-order side output of multiplier 13 to a 1st adding processing part 115 and inputting the high-order side output of multiplier 13 to a 2nd adding processing part 116. Then, one most significant bit generated by adding processing at the 1st adding processing part 115 is stored into a carry register 108 as a carry bit and added to the 2nd adding processing part 116 after one cycle. Thus, 64-bit adding processing can be provided at high speed and an entire cumulative adder 100 can be accelerated. Namely, since adding processing is simultaneously executed in one cycle while being divided into high-order side and low-order side, this is 64-bit adding processing but can be provided in the same cycle as 32-bit adding processing.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、単位時間毎にデー
タを入力して累積加算処理を実行する累積加算器に関
し、詳細にはデジタルシグナルプロセッサ(DSP:Dig
ital Signal Processor)等の累積加算処理をパイプラ
イン状に実行する累積加算器に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cumulative adder for inputting data for each unit time and executing a cumulative addition process, and more particularly to a digital signal processor (DSP: Digi).
Ital signal processor) and the like for a cumulative adder that executes a cumulative addition process in a pipeline.

【0002】[0002]

【従来の技術】DSP等を構成する算術演算回路は加算
器が基本となっており、加算器の高速化は算術演算回路
全体の速度向上の点から極めて重要である。
2. Description of the Related Art An arithmetic operation circuit constituting a DSP or the like is basically based on an adder, and increasing the speed of the adder is extremely important from the viewpoint of improving the speed of the entire arithmetic operation circuit.

【0003】図5は従来のこの種の累積加算器の構成図
であり、高速化実現のため累積加算処理をパイプライン
状に実行する累積加算器の例である。
FIG. 5 is a block diagram of a conventional cumulative adder of this type, which is an example of a cumulative adder that executes a cumulative addition process in a pipeline manner to realize a high speed operation.

【0004】図5において、累積加算器10は、第1の
入力端子11、第2の入力端子12、パイプラインレジ
スタ14を備えた乗算器13、乗算レジスタ15、加算
器16、累積加算レジスタ17、及び出力端子18から
構成されている。データの演算精度は入力データが32
ビット、演算後の出力データが64ビットである。
In FIG. 5, a cumulative adder 10 includes a first input terminal 11, a second input terminal 12, a multiplier 13 having a pipeline register 14, a multiplication register 15, an adder 16, and a cumulative addition register 17. , And an output terminal 18. The calculation accuracy of the data is 32 for the input data.
The output data after calculation is 64 bits.

【0005】累積加算器10の第1の入力端子11及び
第2の入力端子12には、32ビットの入力データがそ
れぞれ入力され、乗算器13に供給される。乗算器13
は、2入力データの乗算処理を行なって64ビット精度
の乗算データを出力する。
32-bit input data is input to the first input terminal 11 and the second input terminal 12 of the cumulative adder 10 and supplied to the multiplier 13. Multiplier 13
Outputs a 64-bit precision multiplication data by performing a multiplication process on two input data.

【0006】ここで、乗算器13の処理速度は累積加算
器10の他の演算部に比べて遅いため1組の乗算処理に
複数サイクルを要するのが普通である。このため、乗算
器13の内部にパイプラインレジスタ14を設けて、毎
サイクルデータの入力及び乗算データの出力が可能なよ
うにしている。
Here, since the processing speed of the multiplier 13 is slower than that of the other arithmetic units of the cumulative adder 10, it is usual that one set of multiplication processing requires a plurality of cycles. For this reason, the pipeline register 14 is provided inside the multiplier 13 to enable input of data every cycle and output of multiplication data.

【0007】乗算器13から出力された乗算結果は、一
旦乗算レジスタ15に蓄えられる。乗算レジスタ15か
ら出力された乗算結果は、第1の入力データとして加算
器16に入力される。加算器16では、乗算レジスタ1
5からの乗算結果と後述する累積加算レジスタ17から
の累積加算データとの加算処理を行う。このとき、加算
器16への入力データのデータ長は何れも64ビットで
あり、加算器16からの出力データのデータ長は65ビ
ットであるとする。
The multiplication result output from the multiplier 13 is temporarily stored in the multiplication register 15. The multiplication result output from the multiplication register 15 is input to the adder 16 as first input data. In the adder 16, the multiplication register 1
An addition process of the multiplication result from 5 and cumulative addition data from a cumulative addition register 17, which will be described later, is performed. At this time, it is assumed that the input data to the adder 16 has a data length of 64 bits and the output data from the adder 16 has a data length of 65 bits.

【0008】加算器16からの出力データは、累積加算
レジスタ17に蓄えられる。累積加算レジスタ17は、
入力データ長が65ビット、出力のデータ長が64ビッ
トであるとする。データ長を1ビット削減する方法に
は、単純に最上位の1ビットを削減する、あるいは飽和
演算処理を行うなどの方法がある。
The output data from the adder 16 is stored in the cumulative addition register 17. The cumulative addition register 17 is
It is assumed that the input data length is 65 bits and the output data length is 64 bits. As a method of reducing the data length by 1 bit, there is a method of simply reducing the most significant 1 bit or performing a saturation operation process.

【0009】累積加算レジスタ17からの出力データは
加算器16の第2の入力データとなるとともに、累積加
算器10の出力データとして出力端子18から外部に出
力される。
The output data from the cumulative addition register 17 becomes the second input data of the adder 16 and is output from the output terminal 18 to the outside as the output data of the cumulative adder 10.

【0010】次に、図6を参照して累積加算器10の動
作を説明する。図6は累積加算器10の動作を示すタイ
ミングチャートである。図6中、Xは第1の入力デー
タ、Yは第2の入力データ、pipe-Mはパイプラインレ
ジスタ14の内部データ、Mは乗算レジスタ15の格納
データ、Aは累積加算レジスタ17の格納データ、Zは
出力データであり、tは処理サイクルごとの時刻を示
す。
Next, the operation of the cumulative adder 10 will be described with reference to FIG. FIG. 6 is a timing chart showing the operation of the cumulative adder 10. In FIG. 6, X is the first input data, Y is the second input data, pipe-M is the internal data of the pipeline register 14, M is the data stored in the multiplication register 15, and A is the data stored in the cumulative addition register 17. , Z are output data, and t indicates the time for each processing cycle.

【0011】ここでは、数1に示すように4項の累積加
算処理を実現する様子を示している。
Here, the manner in which the cumulative addition process of the four terms is realized as shown in the equation 1 is shown.

【0012】[0012]

【数1】 [Equation 1]

【0013】図6中、mk及びskは、それぞれ式
(1)、数2を示している。また、[mk]はmkの演算
途中であるパイプラインレジスタ14内の値を示してい
る。
In FIG. 6, mk and sk represent equation (1) and equation 2, respectively. Further, [mk] indicates the value in the pipeline register 14 during the calculation of mk.

【0014】 mk=xk×yk …式(1)Mk = xk × yk (1)

【数2】 [Equation 2]

【0015】以下、累積加算器10の動作を単位時刻ご
とに説明する。
The operation of the cumulative adder 10 will be described below for each unit time.

【0016】まず、時刻0(t=0)にデータx1及び
y1が入力され、累積加算処理を開始する。
First, the data x1 and y1 are input at time 0 (t = 0), and the cumulative addition process is started.

【0017】時刻0には乗算処理の前半部を行い、この
結果をパイプラインレジスタ14(pipe-M)に格納す
る。
At time 0, the first half of the multiplication process is performed, and the result is stored in the pipeline register 14 (pipe-M).

【0018】時刻1には1組目の入力データの乗算処理
の後半部を行い、この結果を乗算レジスタ15(M)に
格納する(m1)。これと同時に2組目の入力データ
(x2,y2)が入力され、乗算処理の前半部を行い、こ
の結果をパイプラインレジスタ14(pipe-M)に格納
する。
At time 1, the latter half of the multiplication process of the first set of input data is performed, and the result is stored in the multiplication register 15 (M) (m1). At the same time, the second set of input data (x2, y2) is input, the first half of the multiplication process is performed, and the result is stored in the pipeline register 14 (pipe-M).

【0019】時刻2には乗算レジスタ15(M)に格納
された乗算結果(m1)と累積加算レジスタ17(A)
に蓄えられた初期値(0)との加算を加算器16により
行い、加算結果(s1)を累積加算レジスタ17(A)
に書き戻す。これと同時に2組目の入力データの乗算処
理の後半部を行い、この結果を乗算レジスタ15(M)
に格納する(m2)。また、3組目の入力データ(x3,
y3)が入力され、乗算処理の前半部を行い、この結果
をパイプラインレジスタ14(pipe-M)に格納する。
At time 2, the multiplication result (m1) stored in the multiplication register 15 (M) and the cumulative addition register 17 (A).
Is added to the initial value (0) stored in the adder 16 and the addition result (s1) is added to the cumulative addition register 17 (A).
Write back to At the same time, the latter half of the multiplication process of the second set of input data is performed, and the result is used as the multiplication register 15 (M).
(M2). Also, the third set of input data (x3,
y3) is input, the first half of the multiplication process is performed, and the result is stored in the pipeline register 14 (pipe-M).

【0020】時刻3には乗算レジスタ15(M)に格納
された乗算結果(m2)と累積加算レジスタ17(A)
に蓄えられた値(s1)との加算を加算器16により行
い、加算結果(s2)を累積加算レジスタ17(A)に
書き戻す。これと同時に3組目の入力データの乗算処理
の後半部を行い、この結果を乗算レジスタ15(M)に
格納する(m3)。また、4組目の入力データ(x4,y
4)が入力され、乗算処理の前半部を行い、この結果を
パイプラインレジスタ14(pipe-M)に格納する。
At time 3, the multiplication result (m 2) stored in the multiplication register 15 (M) and the cumulative addition register 17 (A)
The value (s1) stored in (1) is added by the adder 16, and the addition result (s2) is written back to the cumulative addition register 17 (A). At the same time, the latter half of the multiplication process of the third set of input data is performed, and the result is stored in the multiplication register 15 (M) (m3). Also, the fourth set of input data (x4, y
4) is input, the first half of the multiplication process is performed, and the result is stored in the pipeline register 14 (pipe-M).

【0021】時刻4には乗算レジスタ15(M)に格納
された乗算結果(m3)と累積加算レジスタ17(A)
に蓄えられた値(s2)との加算を加算器16により行
い、加算結果(s3)を累積加算レジスタ17(A)に
書き戻す。これと同時に4組目の入力データの乗算処理
の後半部を行い、この結果を乗算レジスタ15(M)に
格納する(m4)。
At time 4, the multiplication result (m3) stored in the multiplication register 15 (M) and the cumulative addition register 17 (A)
The value (s2) stored in (1) is added by the adder 16, and the addition result (s3) is written back to the cumulative addition register 17 (A). At the same time, the latter half of the multiplication process of the fourth set of input data is performed, and the result is stored in the multiplication register 15 (M) (m4).

【0022】時刻5には乗算レジスタ15(M)に格納
された乗算結果(m4)と累積加算レジスタ17(A)
に蓄えられた値(s3)との加算を加算器16により行
い、加算結果(s4)を累積加算レジスタ17(A)に
書き戻す。
At time 5, the multiplication result (m4) stored in the multiplication register 15 (M) and the cumulative addition register 17 (A)
The addition result (s4) is added back to the cumulative addition register 17 (A) with the value (s3) stored in (1).

【0023】時刻6には累積加算レジスタ17(A)に
格納されている演算結果(s4)を出力端子18から累
積加算器10の外部に出力して処理を終了する。
At time 6, the calculation result (s4) stored in the cumulative addition register 17 (A) is output from the output terminal 18 to the outside of the cumulative adder 10 and the processing is terminated.

【0024】[0024]

【発明が解決しようとする課題】しかしながら、このよ
うな従来の累積加算器10にあっては、単位時間毎に
(ここでは1サイクル)で加算処理を行うことを前提と
していたため、動作周波数を上げることができないとい
う問題点があった。
However, in the conventional cumulative adder 10 as described above, since it is premised that the addition processing is performed every unit time (here, one cycle), the operating frequency is changed. There was a problem that it could not be raised.

【0025】すなわち、64ビット加算器16の処理速
度が累積加算器10全体の動作周波数を決定していた。
例えば、図5に示すように、32ビットの入力データを
乗算した乗算結果は64ビットデータとなっており、加
算器16及び累積加算レジスタ17を用いて累積加算処
理するためには、64サイクル必要となる。したがっ
て、パイプラインレジスタ14を備えた乗算器13によ
って32ビット乗算処理を高速で行なっても、64ビッ
ト加算器16により累積加算器10全体の高速化が律速
されてしまうのが現状である。
That is, the processing speed of the 64-bit adder 16 determines the operating frequency of the entire cumulative adder 10.
For example, as shown in FIG. 5, the multiplication result obtained by multiplying 32-bit input data is 64-bit data, and 64 cycles are required to perform cumulative addition processing using the adder 16 and the cumulative addition register 17. Becomes Therefore, even if the 32-bit multiplication process is performed at high speed by the multiplier 13 including the pipeline register 14, the 64-bit adder 16 currently limits the speed of the cumulative adder 10 as a whole.

【0026】この問題を回避するため、累積加算処理
を、乗算結果の上位あるいは下位側の32ビットに限っ
て行う例があるが、64ビットデータを32ビットデー
タに削減することになるため演算精度上問題がある。
In order to avoid this problem, there is an example in which the cumulative addition processing is limited to the upper or lower 32 bits of the multiplication result. However, since the 64-bit data is reduced to 32-bit data, the calculation accuracy is reduced. There is an upper problem.

【0027】本発明は、上述のような問題点に鑑みてな
されたものであり、加算処理を高速に動作させて累積加
算器全体の高速化を図ることができる累積加算器を提供
することを目的とする。
The present invention has been made in view of the above problems, and it is an object of the present invention to provide a cumulative adder capable of operating the addition processing at a high speed to increase the speed of the entire cumulative adder. To aim.

【0028】[0028]

【課題を解決するための手段】本発明に係る累積加算器
は、単位時間毎にデータを入力して累積加算処理を実行
する累積加算器において、乗算器と、乗算器の出力を複
数に分割し、分割した乗算器の出力毎に加算処理を実行
する複数の加算処理部と、複数の加算処理部の出力を連
結して累積加算結果として出力する出力手段とを備え
る。
SUMMARY OF THE INVENTION A cumulative adder according to the present invention is a cumulative adder that inputs data at each unit time and executes a cumulative addition process. Then, a plurality of addition processing units that perform addition processing for each output of the divided multipliers and an output unit that connects the outputs of the plurality of addition processing units and outputs the result as a cumulative addition result are provided.

【0029】また、加算処理部が、乗算器出力の下位側
の加算処理を実行する第1の加算処理部と、乗算器出力
の上位側の加算処理を実行する第2の加算処理部とを備
え、第1の加算処理部の加算処理で発生したキャリービ
ットを所定時間後に第2の加算処理部に足す手段とを備
え、第2の加算処理部はキャリービットに基づいて加算
処理を実行する構成としてもよい。
Further, the addition processing section includes a first addition processing section for executing addition processing on the lower side of the multiplier output and a second addition processing section for executing addition processing on the higher side of the multiplier output. And a means for adding the carry bit generated in the addition processing of the first addition processing unit to the second addition processing unit after a predetermined time, and the second addition processing unit executes the addition processing based on the carry bit. It may be configured.

【0030】また、出力手段が、第2の加算処理部の出
力とキャリービットとを加算処理する第3の加算器と、
第3の加算器から出力されるデータを上位側に、第1の
加算処理部から出力されるデータを下位側に連結して保
持する出力レジスタとを備えた構成としてもよい。
Further, the output means includes a third adder for adding the carry bit and the output of the second addition processing section,
A configuration may be provided in which the data output from the third adder is provided on the upper side and the data output from the first addition processing unit is connected to the lower side and held.

【0031】また、第1の加算処理部が、乗算器の出力
の下位側を保持する第1のレジスタと、第1の加算器
と、第1の加算器の出力を保持する第1の累算レジスタ
とを備え、第1の加算器は、第1のレジスタの出力と第
1の累算レジスタの出力とを加算し、第2の加算処理部
は、乗算器の出力の上位側を保持する第2のレジスタ
と、第2の加算器と、第2の加算器の出力を保持する第
2の累算レジスタとを備え、第2の加算器は、第2のレ
ジスタの出力と第2の累算レジスタの出力とを加算し、
さらに、第1の加算器の加算結果の最上位の1ビットを
キャリービットとして保持するキャリーレジスタを備
え、キャリーレジスタに格納したキャリービットを単位
時間後に第2の加算器に足す構成としてもよい。
Further, the first addition processing section holds the lower side of the output of the multiplier, the first adder, and the first accumulator holding the output of the first adder. An addition register, the first adder adds the output of the first register and the output of the first accumulation register, and the second addition processing unit holds the upper side of the output of the multiplier. A second register, a second adder, and a second accumulation register that holds the output of the second adder, the second adder including the output of the second register and the second register. Add the output of the accumulation register of
Further, a carry register for holding the most significant 1 bit of the addition result of the first adder as a carry bit may be provided, and the carry bit stored in the carry register may be added to the second adder after a unit time.

【0032】また、本発明に係る累積加算器は、単位時
間毎にデータを入力して累積加算処理を実行する累積加
算器において、乗算器と、乗算器の出力の下位側を保持
する第1のレジスタ、及び上位側を保持する第2のレジ
スタと、第1の加算器と、第1の加算器の出力を保持す
る第1の累算レジスタとを備え、第1の加算器は、第1
のレジスタの出力と第1の累算レジスタの出力とを加算
し、さらに、第2の加算器と、第2の加算器の出力を保
持する第2の累算レジスタとを備え、第2の加算器は、
第2のレジスタの出力と第2の累算レジスタの出力とを
加算し、第2の累算レジスタの出力と第1の加算器の出
力のうちの最上位ビットとを加算する第3の加算器と、
第3の加算器の出力を上位側に、第1の累積加算レジス
タの出力を下位側に連結して保持する出力レジスタとを
備え、第1の加算器の出力のうち最上位ビットを第2の
加算器及び第3の加算器に入力し、最上位ビットを除く
第1の加算器の出力を第1の累算レジスタに入力し、第
2の加算器は、第2のレジスタの出力、第2の累算レジ
スタの出力及び第1の加算器の出力の最上位ビットを加
算処理する構成としてもよい。
The cumulative adder according to the present invention is a cumulative adder that inputs data at each unit time and executes a cumulative addition process. The first and second multipliers hold the lower side of the output of the multiplier. , A second register for holding the upper side, a first adder, and a first accumulation register for holding the output of the first adder, and the first adder is 1
Of the output of the first accumulation register and the output of the first accumulation register, and further includes a second adder and a second accumulation register that holds the output of the second adder. The adder is
A third addition that adds the output of the second register and the output of the second accumulation register, and adds the output of the second accumulation register and the most significant bit of the output of the first adder A vessel,
An output register for connecting and holding the output of the third adder on the upper side and the output of the first cumulative addition register on the lower side, and setting the most significant bit of the output of the first adder to the second Of the first adder except the most significant bit, and the second adder outputs the output of the second register. The most significant bit of the output of the second accumulation register and the output of the first adder may be added.

【0033】また、累積加算器が、加算結果を選択する
選択手段を備える構成としてもよい。
The cumulative adder may be provided with a selection means for selecting the addition result.

【0034】また、累積加算器が、乗算器出力に対し累
積加算処理を防止し加算処理のみを実行する加算器であ
ってもよい。
Further, the cumulative adder may be an adder which prevents the cumulative addition processing on the output of the multiplier and executes only the addition processing.

【0035】さらに、累積加算器が、乗算器出力に対し
負データを加算する減算処理を実行するものであっても
よい。
Further, the cumulative adder may execute subtraction processing for adding negative data to the output of the multiplier.

【0036】さらにまた、乗算器が、サイクル毎のデー
タの入力及び乗算データの出力が可能なパイプライン乗
算器により構成するものでもよい。
Furthermore, the multiplier may be composed of a pipeline multiplier capable of inputting data and outputting multiplication data for each cycle.

【0037】[0037]

【発明の実施の形態】本発明に係る累積加算器は、単位
時刻毎にデータを入力して加算処理を実行するものには
すべて適用することができ、特にDSP等の累積加算処
理をパイプライン状に実行する累積加算器に適用するこ
とができる。
BEST MODE FOR CARRYING OUT THE INVENTION The cumulative adder according to the present invention can be applied to all those that input data for each unit time and execute addition processing. In particular, cumulative addition processing such as DSP is pipelined. The present invention can be applied to a cumulative adder that executes in a similar manner.

【0038】第1の実施形態 図1は本発明の第1の実施形態に係る累積加算器の構成
図である。図1に示す累積加算器は図5に示す累積加算
器と同様のもので、高速化実現のため累積加算処理をパ
イプライン状に実行する累積加算器に適用した例であ
る。
First Embodiment FIG. 1 is a block diagram of a cumulative adder according to a first embodiment of the present invention. The cumulative adder shown in FIG. 1 is the same as the cumulative adder shown in FIG. 5, and is an example applied to a cumulative adder that executes a cumulative addition process in a pipeline to realize a high speed operation.

【0039】図1において、累積加算器100は、第1
の入力端子101、第2の入力端子102、パイプライ
ンレジスタ104を備えた乗算器103、第1の乗算レ
ジスタ105、第1の加算器106、第1の累積加算レ
ジスタ107、キャリーレジスタ108、第2の乗算レ
ジスタ109、第2の加算器110、第2の累積加算レ
ジスタ111、第3の加算器112、出力レジスタ11
3、及び出力端子114から構成されている。データの
演算精度は入力データが32ビット、演算後の出力デー
タが64ビットである。
In FIG. 1, the cumulative adder 100 has a first
Input terminal 101, second input terminal 102, multiplier 103 including pipeline register 104, first multiplication register 105, first adder 106, first cumulative addition register 107, carry register 108, Second multiplication register 109, second adder 110, second cumulative addition register 111, third adder 112, output register 11
3 and an output terminal 114. The data calculation accuracy is 32 bits for input data and 64 bits for output data after calculation.

【0040】第1の乗算レジスタ105、第1の加算器
106及び第1の累積加算レジスタ107は全体として
第1の加算処理部115を構成し、第2の乗算レジスタ
109、第2の加算器110及び第2の累積加算レジス
タ111は全体として第2の加算処理部116を構成す
る。
The first multiplication register 105, the first adder 106, and the first cumulative addition register 107 constitute a first addition processing section 115 as a whole, and the second multiplication register 109 and the second adder are included. 110 and the second cumulative addition register 111 collectively constitute the second addition processing unit 116.

【0041】すなわち、累積加算器100は、図5に示
す従来の累積加算器10の加算処理部(第1の加算処理
部115に相当する)と並列に、同様な構成の第2の加
算処理部116と、第1の加算処理部115の加算結果
の最上位の1ビットを格納するキャリーレジスタ108
と、第2の加算処理部116の加算結果とキャリーレジ
スタ108出力とを加算する第3の加算器112と、第
3の加算器112の出力を上位側に、第1の加算処理部
115の加算結果を下位側にしてデータを連結して格納
する出力レジスタ113とを新たに設け、第1の加算処
理部115には乗算器13出力の下位側を入力し、第2
の加算処理部116には乗算器13出力の上位側を入力
して累積加算処理を行うとともに、第1の加算処理部1
15おける加算処理で発生した最上位の1ビットを、キ
ャリービットとしてキャリーレジスタ108に格納し
て、1サイクル後で第2の加算処理部116に足すよう
に構成する。
That is, the cumulative adder 100 is arranged in parallel with the addition processing section (corresponding to the first addition processing section 115) of the conventional cumulative adder 10 shown in FIG. Unit 116 and carry register 108 for storing the most significant 1 bit of the addition result of first addition processing unit 115.
And a third adder 112 for adding the addition result of the second addition processing unit 116 and the output of the carry register 108, and the output of the third addition unit 112 to the upper side, and the output of the first addition processing unit 115 An output register 113 for additionally storing the data with the addition result set to the lower side is stored, and the lower side of the output of the multiplier 13 is input to the first addition processing unit 115,
The higher-order side of the output of the multiplier 13 is input to the addition processing unit 116 to perform cumulative addition processing, and the first addition processing unit 1
The most significant 1 bit generated in the addition process in 15 is stored in the carry register 108 as a carry bit, and is added to the second addition processing unit 116 after one cycle.

【0042】累積加算器100の第1の入力端子101
及び第2の入力端子102には、32ビットの入力デー
タがそれぞれ入力され、乗算器103に供給される。乗
算器103は、2入力データの乗算処理を行なって64
ビット精度の乗算データを出力する。
First input terminal 101 of cumulative adder 100
Input data of 32 bits is input to each of the input terminals 102 and 102 and supplied to the multiplier 103. The multiplier 103 multiplies the two input data by 64.
Outputs bit-precision multiplication data.

【0043】ここで、乗算器103の処理速度は累積加
算器100の他の演算部に比べて遅いため1組の乗算処
理に複数サイクルを要するのが普通である。このため、
乗算器103の内部にパイプラインレジスタ104を設
けて、毎サイクルデータの入力及び乗算データの出力が
可能なようにしている。
Here, since the processing speed of the multiplier 103 is slower than that of the other arithmetic units of the cumulative adder 100, a plurality of cycles are usually required for one set of multiplication processing. For this reason,
A pipeline register 104 is provided inside the multiplier 103 to enable input of data every cycle and output of multiplication data.

【0044】乗算器103から出力された乗算結果は、
一旦第1の乗算レジスタ105及び第2の乗算レジスタ
105に蓄えられる。乗算レジスタは乗算結果の下位3
2ビットを蓄える第1の乗算レジスタ105と、上位3
2ビットを蓄える第2の乗算レジスタ105とから構成
される。
The multiplication result output from the multiplier 103 is
It is temporarily stored in the first multiplication register 105 and the second multiplication register 105. The multiplication register is the lower 3 of the multiplication result
The first multiplication register 105 that stores 2 bits and the upper 3
It is composed of a second multiplication register 105 which stores 2 bits.

【0045】第1の乗算レジスタ105から出力された
乗算結果の下位32ビットデータは、第1の入力データ
として第1の加算器106に入力される。第1の加算器
106では、第1の乗算レジスタ105からの下位32
ビット乗算結果と後述する第1の累積加算レジスタ10
7から出力される32ビット長の累積加算データとの加
算処理を行う。
The lower 32-bit data of the multiplication result output from the first multiplication register 105 is input to the first adder 106 as the first input data. In the first adder 106, the lower 32 bits from the first multiplication register 105 are
Bit multiplication result and first cumulative addition register 10 described later
The addition processing with the cumulative addition data of 32 bit length output from 7 is performed.

【0046】ここで、第1の加算器106が出力する加
算結果は33ビットのデータ長となり、最上位の1ビッ
トはキャリーレジスタ108に格納し、下位32ビット
は第1の累積加算レジスタ107に格納する。
Here, the addition result output from the first adder 106 has a data length of 33 bits, the most significant 1 bit is stored in the carry register 108, and the lower 32 bits are stored in the first cumulative addition register 107. Store.

【0047】一方、第2の乗算レジスタ109に格納さ
れた乗算結果の上位32ビットは第2の加算器110に
入力され、後述する第2の累積加算レジスタ111から
出力される32ビット長のデータ、及びキャリーレジス
タ108から出力される1ビットのデータとの加算処理
を行う。第2の加算器110から出力される加算結果は
33ビットのデータ長となり、第2の累積加算レジスタ
111に格納する。第2の累積加算レジスタ111では
入力データ長が33ビット、出力データ長が32ビット
となる。データ長を1ビット削減する方法には、単純に
最上位の1ビットを削減する、あるいは飽和演算処理を
行うなどの方法がある。飽和演算処理を行う場合には、
第2の累積加算レジスタ111で桁溢れが発生した時点
で、第1の累積加算レジスタ107の値も修正する。
On the other hand, the upper 32 bits of the multiplication result stored in the second multiplication register 109 is input to the second adder 110 and the 32-bit length data output from the second cumulative addition register 111 described later. , And 1-bit data output from carry register 108. The addition result output from the second adder 110 has a data length of 33 bits and is stored in the second cumulative addition register 111. In the second cumulative addition register 111, the input data length is 33 bits and the output data length is 32 bits. As a method of reducing the data length by 1 bit, there is a method of simply reducing the most significant 1 bit or performing a saturation operation process. When performing saturation calculation processing,
When the overflow occurs in the second cumulative addition register 111, the value of the first cumulative addition register 107 is also corrected.

【0048】第3の加算器112では、第2の累積加算
レジスタ111から出力された32ビットデータと、キ
ャリーレジスタ108から出力される1ビットのデータ
との加算処理を行なって32ビット長のデータを出力す
る。ここでも、第2の累積加算レジスタ111からの出
力の場合と同様に最上位1ビットの削減を行う。
In the third adder 112, the 32-bit data output from the second cumulative addition register 111 and the 1-bit data output from the carry register 108 are added to each other to obtain 32-bit length data. Is output. Here again, the most significant 1 bit is reduced as in the case of the output from the second cumulative addition register 111.

【0049】出力レジスタ113は第3の加算器112
が出力する32ビットデータを上位側に、第1の累積加
算レジスタ107が出力する32ビットデータを下位側
に連結した合計64ビットのデータを蓄える。
The output register 113 is the third adder 112.
The 32-bit data output from the first cumulative addition register 107 is concatenated with the 32-bit data output from the first cumulative addition register 107 to the lower side, and a total of 64-bit data is stored.

【0050】出力レジスタ113の出力を、累積加算器
100の演算結果として出力端子114から外部に出力
する。
The output of the output register 113 is output to the outside from the output terminal 114 as the calculation result of the cumulative adder 100.

【0051】次に、上述のように構成された累積加算器
100の動作を説明する。
Next, the operation of the cumulative adder 100 configured as described above will be described.

【0052】本累積加算器100は、乗算器103から
の出力を上位側と下位側に分割し、第1の加算処理部1
15には乗算器13出力の下位側を入力し、第2の加算
処理部116には乗算器13出力の上位側を入力して累
積加算処理を行うとともに、下位側の第1の加算処理部
115おける加算処理で発生したキャリービットを1サ
イクル後で上位側の第2の加算処理部116で足すよう
にすることによって1サイクルでの64ビット加算処理
を不要にするものである。
The cumulative adder 100 divides the output from the multiplier 103 into an upper side and a lower side, and the first addition processing section 1
The lower side of the output of the multiplier 13 is input to 15 and the upper side of the output of the multiplier 13 is input to the second addition processing unit 116 to perform cumulative addition processing, and at the same time, the first addition processing unit of the lower side is input. The carry bit generated in the addition processing in 115 is added in the second addition processing unit 116 on the upper side after one cycle, thereby eliminating the 64-bit addition processing in one cycle.

【0053】以下、図2のタイミングチャートを参照し
ながら各部の動作及び全体動作を説明する。
The operation and overall operation of each part will be described below with reference to the timing chart of FIG.

【0054】図2は累積加算器100の動作を示すタイ
ミングチャートである。図2中、Xは第1の入力デー
タ、Yは第2の入力データ、pipe-Mはパイプラインレ
ジスタ104の内部データ、MLは第1の乗算レジスタ
105の下位32ビット格納データ、Cはキャリーレジ
スタ108のキャリーデータ、ALは第1の累積加算レ
ジスタ107の格納データ、MHは第2の乗算レジスタ
109の上位32ビット格納データ、AHは第2の累積
加算レジスタ111の格納データ、Zは出力データであ
り、tは処理サイクルごとの時刻を示す。
FIG. 2 is a timing chart showing the operation of the cumulative adder 100. In FIG. 2, X is the first input data, Y is the second input data, pipe-M is the internal data of the pipeline register 104, ML is the lower 32-bit storage data of the first multiplication register 105, and C is the carry. Carry data in register 108, AL is data stored in first cumulative addition register 107, MH is data stored in upper 32 bits of second multiplication register 109, AH is data stored in second cumulative addition register 111, and Z is output. This is data, and t indicates the time of each processing cycle.

【0055】ここでは、数3に示すように4項の累積加
算処理を実現する場合を例にとり動作を説明する。
Here, the operation will be described by taking as an example the case where the cumulative addition processing of the fourth term is realized as shown in Expression 3.

【0056】[0056]

【数3】 (Equation 3)

【0057】図2中、乗算データmhk及びmlkは、そ
れぞれ式(2)、式(3)で示される。
In FIG. 2, the multiplication data mhk and mlk are represented by equations (2) and (3), respectively.

【0058】 mhk=(xk×yk)63...32 …式(2) mlk=(xk×yk)31...0 …式(3) ここで、式(2)において(N)63...32はデータNの
ビット位置63から32までの連続する32ビットデー
タを表している。
Mhk = (xk × yk) 63 ... 32 Equation (2) mlk = (xk × yk) 31 ... 0 Equation (3) Here, in the equation (2), (N) 63. ..32 represents continuous 32-bit data of bit positions 63 to 32 of data N.

【0059】また、累積加算データshk及びslkは、
それぞれ式(4)、式(5)で示される。
The cumulative addition data shk and slk are
These are represented by equations (4) and (5), respectively.

【0060】 (ck,slk)=slk-1+mlk …式(4) shk=shk-1+mhk+ck-1 …式(5) ここで、キャリーレジスタ108の初期値c0のときの
累積加算データsh0及びsl0は、式(6)で示され
る。
(Ck, slk) = slk-1 + mlk (4) shk = shk-1 + mhk + ck-1 (5) Here, the cumulative addition data sh0 and sl0 when the initial value c0 of the carry register 108 is: It is shown by the equation (6).

【0061】 c0=sl0=sh0=0 …式(6) また、式(4)に示す(ck,slk)は、式(4)中の
右辺の演算結果の最上位1ビットをキャリーレジスタ1
08への入力とし、下位32ビットを第1の乗算レジス
タ105の入力とすることを表している。
C0 = sl0 = sh0 = 0 Equation (6) Further, in (ck, slk) shown in Equation (4), the most significant 1 bit of the operation result on the right side of Equation (4) is stored in carry register 1
08, and the lower 32 bits are input to the first multiplication register 105.

【0062】また、[mk]はmkの演算途中であるパイ
プラインレジスタ104内の値を示している。
[Mk] indicates the value in the pipeline register 104 during the calculation of mk.

【0063】以下、累積加算器100の動作を単位時刻
ごとに説明する。
The operation of the cumulative adder 100 will be described below for each unit time.

【0064】まず、時刻0(t=0)に第1の入力端子
101及び第2の入力端子102にデータx1及びy1が
入力され、累積加算処理を開始する。
First, at time 0 (t = 0), the data x1 and y1 are input to the first input terminal 101 and the second input terminal 102, and the cumulative addition process is started.

【0065】時刻0には乗算処理の前半部を行い、この
結果をパイプラインレジスタ104(pipe-M)に格納
する。ここで、乗算器103内部に設けられたパイプラ
インレジスタ104によって毎サイクルデータの入力及
び乗算データの出力が可能となる。
At time 0, the first half of the multiplication process is performed, and the result is stored in the pipeline register 104 (pipe-M). Here, the pipeline register 104 provided inside the multiplier 103 enables input of data every cycle and output of multiplication data.

【0066】時刻1には1組目の入力データ(x1,y
1)の乗算処理の後半部を行い、この結果の下位32ビ
ットを第1の乗算レジスタ105(ML)に格納し(m
l1)、上位32ビットを第2の乗算レジスタ109
(MH)に格納する(mh1)。これと同時に2組目の
入力データ(x2,y2)が入力され、乗算処理の前半部
を行い、この結果をパイプラインレジスタ104(pipe
-M)に結果を格納する。
At time 1, the first set of input data (x1, y
The latter half of the multiplication process of 1) is performed, and the lower 32 bits of this result are stored in the first multiplication register 105 (ML) (m
11), the upper 32 bits are used as the second multiplication register 109
It is stored in (MH) (mh1). At the same time, the second set of input data (x2, y2) is input, the first half of the multiplication process is performed, and the result is stored in the pipeline register 104 (pipe).
-Store the result in M).

【0067】このように、乗算器103からの乗算出力
のうち、下位32ビットデータが第1の乗算レジスタ1
05(ML)に格納され、上位32ビットデータが第2
の乗算レジスタ109(MH)に格納される。
As described above, of the multiplication output from the multiplier 103, the lower 32 bits of data are the first multiplication register 1
Stored in 05 (ML) and the upper 32 bits of data are the second
Stored in the multiplication register 109 (MH).

【0068】時刻2には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml1)と第1の累積加算レジスタ107(AL)に
蓄えられた初期値(0)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻すとともに(sl1)、加算結果の最上位1ビ
ットをキャリーレジスタ108(C)に格納する(c
1)。
At time 2, the first adder 106 makes the first
The multiplication result (ml1) stored in the multiplication register 105 (ML) and the initial value (0) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are 1 cumulative addition register 107 (AL)
(Sl1) and stores the most significant 1 bit of the addition result in carry register 108 (C) (c).
1).

【0069】また、第2の加算器110により第2の乗
算レジスタ109(MH)に格納された乗算結果(sh
1)と第2の累積加算レジスタ111(AH)に蓄えら
れた初期値(0)とキャリーレジスタ108(C)に蓄
えられた初期値(0)の加算を行い、加算結果を第2の
累積加算レジスタ111(AH)に書き戻す(sh
1)。これと同時に、2組目の入力データ(x2,y2)
の乗算処理の後半部を行い、この結果を第2の乗算レジ
スタ109(MH)及び第1の乗算レジスタ105(M
L)に格納する(mh2とml2)。さらに、3組目の入
力データ(x3,y3)が入力され、乗算処理の前半部を
行い、この結果をパイプラインレジスタ104(pipe-
M)に結果を格納する。
In addition, the multiplication result (sh) stored in the second multiplication register 109 (MH) by the second adder 110.
1) and the initial value (0) stored in the second cumulative addition register 111 (AH) and the initial value (0) stored in the carry register 108 (C) are added, and the addition result is the second cumulative value. Write back to the addition register 111 (AH) (sh
1). At the same time, the second set of input data (x2, y2)
The second half of the multiplication process is performed, and the result is the second multiplication register 109 (MH) and the first multiplication register 105 (M).
L) (mh2 and ml2). Furthermore, the third set of input data (x3, y3) is input, the first half of the multiplication process is performed, and the result is pipeline register 104 (pipe-
Store the result in M).

【0070】このように、時刻2の段階では、第1の乗
算レジスタ105(ML)に格納された乗算結果(ml
1)と第1の累積加算レジスタ107(AL)に蓄えら
れた初期値(0)とが第1の加算器106により累積加
算されて、再び、第1の累積加算レジスタ107(A
L)に書き戻されるとともに(sl1)、加算結果の最
上位1ビットがキャリーレジスタ108(C)に格納さ
れる(c1)。また、2組目の入力データ(x2,y2)
の乗算処理の後半部分と、3組目の入力データ(x3,
y3)の乗算処理の前半部の処理が同様に実行される。
As described above, in the stage of time 2, the multiplication result (ml) stored in the first multiplication register 105 (ML) is stored.
1) and the initial value (0) stored in the first cumulative addition register 107 (AL) are cumulatively added by the first adder 106, and again the first cumulative addition register 107 (A
It is written back to L) (sl1), and the most significant 1 bit of the addition result is stored in carry register 108 (C) (c1). Also, the second set of input data (x2, y2)
2nd half of the multiplication process of and the third set of input data (x3,
The first half of the multiplication process of y3) is similarly executed.

【0071】時刻3には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml2)と第1の累積加算レジスタ107(AL)に
蓄えられた値(sl1)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻し(sl2)、加算結果の最上位1ビットをキ
ャリーレジスタ108(C)に格納する(c2)。
At time 3, the first adder 106 makes the first
The multiplication result (ml2) stored in the multiplication register 105 (ML) and the value (sl1) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are Cumulative addition register 107 (AL)
Is written back to (sl2) and the most significant 1 bit of the addition result is stored in the carry register 108 (C) (c2).

【0072】また、第2の加算器110により第2の乗
算レジスタ109(MH)に格納された乗算結果(mh
2)と第2の累積加算レジスタ111(AH)に格納さ
れた値(mh1)とキャリーレジスタ108(C)に蓄
えられた値(c1)の加算を行い、加算結果を第2の累
積加算レジスタ111(AH)に書き戻す(sh2)。
The multiplication result (mh stored in the second multiplication register 109 (MH) by the second adder 110
2) and the value (mh1) stored in the second cumulative addition register 111 (AH) and the value (c1) stored in the carry register 108 (C) are added, and the addition result is stored in the second cumulative addition register. Write back to 111 (AH) (sh2).

【0073】第3の加算器112では第2の累積加算レ
ジスタ111(AH)が出力する値(sh1)とキャリ
ーレジスタ108(C)が出力する値(c1)の加算結
果を求め、出力レジスタ113(S)に、第3の加算器
112が出力する値を上位32ビットに、第1の累積加
算レジスタ107(AL)が出力する値(sl1)を下
位32ビットに連結した値(s1)を出力する。これと
同時に3組目の入力データの乗算処理の後半部を行い、
この結果を第2の乗算レジスタ109(MH)と第1の
乗算レジスタ105(ML)に格納する(mh3とml
3)。さらに、4組目の入力データ(x4,y4)が入力
され、乗算処理の前半部を行い、この結果をパイプライ
ンレジスタ104(pipe-M)に結果を格納する。
The third adder 112 obtains the addition result of the value (sh1) output by the second cumulative addition register 111 (AH) and the value (c1) output by the carry register 108 (C), and outputs the output register 113. In (S), the value (s1) obtained by concatenating the value output from the third adder 112 into the upper 32 bits and the value (sl1) output from the first cumulative addition register 107 (AL) into the lower 32 bits is added. Output. At the same time, the latter half of the multiplication process of the third set of input data is performed.
The result is stored in the second multiplication register 109 (MH) and the first multiplication register 105 (ML) (mh3 and ml).
3). Further, the fourth set of input data (x4, y4) is input, the first half of the multiplication process is performed, and the result is stored in the pipeline register 104 (pipe-M).

【0074】このように、時刻3の段階では、3組目の
入力データ(x3,y3)に対し時刻2で述べた場合と同
様な処理、すなわち、累積加算処理を上位側と下位側に
分けて行い、かつ、加算結果の最上位1ビットをキャリ
ーレジスタ108(C)に格納する(c1)動作に加
え、さらに第3の加算器112によって第2の累積加算
レジスタ111(AH)の出力値(sh1)とキャリー
レジスタ108(C)の出力値(c1)とを加算し、そ
の加算結果を上位32ビットとし、第1の累積加算レジ
スタ107(AL)の出力値(sl1)を下位32ビッ
トとして出力レジスタ113(S)に格納する動作が行
われる。これにより、出力レジスタ113(S)には、
連結されて64ビットデータになった累積加算結果が格
納される。また、4組目の入力データ(x4,y4)の乗
算処理の前半部の処理が同様に実行される。
As described above, at the stage of time 3, the same process as that described at time 2 for the third set of input data (x3, y3), that is, the cumulative addition process is divided into the upper side and the lower side. In addition to the operation (c1) of storing the most significant 1 bit of the addition result in the carry register 108 (C), the output value of the second cumulative addition register 111 (AH) is further output by the third adder 112. (Sh1) is added to the output value (c1) of the carry register 108 (C), the addition result is the upper 32 bits, and the output value (sl1) of the first cumulative addition register 107 (AL) is the lower 32 bits. Is stored in the output register 113 (S). As a result, the output register 113 (S)
The cumulative addition result that is concatenated into 64-bit data is stored. Further, the processing of the first half of the multiplication processing of the fourth set of input data (x4, y4) is similarly executed.

【0075】時刻4には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml3)と第1の累積加算レジスタ107(AL)に
蓄えられた値(sl2)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻すとともに(sl3)、加算結果の最上位1ビ
ットをキャリーレジスタ108(C)に格納する(c
3)。
At time 4, the first adder 106 makes the first
The multiplication result (ml3) stored in the multiplication register 105 (ML) and the value (s12) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are set to the first Cumulative addition register 107 (AL)
(Sl3) and stores the most significant 1 bit of the addition result in carry register 108 (C) (c)
3).

【0076】また、第2の加算器110により(MH)
に格納された乗算結果(mh3)と第2の累積加算レジ
スタ111(AH)に蓄えられた値(sh2)とキャリ
ーレジスタ108(C)に蓄えられた値(c2)の加算
を行い、加算結果を第2の累積加算レジスタ111(A
H)に書き戻す(sh3)。
Further, the second adder 110 causes (MH)
Is added to the multiplication result (mh3) stored in the second cumulative addition register 111 (AH) and the value (c2) stored in the carry register 108 (C). To the second cumulative addition register 111 (A
Write back to H) (sh3).

【0077】第3の加算器112では第2の累積加算レ
ジスタ111(AH)が出力する値(sh2)とキャリ
ーレジスタ108(C)が出力する値(c2)の加算結
果を求め、出力端子114(Z)に、第3の加算器11
2が出力する値を上位32ビットに、第1の累積加算レ
ジスタ107(AL)が出力する値(sl2)を下位3
2ビットに連結した値(s2)を出力する。これによ
り、累積加算器100の出力端子114(Z)には前時
刻に出力レジスタ113に蓄えられた出力データ(s
1)が出力される。これと同時に4組目の入力データの
乗算処理の後半部を行い、この結果を第2の乗算レジス
タ109(MH)と第1の乗算レジスタ105(ML)
に格納する(mh4とml4)。図2では示されていない
が同様にして、5組目の入力データ(x5,y5)が入力
されて、乗算処理の前半部を行い、この結果がパイプラ
インレジスタ104(pipe-M)格納される。
The third adder 112 obtains the addition result of the value (sh2) output by the second cumulative addition register 111 (AH) and the value (c2) output by the carry register 108 (C), and the output terminal 114 In (Z), the third adder 11
The value output by 2 is in the upper 32 bits, and the value output by the first cumulative addition register 107 (AL) (s12) is in the lower 3
A value (s2) concatenated into 2 bits is output. As a result, the output data (s) stored in the output register 113 at the previous time is output to the output terminal 114 (Z) of the cumulative adder 100.
1) is output. At the same time, the latter half of the multiplication process of the fourth set of input data is performed, and the result is the second multiplication register 109 (MH) and the first multiplication register 105 (ML).
Store in (mh4 and ml4). Although not shown in FIG. 2, similarly, the fifth set of input data (x5, y5) is input, the first half of the multiplication process is performed, and the result is stored in the pipeline register 104 (pipe-M). It

【0078】このように、時刻4の段階では、時刻3で
述べた場合と同様な処理が実行され、累積加算器100
の出力端子114(Z)からは前時刻に出力レジスタ1
13に蓄えられた出力データ(s1)が出力される。ま
た、4組目の入力データの乗算処理の後半部の処理が実
行される。
As described above, in the stage of time 4, the same processing as that described in time 3 is executed, and the cumulative adder 100
From the output terminal 114 (Z) of the output register 1 at the previous time.
The output data (s1) stored in 13 is output. Further, the processing of the latter half of the multiplication processing of the fourth set of input data is executed.

【0079】時刻5には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml4)と第1の累積加算レジスタ107(AL)に
蓄えられた値(sl3)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻すとともに(sl4)、加算結果の最上位1ビ
ットをキャリーレジスタ108(C)に格納する(c
4)。
At time 5, the first adder 106 makes the first
The multiplication result (ml4) stored in the multiplication register 105 (ML) and the value (sl3) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are Cumulative addition register 107 (AL)
And the most significant 1 bit of the addition result is stored in the carry register 108 (C) (c).
Four).

【0080】また、第2の加算器110により(MH)
に格納された乗算結果(mh4)と第2の累積加算レジ
スタ111(AH)に蓄えられた値(sh3)とキャリ
ーレジスタ108(C)に蓄えられた値(c3)の加算
を行い、加算結果を第2の累積加算レジスタ111(A
H)に書き戻す(sh4)。
Further, the second adder 110 causes (MH)
The multiplication result (mh4) stored in the second cumulative addition register 111 (AH) and the value (sh3) stored in the carry register 108 (C) are added, and the addition result is added. To the second cumulative addition register 111 (A
Write back to H) (sh4).

【0081】第3の加算器112では第2の累積加算レ
ジスタ111(AH)が出力する値(sh3)とキャリ
ーレジスタ108(C)が出力する値(c3)の加算結
果を求め、出力端子114(Z)に出力する。ここで、
出力端子114(Z)には、第3の加算器112が出力
する値を上位32ビットに、第1の累積加算レジスタ1
07(AL)が出力する値(sl3)を下位32ビット
に連結した値(s3)が出力される。累積加算器100
の出力端子114(Z)には前時刻に出力レジスタ11
3に蓄えられた出力データ(s2)が出力される。
The third adder 112 obtains the addition result of the value (sh3) output from the second cumulative addition register 111 (AH) and the value (c3) output from the carry register 108 (C), and the output terminal 114 Output to (Z). here,
The output terminal 114 (Z) outputs the value output from the third adder 112 to the upper 32 bits, and outputs the value to the first cumulative addition register 1
The value (s3) obtained by concatenating the value (sl3) output by 07 (AL) with the lower 32 bits is output. Cumulative adder 100
To the output terminal 114 (Z) of the output register 11 at the previous time.
The output data (s2) stored in 3 is output.

【0082】時刻6には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml4)と第1の累積加算レジスタ107(AL)に
蓄えられた値(sl3)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻すとともに(sl4)、加算結果の最上位1ビ
ットをキャリーレジスタ108(C)に格納する(c
4)。
At time 6, the first adder 106 makes the first
The multiplication result (ml4) stored in the multiplication register 105 (ML) and the value (sl3) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are Cumulative addition register 107 (AL)
And the most significant 1 bit of the addition result is stored in the carry register 108 (C) (c).
Four).

【0083】また、第2の加算器110により(MH)
に格納された乗算結果(mh4)と第2の累積加算レジ
スタ111(AH)に蓄えられた値(sh3)とキャリ
ーレジスタ108(C)に蓄えられた値(c3)の加算
を行い、加算結果を第2の累積加算レジスタ111(A
H)に書き戻す(sh4)。
Further, the second adder 110 causes (MH)
The multiplication result (mh4) stored in the second cumulative addition register 111 (AH) and the value (sh3) stored in the carry register 108 (C) are added, and the addition result is added. To the second cumulative addition register 111 (A
Write back to H) (sh4).

【0084】第3の加算器112では第2の累積加算レ
ジスタ111(AH)が出力する値(sh4)とキャリ
ーレジスタ108(C)が出力する値(c4)の加算結
果を求め、出力端子114(Z)に、第3の加算器11
2が出力する値を上位32ビットに、第1の累積加算レ
ジスタ107(AL)が出力する値(sl4)を下位3
2ビットに連結した値(s4)を出力する。累積加算器
100の出力端子114(Z)には前時刻に出力レジス
タ113に蓄えられた出力データ(s3)が出力され
る。
The third adder 112 obtains the addition result of the value (sh4) output from the second cumulative addition register 111 (AH) and the value (c4) output from the carry register 108 (C), and the output terminal 114 In (Z), the third adder 11
The value output by 2 is in the upper 32 bits, and the value output by the first cumulative addition register 107 (AL) (sl4) is in the lower 3
A value (s4) concatenated into 2 bits is output. The output data (s3) stored in the output register 113 at the previous time is output to the output terminal 114 (Z) of the cumulative adder 100.

【0085】時刻7には時刻6に出力レジスタ113に
蓄えられた出力データ(s4)を出力端子108から累
積加算器100の外部に出力して処理を終了する。
At time 7, the output data (s4) stored in the output register 113 at time 6 is output from the output terminal 108 to the outside of the cumulative adder 100, and the process ends.

【0086】このようにして、時刻0〜時刻7を要して
4組目までの入力データの累積加算処理が終了する。こ
こでは、4組目までの入力データについて累積加算処理
を実行する例を示したが、実際には逐次、第1の入力端
子101(X)及び第2の入力端子102(Y)にデー
タが入力され、累積加算処理が実行される。
In this way, the cumulative addition process of the input data up to the fourth set is completed after the time 0 to the time 7. Here, an example is shown in which the cumulative addition processing is executed for up to the fourth set of input data, but in reality, data is sequentially input to the first input terminal 101 (X) and the second input terminal 102 (Y). It is input and the cumulative addition process is executed.

【0087】この場合、図2に示すように1サイクル
(時刻tごと)に上位側と下位側に分けて加算が行わ
れ、下位側の加算処理で発生したキャリービットを1サ
イクル後で上位側に足し、出力レジスタ113で64ビ
ットに連結しているので、64ビット加算処理が32ビ
ット加算処理と同じサイクル数で実現できる。
In this case, as shown in FIG. 2, the addition is performed by dividing into the upper side and the lower side in one cycle (every time t), and the carry bit generated in the addition processing on the lower side is transferred to the upper side one cycle later. In addition, since the output register 113 is connected to 64 bits, the 64-bit addition processing can be realized in the same number of cycles as the 32-bit addition processing.

【0088】以上説明したように、本発明を適用した第
1の実施形態に係る累積加算器100は、パイプライン
レジスタ104を備えた乗算器103と、第1の乗算レ
ジスタ105、第1の加算器106及び第1の累積加算
レジスタ107からなる第1の加算処理部115と、第
2の乗算レジスタ109、第2の加算器110及び第2
の累積加算レジスタ111からなる第2の加算処理部1
16と、第1の加算処理部115の加算結果の最上位の
1ビットを格納するキャリーレジスタ108と、第2の
加算処理部116の加算結果とキャリーレジスタ108
出力とを加算する第3の加算器112と、第3の加算器
112の出力を上位側に、第1の加算処理部115の加
算結果を下位側にしてデータを連結して格納する出力レ
ジスタ113とを新たに設け、第1の加算処理部115
には乗算器13出力の下位側を入力し、第2の加算処理
部116には乗算器13出力の上位側を入力して累積加
算処理を行うとともに、第1の加算処理部115おける
加算処理で発生した最上位の1ビットを、キャリービッ
トとしてキャリーレジスタ108に格納して、1サイク
ル後で第2の加算処理部116に足すように構成してい
るので、64ビット加算処理を高速に実現することがで
き、累積加算器100全体の高速化を図ることができ
る。
As described above, the cumulative adder 100 according to the first embodiment to which the present invention is applied includes the multiplier 103 having the pipeline register 104, the first multiplication register 105, and the first addition. Adder 106 including first multiplier 106 and first cumulative addition register 107, second multiplication register 109, second adder 110, and second adder 110
Second addition processing unit 1 including the cumulative addition register 111 of
16, a carry register 108 that stores the most significant 1 bit of the addition result of the first addition processing unit 115, an addition result of the second addition processing unit 116, and a carry register 108.
A third adder 112 that adds the output and an output register that stores the data by concatenating the data with the output of the third adder 112 on the upper side and the addition result of the first addition processing unit 115 on the lower side. 113 and a new addition processing unit 115.
Is input to the lower side of the multiplier 13 output, and the upper side of the output of the multiplier 13 is input to the second addition processing unit 116 to perform cumulative addition processing, and addition processing in the first addition processing unit 115 is performed. Since the most significant 1 bit generated in 1 is stored in the carry register 108 as a carry bit and added to the second addition processing unit 116 after one cycle, the 64-bit addition processing is realized at high speed. Therefore, the speed of the cumulative adder 100 as a whole can be increased.

【0089】すなわち、図2に示すように加算処理を、
上位側と下位側に分けて1サイクル中に同時に実行して
いるため、64ビット加算処理でありながら32ビット
の加算処理と同じサイクルで実現することができる。3
2ビットの加算処理は高速であるため、従来例では、加
算器により律速されていた欠点が解消でき、累積加算器
100全体の高速化を図ることができる。また、従来例
のように、累積加算を、乗算結果の上位あるいは下位側
の32ビットに削減するような態様ではないため演算精
度の低下は全く生じない。
That is, the addition process as shown in FIG.
Since the upper side and the lower side are divided and executed at the same time in one cycle, the 64-bit addition processing can be realized in the same cycle as the 32-bit addition processing. 3
Since the 2-bit addition process is fast, the drawbacks that are rate-controlled by the adder in the conventional example can be solved, and the speed of the entire cumulative adder 100 can be increased. Further, unlike the conventional example, since the cumulative addition is not reduced to 32 bits on the upper or lower side of the multiplication result, the calculation accuracy is not deteriorated at all.

【0090】第2の実施形態 図3は本発明の第2の実施形態に係る累積加算器の構成
図である。図3に示す累積加算器は図1に示す第1の実
施形態に係る累積加算器と同様のもので、高速化実現の
ため累積加算処理をパイプライン状に実行する累積加算
器に適用した例である。第2の実施形態に係る累積加算
器の説明にあたり、図1と同一又は対応する要素は同一
の符号で示されている。
Second Embodiment FIG. 3 is a block diagram of a cumulative adder according to a second embodiment of the present invention. The cumulative adder shown in FIG. 3 is the same as the cumulative adder according to the first embodiment shown in FIG. 1, and is an example applied to a cumulative adder that executes a cumulative addition process in a pipeline to realize a high speed. Is. In the description of the cumulative adder according to the second embodiment, elements that are the same as or correspond to those in FIG. 1 are denoted by the same symbols.

【0091】図1において、累積加算器200は、第1
の入力端子101、第2の入力端子102、パイプライ
ンレジスタ104を備えた乗算器103、第1の乗算レ
ジスタ105、第1の加算器106、第1の累積加算レ
ジスタ107、キャリーレジスタ108、第2の乗算レ
ジスタ109、第2の加算器110、第2の累積加算レ
ジスタ111、第1のセレクタ211、第3の加算器1
12、第2のセレクタ212、出力レジスタ113、及
び出力端子114から構成されている。データの演算精
度は入力データが32ビット、演算後の出力データが6
4ビットである。
In FIG. 1, the cumulative adder 200 has a first
Input terminal 101, second input terminal 102, multiplier 103 including pipeline register 104, first multiplication register 105, first adder 106, first cumulative addition register 107, carry register 108, Second multiplication register 109, second adder 110, second cumulative addition register 111, first selector 211, third adder 1
12, a second selector 212, an output register 113, and an output terminal 114. The data calculation accuracy is 32 bits for input data and 6 for output data after calculation.
4 bits.

【0092】第1の乗算レジスタ105、第1の加算器
106及び第1の累積加算レジスタ107は全体として
第1の加算処理部115を構成し、第2の乗算レジスタ
109、第2の加算器110及び第2の累積加算レジス
タ111は全体として第2の加算処理部116を構成す
る。
The first multiplication register 105, the first adder 106, and the first cumulative addition register 107 together constitute a first addition processing unit 115, and the second multiplication register 109 and the second adder 110 and the second cumulative addition register 111 collectively constitute the second addition processing unit 116.

【0093】すなわち、累積加算器200は、図1に示
す累積加算器100に、新たに第1の累積加算レジスタ
107及びキャリーレジスタ108の出力を選択する第
1のセレクタ211と、第1の累積加算レジスタ10
7、第2の累積加算レジスタ111及び第3の加算器1
12の出力を選択する第2のセレクタ212とを付加
し、第3の加算器112への入力をキャリーレジスタ1
08と第1の累積加算レジスタ107から選択可能な構
成にするとともに、累積加算器200からの出力値を第
1の累積加算レジスタ107、第2の累積加算レジスタ
111及び第3の加算器112出力から選択可能な構成
にし、これらセレクタにより32ビットのデータ長のデ
ータを乗算処理する32ビット乗算モードと、16ビッ
トのデータ長のデータを乗算処理する16ビット乗算モ
ードとが選択可能にしている。
That is, the cumulative adder 200 includes the first selector 211 for newly selecting the outputs of the first cumulative addition register 107 and the carry register 108, and the first cumulative addition in addition to the cumulative adder 100 shown in FIG. Addition register 10
7, second cumulative addition register 111 and third adder 1
A second selector 212 for selecting the output of 12 is added, and the input to the third adder 112 is added to the carry register 1
08 and the first cumulative addition register 107, and the output value from the cumulative adder 200 is output to the first cumulative addition register 107, the second cumulative addition register 111, and the third adder 112. From the selectors, a 32-bit multiplication mode in which data with a data length of 32 bits is multiplied and a 16-bit multiplication mode in which data with a data length of 16 bits are multiplied can be selected.

【0094】累積加算器200への入力データは、第1
の入力端子101及び第2の入力端子102から乗算器
103に供給される。乗算器103では、外部からの指
定により32ビット同士の乗算処理または上位側16ビ
ットと下位側16ビット同士の乗算処理の選択が可能で
ある。
The input data to the cumulative adder 200 is the first data
Are supplied to the multiplier 103 from the input terminal 101 and the second input terminal 102. The multiplier 103 can select a multiplication process of 32 bits or a multiplication process of 16 bits on the upper side and 16 bits on the lower side by designation from the outside.

【0095】すなわち、32ビット入力データx,yの
上位16ビットをxh,yh、下位16ビットをxl,
ylでそれぞれ表すとすると、32ビットの乗算処理に
よる出力mは、式(7)で示され、16ビット乗算処理
による出力は式(8)〜式(10)で示される。
That is, the upper 16 bits of the 32-bit input data x, y are xh, yh, the lower 16 bits are xl,
If each is represented by yl, the output m by the 32-bit multiplication processing is expressed by Expression (7), and the output by the 16-bit multiplication processing is expressed by Expressions (8) to (10).

【0096】 m=x×y=(xh,xl)×(yh,yl) …式(7) mh=xh×yh …式(8) ml=xl×yl …式(9) m =(mh,ml) …式(10) ここで、16ビット乗算処理であっても乗算結果mh,
mlは32ビットのデータ長となるので、いずれの場合
も乗算器103からの出力データは64ビット長であ
る。
M = x × y = (xh, xl) × (yh, yl) Equation (7) mh = xh × yh Equation (8) ml = xl × yl Equation (9) m = (mh, ml) Equation (10) Here, even in the 16-bit multiplication process, the multiplication result mh,
Since ml has a data length of 32 bits, the output data from the multiplier 103 is 64 bits in any case.

【0097】また、乗算器103の処理速度は累積加算
器200の他の演算部に比べて遅いため1組の乗算処理
に複数サイクルを要するのが普通である。このため、第
1の実施形態に係る累積加算器の場合と同様に、乗算器
103の内部にパイプラインレジスタ104を設けて、
毎サイクルデータの入力及び乗算データの出力が可能な
ようにしている。
Since the processing speed of the multiplier 103 is slower than that of the other arithmetic units of the cumulative adder 200, a plurality of cycles is usually required for one set of multiplication processing. Therefore, as in the case of the cumulative adder according to the first embodiment, the pipeline register 104 is provided inside the multiplier 103,
It is possible to input data every cycle and output multiplication data.

【0098】乗算器103から出力された乗算結果は、
一旦第1の乗算レジスタ105及び第2の乗算レジスタ
105に蓄えられる。乗算レジスタは乗算結果の下位3
2ビットを蓄える第1の乗算レジスタ105と、上位3
2ビットを蓄える第2の乗算レジスタ105とから構成
される。
The multiplication result output from the multiplier 103 is
It is temporarily stored in the first multiplication register 105 and the second multiplication register 105. The multiplication register is the lower 3 of the multiplication result
The first multiplication register 105 that stores 2 bits and the upper 3
It is composed of a second multiplication register 105 which stores 2 bits.

【0099】すなわち、16ビット乗算モードでは下位
側同士の乗算結果(ml)を第1の乗算レジスタ105
に蓄え、上位側同士の乗算結果(mh)を第2の乗算レ
ジスタ109に蓄えることになる。
That is, in the 16-bit multiplication mode, the multiplication result (ml) between the lower sides is set to the first multiplication register 105.
Then, the multiplication result (mh) of the upper side is stored in the second multiplication register 109.

【0100】第1の乗算レジスタ105から出力された
乗算結果の下位32ビットデータは、第1の入力データ
として第1の加算器106に入力される。第1の加算器
106では、第1の乗算レジスタ105からの下位32
ビット乗算結果と第1の累積加算レジスタ107から出
力される32ビット長の累積加算データとの加算処理を
行う。
The lower 32-bit data of the multiplication result output from the first multiplication register 105 is input to the first adder 106 as the first input data. In the first adder 106, the lower 32 bits from the first multiplication register 105 are
The addition processing of the bit multiplication result and the 32-bit-long cumulative addition data output from the first cumulative addition register 107 is performed.

【0101】ここで、第1の加算器106が出力する加
算結果は33ビットのデータ長となり、最上位の1ビッ
トはキャリーレジスタ108に格納し、下位32ビット
は第1の累積加算レジスタ107に格納する。さらに、
本実施形態に係る累積加算器200では、キャリーレジ
スタ108の出力は、第2の加算器110及び第1のセ
レクタ211に入力される。
Here, the addition result output from the first adder 106 has a data length of 33 bits, the most significant 1 bit is stored in the carry register 108, and the lower 32 bits are stored in the first cumulative addition register 107. Store. further,
In the cumulative adder 200 according to this embodiment, the output of the carry register 108 is input to the second adder 110 and the first selector 211.

【0102】一方、第2の乗算レジスタ109に格納さ
れた乗算結果の上位32ビットは第2の加算器110に
入力され、第2の累積加算レジスタ111から出力され
る32ビット長のデータ、及びキャリーレジスタ108
から出力される1ビットのデータとの加算処理を行う。
第2の加算器110から出力される加算結果は33ビッ
トのデータ長となり、第2の累積加算レジスタ111に
格納する。第2の累積加算レジスタ111では入力デー
タ長が33ビット、出力データ長が32ビットとなる。
データ長を1ビット削減する方法には、単純に最上位の
1ビットを削減する、あるいは飽和演算処理を行うなど
の方法がある。第2の累積加算レジスタ111の出力
は、第2の加算器110、第3の加算器112及び第2
のセレクタ212に入力される。
On the other hand, the upper 32 bits of the multiplication result stored in the second multiplication register 109 are input to the second adder 110 and the 32-bit length data output from the second cumulative addition register 111, and Carry register 108
The addition processing with the 1-bit data output from is performed.
The addition result output from the second adder 110 has a data length of 33 bits and is stored in the second cumulative addition register 111. In the second cumulative addition register 111, the input data length is 33 bits and the output data length is 32 bits.
As a method of reducing the data length by 1 bit, there is a method of simply reducing the most significant 1 bit or performing a saturation operation process. The output of the second cumulative addition register 111 is the second adder 110, the third adder 112, and the second adder 110.
Input to the selector 212.

【0103】第1のセレクタ211は、キャリーレジス
タ108からの出力または累積加算レジスタ107から
の出力の何れかを選択して第3の加算器112に出力す
る。
The first selector 211 selects either the output from the carry register 108 or the output from the cumulative addition register 107 and outputs it to the third adder 112.

【0104】第3の加算器112では、第2の累積加算
レジスタ111から出力された32ビットデータと、第
1のセレクタ211により選択された出力(キャリーレ
ジスタ108からの1ビット出力または累積加算レジス
タ107からの32ビット出力)との加算処理を行い、
32ビット長のデータを第2のセレクタ212に出力す
る。ここでも、第2の累積加算レジスタ111からの出
力の場合と同様に最上位1ビットの削減を行う。
In the third adder 112, the 32-bit data output from the second cumulative addition register 111 and the output selected by the first selector 211 (1-bit output from the carry register 108 or the cumulative addition register (32-bit output from 107)
The 32-bit data is output to the second selector 212. Here again, the most significant 1 bit is reduced as in the case of the output from the second cumulative addition register 111.

【0105】第2のセレクタ212は、第1の累積加算
レジスタ107の出力、第2の累積加算レジスタ111
の出力及び第3の加算器112の出力のうちの1つを選
択し、選択した出力を出力レジスタ113に出力する。
The second selector 212 outputs the output of the first cumulative addition register 107 and the second cumulative addition register 111.
And the output of the third adder 112, and outputs the selected output to the output register 113.

【0106】出力レジスタ113は第3の加算器112
が出力する32ビットデータを上位側に、第1の累積加
算レジスタ107が出力する32ビットデータを下位側
に連結した合計64ビットのデータを蓄える。
The output register 113 is the third adder 112.
The 32-bit data output from the first cumulative addition register 107 is concatenated with the 32-bit data output from the first cumulative addition register 107 to the lower side, and a total of 64-bit data is stored.

【0107】出力レジスタ113の出力を、累積加算器
200の演算結果として出力端子114から外部に出力
する。
The output of the output register 113 is output to the outside from the output terminal 114 as the calculation result of the cumulative adder 200.

【0108】次に、上述のように構成された累積加算器
200の動作を説明する。
Next, the operation of the cumulative adder 200 configured as described above will be described.

【0109】本実施形態に係る累積加算器200は、第
1のセレクタ211及び第2のセレクタ212により動
作モードを32ビット同士の累積加算モードと、16ビ
ット同士の累積加算モードとに切り換え可能にしたこと
を特徴としている。
The cumulative adder 200 according to the present embodiment can switch the operation mode between the cumulative addition mode of 32 bits and the cumulative addition mode of 16 bits by the first selector 211 and the second selector 212. It is characterized by having done.

【0110】累積加算器200の動作モードを、第1の
実施形態に係る累積加算器100の動作と同様な32ビ
ット同士の乗算モードにするには、以下のようにする。
すなわち、第1のセレクタ211は、常にキャリーレジ
スタ108からの出力を選択し、第2のセレクタ212
は、常に第3の加算器112からの出力を選択するよう
に設定する。このように設定すれば、図2に示した動作
タイミングと同様な動作を実現することができる。
To set the operation mode of the cumulative adder 200 to the 32-bit multiplication mode similar to the operation of the cumulative adder 100 according to the first embodiment, the following is done.
That is, the first selector 211 always selects the output from the carry register 108, and the second selector 212
Set to always select the output from the third adder 112. With this setting, the same operation as the operation timing shown in FIG. 2 can be realized.

【0111】したがって、ここでは、16ビット同士の
累積加算処理を行う場合の動作について説明する。
Therefore, the operation in the case of performing the cumulative addition process of 16 bits will be described here.

【0112】以下、図4のタイミングチャートを参照し
ながら各部の動作及び全体動作を説明する。
The operation of each part and the overall operation will be described below with reference to the timing chart of FIG.

【0113】図4は16ビット同士の累積加算処理にお
ける動作を示すタイミングチャートである。図4中、X
は第1の入力データ、Yは第2の入力データ、pipe-M
はパイプラインレジスタ104の内部データ、MLは第
1の乗算レジスタ105の下位32ビット格納データ、
ALは第1の累積加算レジスタ107の格納データ、M
Hは第2の乗算レジスタ109の上位32ビット格納デ
ータ、AHは第2の累積加算レジスタ111の格納デー
タ、Zは出力データであり、tは処理サイクルごとの時
刻を示す。
FIG. 4 is a timing chart showing the operation in the cumulative addition process of 16 bits. X in FIG.
Is the first input data, Y is the second input data, pipe-M
Is internal data of the pipeline register 104, ML is lower 32-bit storage data of the first multiplication register 105,
AL is data stored in the first cumulative addition register 107, M
H is data stored in the upper 32 bits of the second multiplication register 109, AH is data stored in the second cumulative addition register 111, Z is output data, and t represents time for each processing cycle.

【0114】ここでは、数4に示すように4項の累積加
算処理を実現する場合を例にとり動作を説明する。
Here, the operation will be described by taking as an example the case where the cumulative addition processing of the four terms is realized as shown in Expression 4.

【0115】[0115]

【数4】 (Equation 4)

【0116】図4中、乗算データmhk及びmlkは、そ
れぞれ式(11)、式(12)で示される。
In FIG. 4, the multiplication data mhk and mlk are represented by equations (11) and (12), respectively.

【0117】 mhk=xhk×yhk …式(11) mlk=xlk×ylk …式(12) また、累積加算データshk及びslkは、それぞれ式
(13)、式(14)で示される。
Mhk = xhk × yhk (Equation (11)) mlk = xlk × ylk (Equation (12)) Further, the cumulative addition data shk and slk are represented by Equation (13) and Equation (14), respectively.

【0118】 slk=slk-1+mlk …式(13) shk=shk-1+mhk …式(14) ここで、累積加算データsh0及びsl0は、式(15)
で示される。
Slk = slk-1 + mlk (Equation (13)) shk = shk-1 + mhk (Equation (14)) Here, the cumulative addition data sh0 and sl0 are expressed by Equation (15).
Indicated by

【0119】 sl0=sh0=0 …式(15) また、[mk]はmkの演算途中であるパイプラインレジ
スタ104内の値を示している。
Sl0 = sh0 = 0 Expression (15) Further, [mk] represents the value in the pipeline register 104 during the calculation of mk.

【0120】以下、累積加算器200の動作を単位時刻
ごとに説明する。
The operation of the cumulative adder 200 will be described below for each unit time.

【0121】まず、時刻0(t=0)に第1の入力端子
101及び第2の入力端子102にデータx1及びy1が
入力され、累積加算処理を開始する。
First, at time 0 (t = 0), the data x1 and y1 are input to the first input terminal 101 and the second input terminal 102, and the cumulative addition process is started.

【0122】時刻0には乗算処理の前半部を行い、この
結果をパイプラインレジスタ104(pipe-M)に格納
する。ここで、乗算器103内部に設けられたパイプラ
インレジスタ104によって毎サイクルデータの入力及
び乗算データの出力が可能となる。
At time 0, the first half of the multiplication process is performed, and the result is stored in the pipeline register 104 (pipe-M). Here, the pipeline register 104 provided inside the multiplier 103 enables input of data every cycle and output of multiplication data.

【0123】時刻1には1組目の入力データ(x1,y
1)の乗算処理の後半部を行い、この結果の下位32ビ
ットを第1の乗算レジスタ105(ML)に格納し(m
l1)、上位32ビットを第2の乗算レジスタ109
(MH)に格納する(mh1)。これと同時に2組目の
入力データ(x2,y2)が入力され、乗算処理の前半部
を行い、この結果をパイプラインレジスタ104(pipe
-M)に結果を格納する。
At time 1, the first set of input data (x1, y
The latter half of the multiplication process of 1) is performed, and the lower 32 bits of this result are stored in the first multiplication register 105 (ML) (m
11), the upper 32 bits are used as the second multiplication register 109
It is stored in (MH) (mh1). At the same time, the second set of input data (x2, y2) is input, the first half of the multiplication process is performed, and the result is stored in the pipeline register 104 (pipe).
-Store the result in M).

【0124】このように、乗算器103からの乗算出力
のうち、下位32ビットデータが第1の乗算レジスタ1
05(ML)に格納され、上位32ビットデータが第2
の乗算レジスタ109(MH)に格納される。
As described above, in the multiplication output from the multiplier 103, the lower 32-bit data is the first multiplication register 1
Stored in 05 (ML) and the upper 32 bits of data are the second
Stored in the multiplication register 109 (MH).

【0125】時刻2には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml1)と第1の累積加算レジスタ107(AL)に
蓄えられた初期値(0)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻す(sl1)。
At time 2, the first adder 106 makes the first
The multiplication result (ml1) stored in the multiplication register 105 (ML) and the initial value (0) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are 1 cumulative addition register 107 (AL)
Write back to (sl1).

【0126】また、第2の加算器110により第2の乗
算レジスタ109(MH)に格納された乗算結果(mh
1)と第2の累積加算レジスタ111(AH)に蓄えら
れた初期値(0)との加算を行い、加算結果を第2の累
積加算レジスタ111(AH)に書き戻す(sh1)。
これと同時に、2組目の入力データ(x2,y2)の乗算
処理の後半部を行い、この結果を第2の乗算レジスタ1
09(MH)及び第1の乗算レジスタ105(ML)に
格納する(mh2とml2)。さらに、3組目の入力デー
タ(x3,y3)が入力され、乗算処理の前半部を行い、
この結果をパイプラインレジスタ104(pipe-M)に
結果を格納する。
Further, the multiplication result (mh stored in the second multiplication register 109 (MH) by the second adder 110
1) and the initial value (0) stored in the second cumulative addition register 111 (AH) are added, and the addition result is written back to the second cumulative addition register 111 (AH) (sh1).
At the same time, the latter half of the multiplication process of the second set of input data (x2, y2) is performed, and the result is stored in the second multiplication register 1
09 (MH) and the first multiplication register 105 (ML) (mh2 and ml2). Furthermore, the third set of input data (x3, y3) is input and the first half of the multiplication process is performed.
The result is stored in the pipeline register 104 (pipe-M).

【0127】このように、時刻2の段階では、第1の乗
算レジスタ105(ML)に格納された乗算結果(ml
1)と第1の累積加算レジスタ107(AL)に蓄えら
れた初期値(0)とが第1の加算器106により累積加
算されて、再び、第1の累積加算レジスタ107(A
L)に書き戻される(sl1)。また、2組目の入力デ
ータ(x2,y2)の乗算処理の後半部分と、3組目の入
力データ(x3,y3)の乗算処理の前半部の処理が同様
に実行される。
As described above, in the stage of time 2, the multiplication result (ml) stored in the first multiplication register 105 (ML) is stored.
1) and the initial value (0) stored in the first cumulative addition register 107 (AL) are cumulatively added by the first adder 106, and again the first cumulative addition register 107 (A
It is written back to L) (sl1). The second half of the multiplication process of the second set of input data (x2, y2) and the first half of the multiplication process of the third set of input data (x3, y3) are similarly executed.

【0128】時刻3には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml2)と第1の累積加算レジスタ107(AL)に
蓄えられた値(sl1)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻し(sl2)、第1のセレクタ211に同じデ
ータを出力する。第1のセレクタ211は、第1の累積
加算レジスタ107(AL)からの入力を選択して、第
3の加算器112に出力する。
At time 3, the first adder 106 makes the first
The multiplication result (ml2) stored in the multiplication register 105 (ML) and the value (sl1) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are Cumulative addition register 107 (AL)
The data is written back to (sl2) and the same data is output to the first selector 211. The first selector 211 selects the input from the first cumulative addition register 107 (AL) and outputs it to the third adder 112.

【0129】また、第2の加算器110により第2の乗
算レジスタ109(MH)に格納された乗算結果(mh
2)と第2の累積加算レジスタ111(AH)に格納さ
れた値(sh1)との加算を行い、加算結果を第2の累
積加算レジスタ111(AH)に書き戻す(sh2)。
The multiplication result (mh) stored in the second multiplication register 109 (MH) by the second adder 110
2) and the value (sh1) stored in the second cumulative addition register 111 (AH) are added, and the addition result is written back to the second cumulative addition register 111 (AH) (sh2).

【0130】第3の加算器112では第1のセレクタ2
11が出力する値(sl1)と第2の累積加算レジスタ
111(AH)が出力する値(sh1)との加算結果
(s1)を求め、第2のセレクタ212に出力する。第
2のセレクタ212は、第3の加算器112からの入力
を選択して出力レジスタ113(S)に出力する。これ
と同時に3組目の入力データの乗算処理の後半部を行
い、この結果を第2の乗算レジスタ109(MH)と第
1の乗算レジスタ105(ML)に格納する(mh3と
ml3)。さらに、4組目の入力データ(x4,y4)が
入力され、乗算処理の前半部を行い、この結果をパイプ
ラインレジスタ104(pipe-M)に結果を格納する。
In the third adder 112, the first selector 2
The addition result (s1) of the value (sl1) output by 11 and the value (sh1) output by the second cumulative addition register 111 (AH) is obtained and output to the second selector 212. The second selector 212 selects the input from the third adder 112 and outputs it to the output register 113 (S). At the same time, the latter half of the multiplication process of the third set of input data is performed, and the result is stored in the second multiplication register 109 (MH) and the first multiplication register 105 (ML) (mh3 and ml3). Further, the fourth set of input data (x4, y4) is input, the first half of the multiplication process is performed, and the result is stored in the pipeline register 104 (pipe-M).

【0131】このように、時刻3の段階では、3組目の
入力データ(x3,y3)に対し時刻2で述べた場合と同
様な処理、すなわち、累積加算処理を上位側と下位側に
分けて行う処理に加え、第1のセレクタ211により第
1の累積加算レジスタ107(AH)からの入力を選択
して、第3の加算器112に出力する動作と、第2のセ
レクタ212により第3の加算器112による加算結果
(s1)を選択して出力レジスタ113(S)に出力す
る動作が行われる。これにより、16ビット同士の累積
加算処理が実行される。
As described above, at the stage of time 3, the same processing as that described at time 2 for the third set of input data (x3, y3), that is, the cumulative addition process is divided into the upper side and the lower side. In addition to the processing performed by the first selector 211, the operation of selecting the input from the first cumulative addition register 107 (AH) by the first selector 211 and outputting it to the third adder 112, and the third selector 212 by the third The operation of selecting the addition result (s1) by the adder 112 and outputting it to the output register 113 (S) is performed. As a result, 16-bit cumulative addition processing is executed.

【0132】時刻4には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml3)と第1の累積加算レジスタ107(AL)に
蓄えられた値(sl2)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻すとともに(sl3)、第1のセレクタ211
に同じデータを出力する。第1のセレクタ211は第1
の累積加算レジスタ107(AL)からの入力を選択し
て第3の加算器112に出力する。
At time 4, the first adder 106 makes the first
The multiplication result (ml3) stored in the multiplication register 105 (ML) and the value (s12) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are set to the first Cumulative addition register 107 (AL)
Write back to (sl3) and the first selector 211
Output the same data to. The first selector 211 is the first
The input from the cumulative addition register 107 (AL) is selected and output to the third adder 112.

【0133】また、第2の加算器110により(MH)
に格納された乗算結果(mh3)と第2の累積加算レジ
スタ111(AH)に蓄えられた値(sh2)との加算
を行い、加算結果を第2の累積加算レジスタ111(A
H)に書き戻す(sh3)。
Further, the second adder 110 causes (MH)
The multiplication result (mh3) stored in the second cumulative addition register 111 (AH) is added to the value (sh2) stored in the second cumulative addition register 111 (AH).
Write back to H) (sh3).

【0134】第3の加算器112では第1のセレクタ2
11から出力される値(sl2)と第2の累積加算レジ
スタ111(AH)が出力する値(sh2)との加算結
果を求め、第2のセレクタ212に出力する。累積加算
器200の出力端子114(Z)には、前時刻(時刻
3)に出力レジスタ113(S)に蓄えられた出力デー
タ(s1)が出力される。これと同時に4組目の入力デ
ータの乗算処理の後半部を行い、この結果を第2の乗算
レジスタ109(MH)と第1の乗算レジスタ105
(ML)に格納する(mh4とml4)。
In the third adder 112, the first selector 2
The addition result of the value (sl2) output from 11 and the value (sh2) output from the second cumulative addition register 111 (AH) is obtained and output to the second selector 212. The output data (s1) stored in the output register 113 (S) at the previous time (time 3) is output to the output terminal 114 (Z) of the cumulative adder 200. At the same time, the latter half of the multiplication processing of the fourth set of input data is performed, and the result is the second multiplication register 109 (MH) and the first multiplication register 105.
Store in (ML) (mh4 and ml4).

【0135】このように、時刻4の段階では、時刻3で
述べた場合と同様な処理が実行され、累積加算器200
の出力端子114(Z)からは前時刻に出力レジスタ1
13に蓄えられた出力データ(s1)が出力される。ま
た、4組目の入力データの乗算処理の後半部の処理が実
行される。
As described above, in the stage of time 4, the same processing as that described in time 3 is executed, and the cumulative adder 200
From the output terminal 114 (Z) of the output register 1 at the previous time.
The output data (s1) stored in 13 is output. Further, the processing of the latter half of the multiplication processing of the fourth set of input data is executed.

【0136】時刻5には第1の加算器106により第1
の乗算レジスタ105(ML)に格納された乗算結果
(ml4)と第1の累積加算レジスタ107(AL)に
蓄えられた値(sl3)との加算を行い、加算結果の下
位32ビットを第1の累積加算レジスタ107(AL)
に書き戻すとともに(sl4)、第1のセレクタ211
に同じデータを出力する。第1のセレクタ211は第1
の累積加算レジスタ107(AL)からの入力を選択し
て第3の加算器112に出力する。
At time 5, the first adder 106 makes the first
The multiplication result (ml4) stored in the multiplication register 105 (ML) and the value (sl3) stored in the first cumulative addition register 107 (AL) are added, and the lower 32 bits of the addition result are Cumulative addition register 107 (AL)
Write back to (sl4) and the first selector 211
Output the same data to. The first selector 211 is the first
The input from the cumulative addition register 107 (AL) is selected and output to the third adder 112.

【0137】また、第2の加算器110により(MH)
に格納された乗算結果(mh4)と第2の累積加算レジ
スタ111(AH)に蓄えられた値(sh3)との加算
を行い、加算結果を第2の累積加算レジスタ111(A
H)に書き戻す(sh4)。
Further, the second adder 110 causes (MH)
The multiplication result (mh4) stored in the second cumulative addition register 111 (AH) is added to the value (sh3) stored in the second cumulative addition register 111 (AH).
Write back to H) (sh4).

【0138】第3の加算器112では第1のセレクタ2
11が出力する値(sl3)と第2の累積加算レジスタ
111(AH)が出力する値(sh3)との加算結果を
求め、第2のセレクタ212に出力する。第2のセレク
タ212は第3の加算器112からの入力を選択して出
力レジスタ113(S)に出力する。出力端子114
(Z)には、前時刻に出力レジスタ113(S)に蓄え
られた出力データ(s2)が出力される。
In the third adder 112, the first selector 2
The addition result of the value output by 11 (s13) and the value output by the second cumulative addition register 111 (AH) (sh3) is calculated and output to the second selector 212. The second selector 212 selects the input from the third adder 112 and outputs it to the output register 113 (S). Output terminal 114
The output data (s2) stored in the output register 113 (S) at the previous time is output to (Z).

【0139】時刻6には第3の加算器112により第1
のセレクタ211が出力する値(sl4)と加算結果
(s4)を求め、第2のセレクタ212に出力する。第
2のセレクタ212は第3の加算器112からの入力を
選択して、出力レジスタ113(S)に出力する。累積
加算器200の出力端子114(Z)には、前時刻に出
力レジスタ113(S)に蓄えられた出力データ(s
3)が出力される。
At time 6, the third adder 112 makes the first
The value (sl4) output by the selector 211 and the addition result (s4) are obtained and output to the second selector 212. The second selector 212 selects the input from the third adder 112 and outputs it to the output register 113 (S). The output terminal 114 (Z) of the accumulator 200 outputs the output data (s) stored in the output register 113 (S) at the previous time.
3) is output.

【0140】時刻7には時刻6に出力レジスタ113に
蓄えられた出力データ(s4)を出力端子108から累
積加算器200の外部に出力して処理を終了する。
At time 7, the output data (s4) stored in the output register 113 at time 6 is output from the output terminal 108 to the outside of the cumulative adder 200, and the process ends.

【0141】このようにして、時刻0〜時刻7を要して
4組目までの入力データの累積加算処理が終了する。こ
こでは、4組目までの入力データについて累積加算処理
を実行する例を示したが、実際には逐次、第1の入力端
子101(X)及び第2の入力端子102(Y)にデー
タが入力され、累積加算処理が実行される。
In this way, the cumulative addition process of the input data up to the fourth set is completed from time 0 to time 7. Here, an example is shown in which the cumulative addition processing is executed for up to the fourth set of input data, but in reality, data is sequentially input to the first input terminal 101 (X) and the second input terminal 102 (Y). It is input and the cumulative addition process is executed.

【0142】特に、第2の実施形態に係る累積加算器2
00では、第1のセレクタ211及び第2のセレクタ2
12の選択によって、図2に示すように1サイクル(時
刻tごと)に上位側同士、下位側同士の乗算及び累積加
算処理を行うことができるので、16ビットのデータ2
組を同時に累積加算することができる。ここで、どちら
か一方のデータを入れ換えるようにすれば、上位側と下
位側の乗算及び累積加算が可能になる。
In particular, the cumulative adder 2 according to the second embodiment
00, the first selector 211 and the second selector 2
By selecting 12, it is possible to perform multiplication and cumulative addition processing on the upper side and the lower side in one cycle (every time t) as shown in FIG.
The sets can be cumulatively added at the same time. Here, if either one of the data is exchanged, it is possible to perform multiplication and cumulative addition on the upper side and the lower side.

【0143】以上説明したように、本発明を適用した第
2の実施形態に係る累積加算器200は、第1の累積加
算レジスタ107及びキャリーレジスタ108の出力を
選択する第1のセレクタ211と、第1の累積加算レジ
スタ107、第2の累積加算レジスタ111及び第3の
加算器112の出力を選択する第2のセレクタ212と
を付加し、第3の加算器112への入力をキャリーレジ
スタ108と第1の累積加算レジスタ107から選択可
能な構成にするとともに、累積加算器200からの出力
値を第1の累積加算レジスタ107、第2の累積加算レ
ジスタ111及び第3の加算器112出力から選択可能
な構成としているので、32ビットのデータ長のデータ
のみでなく、16ビットのデータ2組を同時に累積加算
することができ、出力時に上位側の累積加算値と下位側
の累積加算値との和を出力することも可能になる。
As described above, the cumulative adder 200 according to the second embodiment to which the present invention is applied includes the first selector 211 for selecting the outputs of the first cumulative addition register 107 and the carry register 108, The first cumulative addition register 107, the second cumulative addition register 111, and the second selector 212 that selects the output of the third adder 112 are added, and the input to the third adder 112 is carried by the carry register 108. And the output value from the cumulative adder 200 is selected from the outputs of the first cumulative addition register 107, the second cumulative addition register 111, and the third adder 112. Since the configuration is selectable, not only data having a data length of 32 bits but also two sets of 16-bit data can be cumulatively added at the same time. It becomes possible to output a sum of the cumulative addition value of the cumulative addition value and the lower side of the upper side during the force.

【0144】また、第1のセレクタ211が常にキャリ
ーレジスタ108からの出力を選択し、第2のセレクタ
212が常に第3の加算器112からの出力を選択する
ように設定すれば、第1の実施形態に係る累積加算器1
00と同様に、32ビット同士の累積加算モードを実現
することができ、64ビット加算処理を高速に行なっ
て、累積加算器200全体の高速化を図ることができ
る。
If the first selector 211 is set to always select the output from the carry register 108 and the second selector 212 is always to select the output from the third adder 112, the first selector 211 is set. Cumulative adder 1 according to the embodiment
Similar to 00, a 32-bit cumulative addition mode can be realized, and 64-bit addition processing can be performed at high speed to speed up the cumulative adder 200 as a whole.

【0145】なお、第2の実施形態では、乗算処理を上
位側同士、下位側同士で行なっているが、何れか一方の
データを入れ換えて上位側と下位側の乗算及び累積加算
としてもよいことは言うまでもない。
In the second embodiment, the multiplication process is performed on the upper side and the lower side, but either one of the data may be exchanged to perform multiplication and cumulative addition on the upper side and the lower side. Needless to say.

【0146】また、上述の各実施形態では、データ長が
32ビットのデータを入力とする累積加算器について説
明を行なっているが、16ビットあるいは8ビットな
ど、任意のビット長のデータに適用できることは言うま
でもない。
Further, in each of the above-mentioned embodiments, the cumulative adder in which the data having the data length of 32 bits is input has been described, but it can be applied to the data of any bit length such as 16 bits or 8 bits. Needless to say.

【0147】また、上述の各実施形態では、累積加算器
100,200からの出力データを64ビット長のデー
タとしているが、任意のビット長のデータを出力するよ
うにしてもよく、例えば32ビットなど上述の各実施形
態よりも短いデータ長のデータを選択、出力するように
してもよい。
Further, in each of the above-mentioned embodiments, the output data from the cumulative adders 100 and 200 is 64-bit data, but it is also possible to output data of an arbitrary bit length, for example 32 bits. For example, data having a shorter data length than each of the above-described embodiments may be selected and output.

【0148】また、上述の各実施形態では、乗算器出力
の分割を上位、下位の2つに分けているが、勿論これに
は限定されず、3つ以上の分割とすることも可能であ
る。例えば、第2の加算処理部116と並列に、さらに
第3加算処理部を設けるとともに、第3加算処理部のキ
ャリービットを保持するキャリーレジスタを設け、上述
の各実施形態と同様な動作を行わせるようにしてもよ
い。このようにすれば、上述の各実施形態の効果をさら
に高めることができる。
Also, in each of the above-mentioned embodiments, the division of the multiplier output is divided into upper and lower divisions, but it is not limited to this, and it is also possible to divide into three or more divisions. . For example, a third addition processing unit is further provided in parallel with the second addition processing unit 116, and a carry register that holds a carry bit of the third addition processing unit is provided, and the same operation as that in each of the above-described embodiments is performed. You may allow it. By doing so, the effects of the above-described embodiments can be further enhanced.

【0149】また、上述の各実施形態では、乗算器とし
て内部にパイプラインレジスタ104を備えたパイプラ
イン乗算器103を用いることによって毎サイクルデー
タの入力及び乗算データの出力が可能にしているが、乗
算器出力を分割処理できればよくどのような乗算器を使
用してもよいことは言うまでもない。
Further, in each of the above-described embodiments, the pipeline multiplier 103 having the pipeline register 104 therein is used as the multiplier to enable the input of each cycle data and the output of the multiplication data. It goes without saying that any multiplier may be used as long as it can divide the output of the multiplier.

【0150】さらに、上記累積加算器を構成するレジス
タや演算回路、セレクタの数、種類接続状態などは前述
した上述の各実施形態に限られないことは言うまでもな
く、DSP等を構成する算術回路の一部であってもよ
い。
Further, it is needless to say that the number of registers, arithmetic circuits, selectors, type connection states, etc. constituting the above-mentioned cumulative adder are not limited to those in the above-mentioned respective embodiments, and it is needless to say that the arithmetic circuits constituting DSP etc. It may be a part.

【0151】さらにまた、上述の各実施形態では、累積
加算器に適用しているが、選択手段による累算の禁止、
あるいはデータ入力の変更によって加算処理のみを実行
することも可能である。また、上述の各実施形態の加算
器は加算処理のみを行ったが、乗算器出力に対し負デー
タを加算するような減算処理(例えば、補数加算)を実
行することもできる。したがって、累積加算器という名
称に限定されるものではなく、本発明の技術的思想の範
囲内であれば加算器あるいは減算器等のように適宜変更
することができる。
Furthermore, in each of the above-mentioned embodiments, although it is applied to the cumulative adder, the accumulation by the selection means is prohibited,
Alternatively, it is possible to execute only the addition process by changing the data input. Further, although the adder of each of the above-described embodiments performs only the addition process, it is also possible to execute a subtraction process (for example, complement addition) that adds negative data to the output of the multiplier. Therefore, the name is not limited to the cumulative adder, and may be appropriately changed to an adder, a subtracter, or the like within the scope of the technical idea of the present invention.

【0152】[0152]

【発明の効果】本発明に係る累積加算器では、乗算器の
出力を複数に分割し、分割した乗算器の出力毎に加算処
理を実行する複数の加算処理部と、複数の加算処理部の
出力を連結して累積加算結果として出力する出力手段と
を備えて構成しているので、複数の加算処理部により加
算処理を高速に実現することができ、累積加算器全体の
高速化を図ることができる。
In the cumulative adder according to the present invention, the output of the multiplier is divided into a plurality of parts, and a plurality of addition processing parts for executing addition processing for each output of the divided multipliers, and a plurality of addition processing parts. Since the output means is configured to be connected and output as a cumulative addition result, the addition processing can be realized at high speed by a plurality of addition processing units, and the speed of the entire cumulative adder can be increased. You can

【0153】また、本発明に係る累積加算器では、加算
処理を、乗算器出力の下位側の加算処理を実行する第1
の加算処理部と、乗算器出力の上位側の加算処理を実行
する第2の加算処理部とに分けて行い、第1の加算処理
部の加算処理で発生したキャリービットを所定時刻後に
第2の加算処理部に足す構成としているので、加算処理
が上位側と下位側に分けて1サイクル中に同時に実行す
ることができ、加算処理時間を半減させることができ
る。したがって、加算器により律速されていた欠点が解
消でき、累積加算器全体の高速化を図ることができる。
Further, in the cumulative adder according to the present invention, the addition processing is performed by the first addition processing for the addition processing on the lower side of the multiplier output.
And the second addition processing unit that executes the higher-order addition processing of the multiplier output, and the carry bit generated in the addition processing of the first addition processing unit is added to the second addition processing unit after a predetermined time. Since it is configured to be added to the addition processing unit, the addition processing can be divided into the upper side and the lower side and executed simultaneously in one cycle, and the addition processing time can be halved. Therefore, it is possible to eliminate the drawback that the rate is limited by the adder, and it is possible to increase the speed of the cumulative adder as a whole.

【0154】また、加算結果を選択する選択手段を備え
る構成とすることにより、データを入れ換えて上位側と
下位側の乗算及び累積加算を行うことができ、複数のビ
ット長のデータ2組を同時に累積加算することができ
る。したがって、出力時に上位側の累積加算値と下位側
の累積加算値との和を出力することも可能になる。
Further, by adopting a structure provided with a selecting means for selecting the addition result, it is possible to interchange the data and perform multiplication and cumulative addition on the upper side and the lower side, and to simultaneously generate two sets of data having a plurality of bit lengths. Can be cumulatively added. Therefore, at the time of output, it is possible to output the sum of the cumulative addition value on the upper side and the cumulative addition value on the lower side.

【0155】このように高い演算精度を持ちかつ高速な
累積加算器が実現できることからDSP等に適用して好
適である。
Since it is possible to realize a high-speed cumulative adder having high calculation accuracy as described above, it is suitable for application to a DSP or the like.

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

【図1】本発明を適用した第1の実施形態に係る累積加
算器の構成図である。
FIG. 1 is a configuration diagram of a cumulative adder according to a first embodiment to which the present invention is applied.

【図2】上記累積加算器の動作を説明するためのタイミ
ングチャートである。
FIG. 2 is a timing chart for explaining the operation of the cumulative adder.

【図3】本発明を適用した第2の実施形態に係る累積加
算器の構成図である。
FIG. 3 is a configuration diagram of a cumulative adder according to a second embodiment to which the present invention is applied.

【図4】上記累積加算器の動作を説明するためのタイミ
ングチャートである。
FIG. 4 is a timing chart for explaining the operation of the cumulative adder.

【図5】従来の累積加算器の構成図である。FIG. 5 is a configuration diagram of a conventional cumulative adder.

【図6】従来の累積加算器の動作を説明するためのタイ
ミングチャートである。
FIG. 6 is a timing chart for explaining the operation of a conventional cumulative adder.

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

100,200 累積加算器、103 乗算器、104
パイプラインレジスタ、105 第1の乗算レジス
タ、106 第1の加算器、107 第1の累積加算レ
ジスタ、108 キャリーレジスタ、109 第2の乗
算レジスタ、110 第2の加算器、111 第2の累
積加算レジスタ、112 第3の加算器、113 出力
レジスタ、115 第1の加算処理部、116 第2の
加算処理部、211 第1のセレクタ、212 第2の
セレクタ
100,200 Cumulative adder, 103 Multiplier, 104
Pipeline register, 105 first multiplication register, 106 first adder, 107 first cumulative addition register, 108 carry register, 109 second multiplication register, 110 second adder, 111 second cumulative addition Register, 112 third adder, 113 output register, 115 first addition processing unit, 116 second addition processing unit, 211 first selector, 212 second selector

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 単位時間毎にデータを入力して累積加算
処理を実行する累積加算器において、 乗算器と、 該乗算器の出力を複数に分割し、分割した該乗算器の出
力毎に加算処理を実行する複数の加算処理部と、 該複数の加算処理部の出力を連結して累積加算結果とし
て出力する出力手段とを備えることを特徴とする累積加
算器。
1. A cumulative adder that inputs data for each unit time and executes cumulative addition processing, wherein: a multiplier and an output of the multiplier are divided into a plurality of pieces, and the output is added for each divided output of the multiplier. A cumulative adder comprising: a plurality of addition processing units for executing processing; and an output unit for connecting outputs of the plurality of addition processing units and outputting as a cumulative addition result.
【請求項2】 前記加算処理部は、 前記乗算器出力の下位側の加算処理を実行する第1の加
算処理部と、 該乗算器出力の上位側の加算処理を実行する第2の加算
処理部と、 該第1の加算処理部の加算処理で発生したキャリービッ
トを所定時間後に該第2の加算処理部に足す手段とを備
え、 該第2の加算処理部は該キャリービットに基づいて加算
処理を実行するように構成したことを特徴とする請求項
1に記載の累積加算器。
2. The addition processing unit includes a first addition processing unit that executes addition processing on a lower side of the multiplier output, and a second addition processing unit that executes addition processing on an upper side of the multiplier output. And a means for adding a carry bit generated in the addition processing of the first addition processing unit to the second addition processing unit after a predetermined time, the second addition processing unit based on the carry bit. The cumulative adder according to claim 1, wherein the cumulative adder is configured to perform addition processing.
【請求項3】 前記出力手段は、 該第2の加算処理部の出力と該キャリービットとを加算
処理する第3の加算器と、 該第3の加算器から出力されるデータを上位側に、該第
1の加算処理部から出力されるデータを下位側に連結し
て保持する出力レジスタとを備えることを特徴とする請
求項2に記載の累積加算器。
3. The output means includes a third adder for adding the output of the second addition processing unit and the carry bit, and the data output from the third adder to the upper side. 3. The cumulative adder according to claim 2, further comprising: an output register for connecting and holding the data output from the first addition processing unit to a lower side.
【請求項4】 前記第1の加算処理部は、 前記乗算器の出力の下位側を保持する第1のレジスタ
と、 第1の加算器と、 該第1の加算器の出力を保持する前記第1の累算レジス
タとを備え、 前記第1の加算器は、前記第1のレジスタの出力と前記
第1の累算レジスタの出力とを加算し、 前記第2の加算処理部は、 前記乗算器の出力の上位側を保持する第2のレジスタ
と、 第2の加算器と、 該第2の加算器の出力を保持する第2の累算レジスタと
を備え、 前記第2の加算器は、前記第2のレジスタの出力と前記
第2の累算レジスタの出力とを加算し、 さらに、前記第1の加算器の加算結果の最上位の1ビッ
トをキャリービットとして保持するキャリーレジスタを
備え、 該キャリーレジスタに格納したキャリービットを単位時
間後に前記第2の加算器に足すように構成したことを特
徴とする請求項2又は3のいずれかに記載の累積加算
器。
4. The first addition processing unit, a first register holding a lower side of an output of the multiplier, a first adder, and holding an output of the first adder. A first accumulation register, the first adder adds an output of the first register and an output of the first accumulation register, and the second addition processing unit includes: A second register for holding the upper side of the output of the multiplier; a second adder; and a second accumulation register for holding the output of the second adder, the second adder Is a carry register for adding the output of the second register and the output of the second accumulation register, and further holding a most significant 1 bit of the addition result of the first adder as a carry bit. The carry bit stored in the carry register is stored in the second register after a unit time. Cumulative adder according to claim 2 or 3, characterized by being configured to add to the adder.
【請求項5】 単位時間毎にデータを入力して累積加算
処理を実行する累積加算器において、 乗算器と、 該乗算器の出力の下位側を保持する第1のレジスタ、及
び上位側を保持する第2のレジスタと、 第1の加算器と、 該第1の加算器の出力を保持する前記第1の累算レジス
タとを備え、 前記第1の加算器は、前記第1のレジスタの出力と前記
第1の累算レジスタの出力とを加算し、 さらに、第2の加算器と、 該第2の加算器の出力を保持する前記第2の累算レジス
タとを備え、 前記第2の加算器は、前記第2のレジスタの出力と前記
第2の累算レジスタの出力とを加算し、 前記第2の累算レジスタの出力と前記第1の加算器の出
力のうちの最上位ビットとを加算する第3の加算器と、 該第3の加算器の出力を上位側に、前記第1の累積加算
レジスタの出力を下位側に連結して保持する出力レジス
タとを備え、 前記第1の加算器の出力のうち最上位ビットを前記第2
の加算器及び前記第3の加算器に入力し、前記最上位ビ
ットを除く前記第1の加算器の出力を前記第1の累算レ
ジスタに入力し、 前記第2の加算器は、前記第2のレジスタの出力、前記
第2の累算レジスタの出力及び前記第1の加算器の出力
の最上位ビットを加算処理するように構成したことを特
徴とする累積加算器。
5. A cumulative adder that inputs data for each unit time and executes a cumulative addition process, comprising: a multiplier, a first register that holds the lower side of the output of the multiplier, and a higher side. A second register, a first adder, and the first accumulation register that holds the output of the first adder, wherein the first adder is the first register of the first register. An output and an output of the first accumulation register are added, and further, a second adder, and a second accumulation register that holds an output of the second adder, Adder adds the output of the second register and the output of the second accumulation register, and outputs the highest of the output of the second accumulation register and the output of the first adder. A third adder for adding the bit and an output of the third adder to the upper side, And an output register for holding an output of the adding register coupled to the lower side, the first of said most significant bit of the output of the adder second
To the third adder and the output of the first adder excluding the most significant bit to the first accumulation register, and the second adder is the second adder. A cumulative adder configured to perform addition processing on the most significant bit of the output of the second register, the output of the second accumulation register, and the output of the first adder.
【請求項6】 さらに、上記請求項1乃至5のいずれか
に記載の累積加算器で加算結果を選択する選択手段を備
えることを特徴とする累積加算器。
6. A cumulative adder characterized by further comprising selection means for selecting an addition result by the cumulative adder according to any one of claims 1 to 5.
【請求項7】前記累積加算器は、乗算器出力に対し累積
加算処理を防止し加算処理のみを実行する加算器である
ことを特徴とする請求項1乃至6のいずれかに記載の累
積加算器。
7. The cumulative addition according to claim 1, wherein the cumulative adder is an adder that prevents cumulative addition processing and executes only addition processing on a multiplier output. vessel.
【請求項8】前記累積加算器は、乗算器出力に対し負デ
ータを加算する減算処理を実行することを特徴とする請
求項1乃至7のいずれかに記載の累積加算器。
8. The cumulative adder according to claim 1, wherein the cumulative adder executes subtraction processing for adding negative data to a multiplier output.
【請求項9】前記乗算器は、サイクル毎のデータの入力
及び乗算データの出力が可能なパイプライン乗算器であ
ることを特徴とする請求項1乃至8のいずれかに記載の
累積加算器。
9. The cumulative adder according to claim 1, wherein the multiplier is a pipeline multiplier capable of inputting data and outputting multiplication data for each cycle.
JP34200295A 1995-12-28 1995-12-28 Comulative adder Withdrawn JPH09185491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34200295A JPH09185491A (en) 1995-12-28 1995-12-28 Comulative adder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34200295A JPH09185491A (en) 1995-12-28 1995-12-28 Comulative adder

Publications (1)

Publication Number Publication Date
JPH09185491A true JPH09185491A (en) 1997-07-15

Family

ID=18350422

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34200295A Withdrawn JPH09185491A (en) 1995-12-28 1995-12-28 Comulative adder

Country Status (1)

Country Link
JP (1) JPH09185491A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6516402B2 (en) 2000-04-27 2003-02-04 Mitsubishi Denki Kabushiki Kaisha Information processing apparatus with parallel accumulation capability
JP2016157299A (en) * 2015-02-25 2016-09-01 ルネサスエレクトロニクス株式会社 Floating-point adder, semiconductor device, and control method of floating-point adder

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6516402B2 (en) 2000-04-27 2003-02-04 Mitsubishi Denki Kabushiki Kaisha Information processing apparatus with parallel accumulation capability
JP2016157299A (en) * 2015-02-25 2016-09-01 ルネサスエレクトロニクス株式会社 Floating-point adder, semiconductor device, and control method of floating-point adder

Similar Documents

Publication Publication Date Title
JP3479438B2 (en) Multiplication circuit
JP2011134346A (en) Arithmetic processor
JPH03156531A (en) Division processor
JPWO2019189878A1 (en) Arithmetic logic unit and arithmetic system
JP2008304921A (en) Improved modular reduction operator
JPH082014B2 (en) Multi-stage digital filter
US6963644B1 (en) Multi-word arithmetic device for faster computation of cryptosystem calculations
JPH09185491A (en) Comulative adder
JPH11327875A (en) Arithmetic circuit
JP2004062821A (en) Information processor
JP2000207387A (en) Arithmetic unit and cipher processor
CN113485751A (en) Method for performing Galois field multiplication, arithmetic unit and electronic device
JP3738134B2 (en) Digital signal processor
JPH0816364A (en) Counter circuit and microprocessor using the same
KR20070062901A (en) Apparatus and method for modular multiplication using chhinese remainder theorem and carry save adder
JP3144859B2 (en) Arithmetic logic unit
JP7078129B2 (en) Arithmetic processing device and control method of arithmetic processing device
US6275837B1 (en) Method for the implementation of an elementary modular operation according to the Montgomery method
JP2664750B2 (en) Arithmetic device and arithmetic processing method
JP3695561B2 (en) Accumulator
US6470369B1 (en) Euclid mutual division arithmetic circuit and processing circuit
JP2864598B2 (en) Digital arithmetic circuit
JP2005149517A (en) Product-sum computing element
JP2003084972A (en) Method for improving execution speed of conditional subtraction command, and enlarging range of operand to which command is correctly executed
JP2001134556A (en) Repetitive multiplier and array multiplier

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20030304