JP2953918B2 - Arithmetic unit - Google Patents
Arithmetic unitInfo
- Publication number
- JP2953918B2 JP2953918B2 JP5221341A JP22134193A JP2953918B2 JP 2953918 B2 JP2953918 B2 JP 2953918B2 JP 5221341 A JP5221341 A JP 5221341A JP 22134193 A JP22134193 A JP 22134193A JP 2953918 B2 JP2953918 B2 JP 2953918B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- product
- sum operation
- stage
- input data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Complex Calculations (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、デジタル信号処理に用
いられる演算装置に関し、特に、複数の乗算器と加算器
とを用いて、複数の入力データに各々係数を掛け、その
各乗算結果を加算する演算装置の改良に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic unit used for digital signal processing, and more particularly, to a plurality of input data, each of which is multiplied by a coefficient using a plurality of multipliers and adders, and each multiplication result is obtained. The present invention relates to improvement of an arithmetic unit for adding.
【0002】[0002]
【従来の技術】従来、画像処理において、適当な周波数
成分を取り出すこと等を目的として、フィルターが多く
用いられる。このフィルターは、デジタル信号処理で
は、与えられた複数の入力データに各々適当な係数を掛
け、その各乗算結果を加算することにより実現される。2. Description of the Related Art Conventionally, in image processing, a filter is often used for the purpose of extracting an appropriate frequency component. In digital signal processing, this filter is realized by multiplying a given plurality of input data by an appropriate coefficient, and adding the multiplication results.
【0003】図2に、フィルターを実現する従来の演算
装置のブロック図を示す。同図において、51はデータ
保持回路であり、クロック信号52に同期して、入力デ
ータ53を格納し、次段のデータ保持回路51へ出力す
る。従って、入力データ側からi番目のデータ保持回路
の出力は、入力データに対してiクロック前のデータと
なる。54は乗算器、55は係数を保持するレジスタで
ある。この例では、データ保持回路51、乗算器54お
よび係数レジスタ55をそれぞれ7個備える。それぞれ
の乗算器54は、対応するデータ保持回路51のデータ
と係数レジスタ55に格納されている係数を掛けて結果
を出力する。56は加算装置であって、複数の加算器5
7をツリー状に構成し、7個の乗算器54から出力され
た結果を順次加算して、7個の乗算器54の出力結果の
合計を出力する。FIG. 2 is a block diagram showing a conventional arithmetic unit for realizing a filter. In the figure, reference numeral 51 denotes a data holding circuit, which stores input data 53 in synchronization with a clock signal 52 and outputs it to the data holding circuit 51 of the next stage. Therefore, the output of the i-th data holding circuit from the input data side is the data that is i clocks before the input data. 54 is a multiplier, and 55 is a register for holding a coefficient. In this example, seven data holding circuits 51, seven multipliers 54, and seven coefficient registers 55 are provided. Each multiplier 54 multiplies the data of the corresponding data holding circuit 51 by the coefficient stored in the coefficient register 55 and outputs a result. Reference numeral 56 denotes an adder, and a plurality of adders 5
7 are formed in a tree shape, the results output from the seven multipliers 54 are sequentially added, and the sum of the output results of the seven multipliers 54 is output.
【0004】いま、7個の係数レジスタ55に格納され
ている係数の値を、入力データ53から最も遠いものか
ら順に、a(1) 、a(2) 、a(3) 、a(4) 、a(5) 、a
(6)及びa(7) とし、時刻Tにおける入力データをd(T)
とする。入力データ53はクロック信号52に同期し
て、7つのデータ保持回路51に順次転送され、入力デ
ータ53から7番めのデータ保持回路、つまり最も遠い
データ保持回路にd(T) が到達した時、6番目のデータ
保持回路51には時刻Tの1クロック後のデータ、即
ち、d(T+1 )が保持されている。同様に、5番目のデー
タ保持回路51にはd(T+2)が保持されている。従っ
て、加算装置56の出力結果outは(式1)で表され
る。Now, the values of the coefficients stored in the seven coefficient registers 55 are determined in the order of a (1), a (2), a (3), a (4) in order from the one farthest from the input data 53. , A (5), a
(6) and a (7), and the input data at time T is d (T)
And The input data 53 is sequentially transferred to the seven data holding circuits 51 in synchronization with the clock signal 52, and when d (T) reaches the seventh data holding circuit from the input data 53, that is, the farthest data holding circuit. , The sixth data holding circuit 51 holds data one clock after the time T, that is, d (T + 1). Similarly, the fifth data holding circuit 51 holds d (T + 2). Therefore, the output result out of the adder 56 is represented by (Equation 1).
【0005】[0005]
【式1】 out=a(1) *d(T) +a(2) *d(T+1)+a(3) *d(T+2) +a(4) *d(T+3) +a(5) *d(T+4)+a(6) *d(T+5) +a(7) *d(T+6) このようにして、フィルターが実現される。また、係数
の値によって、フィルターの特性を指定することができ
る。[Formula 1] out = a (1) * d (T) + a (2) * d (T + 1) + a (3) * d (T + 2) + a (4) * d (T + 3) + a ( 5) * d (T + 4) + a (6) * d (T + 5) + a (7) * d (T + 6) In this way, a filter is realized. Further, the characteristics of the filter can be designated by the value of the coefficient.
【0006】このような演算装置は、フィルターだけで
なく、行列計算など、積和演算を必要とする様々な用途
に応用される。[0006] Such an arithmetic unit is applied not only to filters but also to various applications requiring a product-sum operation, such as matrix calculation.
【0007】次に、アメリカ特許5,195,049 号に開示さ
れた他の従来例を図3に示す。同図において、1…は複
数の積和演算装置であり、各々、データ保持回路2と、
加算器3と、乗算器4と、係数レジスタ5とを有する。
この例では、7つの積和演算装置1…が直列に接続され
ている。それぞれの積和演算装置1のデータ保持回路2
には、1つ前の積和演算装置の加算器3の出力が与えら
れ、クロック信号6に同期して格納される。最初の積和
演算装置1のデータ保持回路2には、0の値が与えられ
る。それぞれの積和演算装置1の乗算器4の入力には、
入力データ7が共通に与えられる。それぞれの積和演算
装置1の乗算器4は入力データ7の値と係数レジスタ5
に保持されている値とを掛けて、その乗算結果を出力す
る。加算器3は、データ保持回路2に保持されているデ
ータと乗算器4の出力とを加算して、その加算結果を次
段の積和演算装置1のデータ保持回路2に出力する。Next, another conventional example disclosed in US Pat. No. 5,195,049 is shown in FIG. In the figure, reference numerals 1 ... denote a plurality of sum-of-products arithmetic units, each of which has a data holding circuit 2;
It has an adder 3, a multiplier 4, and a coefficient register 5.
In this example, seven product-sum operation devices 1 are connected in series. Data holding circuit 2 of each product-sum operation device 1
Is supplied with the output of the adder 3 of the immediately preceding product-sum operation unit, and is stored in synchronization with the clock signal 6. A value of 0 is given to the data holding circuit 2 of the first product-sum operation device 1. The inputs of the multipliers 4 of the respective product-sum operation devices 1 are as follows:
Input data 7 is commonly provided. The multiplier 4 of each multiply-accumulation device 1 stores the value of the input data 7 and the coefficient register 5
Is multiplied by the value held in the table, and the result of the multiplication is output. The adder 3 adds the data held in the data holding circuit 2 and the output of the multiplier 4 and outputs the addition result to the data holding circuit 2 of the product-sum operation device 1 at the next stage.
【0008】以上のように構成された演算装置につい
て、以下図3を用いてその動作を説明する。7つの積和
演算装置1の係数レジスタ5に格納されている係数を最
前段から順にa(1) 、a(2) …a(7) とする。今、時刻
Tにおける入力データ7の値をd(T) とする。最前段か
ら1番目の積和演算装置1はd(T) とa(1) を乗算し、
この乗算結果を0と加算して出力する。1クロック後に
クロック信号6に同期して、2番目の積和演算装置1は
前段の出力、即ち、a(1) *d(T) をデータ保持回路2
に格納する。この時、入力データ7は、時刻Tの1クロ
ック後のデータ、即ち、d(T+1) であり、2番目の積和
演算装置1はd(T+1) に係数a(2) を乗算し、データ保
持回路2のデータa(1) *d(T) と加算して、3番目の
積和演算装置1のデータ保持回路2に出力する。同様に
して、最終段、ここでは7番目の積和演算装置1の出力
outの値は、上記(式1)に示す通りとなって、従来
例と同じ演算結果が得られる。The operation of the arithmetic unit configured as described above will be described below with reference to FIG. The coefficients stored in the coefficient registers 5 of the seven sum-of-products arithmetic units 1 are referred to as a (1), a (2),. Now, let the value of the input data 7 at the time T be d (T). The first product-sum operation unit 1 from the foremost stage multiplies d (T) by a (1),
The multiplication result is added to 0 and output. One clock later, in synchronization with the clock signal 6, the second product-sum operation device 1 outputs the output of the preceding stage, that is, a (1) * d (T), to the data holding circuit 2
To be stored. At this time, the input data 7 is data one clock after the time T, that is, d (T + 1), and the second multiply-accumulate device 1 adds a coefficient a (2) to d (T + 1). The data is multiplied, added to the data a (1) * d (T) of the data holding circuit 2, and output to the data holding circuit 2 of the third product-sum operation device 1. Similarly, the value of the output out of the final stage, here the seventh product-sum operation device 1, is as shown in the above (Equation 1), and the same operation result as the conventional example is obtained.
【0009】[0009]
【発明が解決しようとする課題】しかしながら、前述し
た従来の前者の構成では、複数の乗算器54の結果を加
算する加算器57の構成がツリー状になり、複数段の加
算器を経て結果が得られるため、この加算時間が動作周
波数を制限してしまう欠点を有する。また、加算器の段
数は乗算器の数に応じて増える欠点を有する。更に、前
記の加算処理をパイプライン的に処理しようとすると、
各加算器の出力にラッチを必要とし、回路規模が大きく
なる。加えて、加算器がツリー状の構成であるため、半
導体集積回路として配置するのが困難であり、面積の増
大をもたらす。また、乗算器の数を増やそうとすると、
加算器のツリー状の構成が大きく変わるため、拡張性が
乏しい等の問題点を有する。However, in the former former configuration described above, the configuration of the adder 57 for adding the results of the plurality of multipliers 54 becomes a tree-like configuration, and the result is passed through a plurality of stages of adders. Therefore, there is a disadvantage that the addition time limits the operating frequency. Further, there is a disadvantage that the number of stages of the adder increases according to the number of multipliers. Further, if the above addition process is to be processed in a pipeline manner,
Since a latch is required for the output of each adder, the circuit scale becomes large. In addition, since the adder has a tree-like configuration, it is difficult to arrange the adder as a semiconductor integrated circuit, resulting in an increase in area. Also, when trying to increase the number of multipliers,
Since the tree-like configuration of the adder is greatly changed, there is a problem that expandability is poor.
【0010】これに対し、前記従来の後者の構成では、
前記従来の前者の構成の欠点を解消できる。即ち、同じ
構成の積和演算装置1…を直列に複数接続したものであ
るので、半導体集積回路として配置が容易であり、面積
の削減および開発期間の短縮を図ることができる共に、
積和演算装置の追加および削減が容易である。更に、1
クロック内に1つの乗算と1つの加算を処理すればよい
ので、動作周波数を高くして処理能力を上げることがで
きる。On the other hand, in the latter conventional configuration,
The disadvantage of the former conventional configuration can be eliminated. That is, since a plurality of product-sum calculation devices 1 having the same configuration are connected in series, they can be easily arranged as a semiconductor integrated circuit, and the area and the development period can be reduced.
It is easy to add and reduce the product-sum operation device. Furthermore, 1
Since one multiplication and one addition need only be processed within a clock, the operating frequency can be increased to increase the processing capability.
【0011】しかし、この後者の構成では、演算に供さ
れる入力データの数に等しい数の加算器3及び乗算器4
を必要とし、その分、演算装置が大型化している問題点
を有していた。However, in the latter configuration, the number of adders 3 and multipliers 4 equal to the number of input data to be operated
And there is a problem that the arithmetic unit is correspondingly increased in size.
【0012】本発明は上記問題点に鑑み、その目的は、
乗算器は加算器よりも極めて大きい実情から、乗算器の
数を低減して小型化を図りつつ、従来と同様の演算を行
い得る演算装置を提供する点にある。In view of the above problems, the present invention has
Since the multiplier is much larger than the adder, it is an object of the present invention to provide an arithmetic unit capable of performing the same operation as the conventional one while reducing the number of the multipliers to reduce the size.
【0013】[0013]
【課題を解決するための手段】上記問題点を解決するた
めに、本発明では次の点に着目した。即ち、画像処理等
で用いられるフィルターでは、複数の入力データの各々
の乗算に際し、その乗算に使用される係数が所定の2つ
の入力データ間で対称である対称型フィルターがある点
に着目し、この対称型フィルターでは、同一の係数を使
用する入力データ相互を先に加算し、その後にその加算
結果と係数とを乗算することにより、乗算器の数を半減
する構成とする。In order to solve the above problems, the present invention has focused on the following points. That is, in a filter used in image processing or the like, at the time of multiplication of each of a plurality of input data, attention is paid to the fact that there is a symmetric filter in which coefficients used for the multiplication are symmetric between predetermined two input data. This symmetrical filter has a configuration in which input data using the same coefficient are added first, and then the result of addition is multiplied by a coefficient, thereby halving the number of multipliers.
【0014】即ち、請求項1記載の発明では、共通の第
1の入力データが与えられ、互いに直列に接続されるn
個(n≧2)の積和演算手段を備え、前記各積和演算手
段は、第1のデータ保持手段と、第2のデータ保持手段
と、前記第2のデータ保持手段の内容と前記第1の入力
データとを加算する第1の加算手段と、前記第1の加算
手段の加算結果と係数とを乗算する乗算手段と、前記乗
算手段の乗算結果と前記第1のデータ保持手段の格納デ
ータとを加算する第2の加算手段とを備え、第1段目の
積和演算手段では、第1のデータ保持手段に第2の入力
データが与えら れ、第2のデータ保持手段に第3の入力
データが与えられ、第i(2≦i≦n)段目の積和演算
手段では、第1のデータ保持手段に第i−1段目の積和
演算手段の第2の加算手段の出力が与えられ、第2のデ
ータ保持手段に前記第i−1段目の積和演算手段の第2
のデータ保持手段の出力が与えられる構成としている。[0014] That is, in the first aspect of the present invention, a common first
1 input data and n connected in series with each other
Comprising a product-sum operation means number (n ≧ 2), wherein each of the product-sum operation unit, said first data holding means, and second data holding means, and the content of the second data holding means the First adding means for adding the first input data, multiplying means for multiplying the addition result of the first adding means by a coefficient, and storing the multiplication result of the multiplying means and the first data holding means. and a second adding means for adding the data, the first stage
In the product-sum operation means, the second data is input to the first data holding means.
Data is given et al is, a third input to the second data holding means
Given data, i-th (2 ≦ i ≦ n) stage product-sum operation
In the means, the product sum of the (i-1) th stage is stored in the first data holding means.
The output of the second adding means of the arithmetic means is given and the second data
Data holding means in the data storage means
Is provided .
【0015】[0015]
【作用】以上の構成により、請求項1記載の発明では、
各積和演算手段では、入力データに対して、この入力デ
ータと同一の係数が使用される入力データが第2のデー
タ保持手段に格納され、この格納されたデータと入力デ
ータとが第1の加算器で加算された後、その加算結果と
係数とが乗算される。According to the above-mentioned structure, according to the first aspect of the present invention,
In each of the product-sum operation means, for the input data, input data using the same coefficient as the input data is stored in the second data holding means, and the stored data and the input data are compared with the first data. After the addition by the adder, the addition result is multiplied by a coefficient.
【0016】従って、各積和演算手段では、1個の乗算
器を備えれば足りる。更に、備える複数個(n個)の積
和演算手段を同一の内部構成にできる。 Therefore, each product-sum operation means only needs to have one multiplier. Furthermore, the product of plural (n)
The sum operation means can have the same internal configuration.
【0017】[0017]
【実施例】以下、本発明の演算装置の対称型フィルター
を実現する実施例について、図面を参照しながら説明す
る。DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment for realizing a symmetric filter of an arithmetic unit according to the present invention will be described below with reference to the drawings.
【0018】図1は本発明の実施例を示す演算装置のブ
ロック図である。同図において、20…は積和演算装置
であり、各々、第1の加算手段としての加算器22、第
2の加算手段としての加算器21、乗算手段としての乗
算器23、第1のデータ保持手段としてのデータ保持回
路24、第2のデータ保持手段としてのデータ保持回路
25、および係数レジスタ26を有する。本実施例で
は、n個(図1では3個)の積和演算装置20…が直列
に接続され、入力データ32が第1の入力データとして
これ等3つの積和演算装置20…の各加算器22に与え
られる。FIG. 1 is a block diagram of an arithmetic unit showing an embodiment of the present invention. In the figure, reference numerals 20... Denote a product-sum operation device, each of which is an adder 22 as a first addition means, an adder 21 as a second addition means, a multiplier 23 as a multiplication means, and a first data. It has a data holding circuit 24 as holding means, a data holding circuit 25 as second data holding means, and a coefficient register 26. In the present embodiment, n ( three in FIG. 1 ) product-sum operation devices 20 are connected in series, and the input data 32 is used as the first input data. Are given to each adder 22.
【0019】各積和演算装置20…において、加算器2
2は入力データ32とデータ保持回路25の出力31と
を加算し、その加算結果を乗算器23に出力する。乗算
器23は加算器22の加算結果と係数レジスタ26に保
持されている係数とを掛け、その乗算結果を加算器21
に出力する。加算器21は乗算器23の乗算結果とデー
タ保持回路24の内容を加算して出力する。データ保持
回路25は、2個のラッチ27、28を直列に接続して
構成される。ラッチ27およびラッチ28はクロック信
号29に同期してデータを格納する。従って、データ保
持回路25は、入力されるデータの今回値および前回値
の2つのデータを保持し、入力されたデータは2クロッ
ク後に出力される。In each of the product-sum operation units 20,...
2 adds the input data 32 and the output 31 of the data holding circuit 25 and outputs the addition result to the multiplier 23. The multiplier 23 multiplies the addition result of the adder 22 by the coefficient held in the coefficient register 26, and outputs the multiplication result.
Output to The adder 21 adds the multiplication result of the multiplier 23 and the content of the data holding circuit 24 and outputs the result. The data holding circuit 25 is configured by connecting two latches 27 and 28 in series. Latches 27 and 28 store data in synchronization with clock signal 29. Therefore, the data holding circuit 25 holds two data of the current value and the previous value of the input data, and outputs the input data two clocks later.
【0020】また、33は乗算器、34は係数レジスタ
である。乗算器33の後に前記3つの積和演算装置20
…が直列に接続される。入力データ(第1の入力デー
タ)32は3つの積和演算装置20の加算器22と共に
乗算器33にも与えられる。Reference numeral 33 denotes a multiplier, and reference numeral 34 denotes a coefficient register. After the multiplier 33, the three product-sum operation units 20
... are connected in series. Input data (first input data
( 32 ) is also given to the multiplier 33 together with the adders 22 of the three sum-of-products arithmetic units 20.
【0021】最前段(第1段目)の積和演算装置20で
は、その内部のデータ保持回路24の入力に、前記乗算
器33の出力が第2のデータとして与えられ、その内部
のデータ保持回路25の入力に前記入力データ(第1の
入力データ)32が、第3の入力データとして与えられ
る。[0021] In the product-sum calculation unit 20 at the first stage (first stage)
Is the input of the internal data holding circuit 24 thereof, the output of the multiplier 33 is supplied as the second data, therein
The input data (first input of the data holding circuit 25 of
Input data) 32 is given as the third input data .
【0022】更に、整数iを2≦i≦nの値として、第
i(i=2)段目の積和演算装置20では、その内部の
データ保持回路24の入力に、その前段に位置する第i
−1(=1)段目の積和演算装置20の加算器21の出
力が与えられ、その内部のデータ保持回路25の入力
に、その前段に位置する第1段目の積和演算装置20の
データ保持回路25の出力31が与えられる。同様に、
第i(i=3=n)段目の積和演算装置20では、その
内部のデータ保持回路24の入力に、その前段に位置す
る第i−1(=2)段目の積和演算装置20の加算器2
1の出力が与えられ、その内部のデータ保持回路25の
入力に、その前段に位置する第2段目の積和演算装置2
0のデータ保持回路25の出力31が与えられる。 Further, assuming that the integer i is a value of 2 ≦ i ≦ n,
In the product-sum operation device 20 at the i-th stage (i = 2),
The input of the data holding circuit 24 is connected to the ith
The output of the adder 21 of the product-sum operation unit 20 at the -1 (= 1) stage
And the input of the internal data holding circuit 25
Of the first-stage product-sum operation device 20 located at the preceding stage
An output 31 of the data holding circuit 25 is provided. Similarly,
In the i-th (i = 3 = n) stage product-sum operation unit 20,
The input of the internal data holding circuit 24 is
Adder 2 of the i-1 (= 2) -th stage product-sum operation unit 20
1 of the data holding circuit 25
A second-stage product-sum operation device 2 located at the preceding stage as an input
The output 31 of the 0 data holding circuit 25 is provided.
【0023】以上のように構成された演算装置につい
て、以下、その動作を説明する。尚、対称型フィルター
として、前記(式1)で係数a(1) =a(7) 、a(2) =
a(6)、a(3) =a(5) である場合を考える。The operation of the arithmetic unit configured as described above will be described below. As a symmetric filter, the coefficients a (1) = a (7) and a (2) =
Consider the case where a (6) and a (3) = a (5).
【0024】先ず、係数レジスタ34に保持されている
値をa(4) 、第1段目、第2段目、第3段目の積和演算
装置20の係数レジスタ26に保持している値を各々a
(3)、a(2) 及びa(1) とする。[0024] First, the value held in the coefficient register 34 a (4), first stage, second stage, held in the coefficient register 26 of the third stage of the product-sum calculation unit 20 has a value Is a
(3), a (2) and a (1).
【0025】時刻T以降、1クロック毎にデータd(T)
、d(T+1 )、d(T+2) …が入力データ32に与えられ
る。今、時刻Tから3クロック後において、入力データ
32にはd(T+3) のデータが与えられ、第1段目の積和
演算装置20のデータ保持回路25は2クロック前の入
力データd(T+1) を出力している。乗算器33は入力デ
ータd(T+3) と係数レジスタ34の内容a(4) の乗算を
行なう。After time T, data d (T)
, D (T + 1), d (T + 2),... Now, three clocks after the time T, the input data 32 is given data of d (T + 3), and the data holding circuit 25 of the first- stage multiply-accumulate operation device 20 outputs the input data d two clocks before. (T + 1) is output. The multiplier 33 multiplies the input data d (T + 3) by the content a (4) of the coefficient register 34.
【0026】次のクロックで、第1段目の積和演算装置
20のデータ保持回路24は乗算器31の結果、即ちa
(4) *d(T+3) を格納し、データ保持回路25はd(T+
2) を出力する。この時、入力データ32にはデータd
(T+4) が与えられており、第1段目の積和演算器20の
加算器22はd(T+4) とd(T+2) とを加算し、乗算器2
3は加算器22の加算結果と係数レジスタ26の係数a
(3) とを乗算し、加算器21は乗算器23の乗算結果と
データ保持回路24の内容とを加算して、2段目の積和
演算装置20のデータ保持回路24に出力する。At the next clock, the data holding circuit 24 of the first- stage product-sum operation unit 20 outputs the result of the multiplier 31, that is, a
(4) * d (T + 3) is stored, and the data holding circuit 25 stores d (T + 3).
2) is output. At this time, the input data 32 includes data d
(T + 4) is given, and the adder 22 of the product-sum calculator 20 in the first stage adds d (T + 4) and d (T + 2), and the multiplier 2
3 is the addition result of the adder 22 and the coefficient a of the coefficient register 26.
The adder 21 adds the result of the multiplication by the multiplier 23 and the content of the data holding circuit 24 and outputs the result to the data holding circuit 24 of the product-sum operation device 20 in the second stage .
【0027】更に次のクロックでは、入力データ32に
はd(T+5) が与えられ、第2段目の積和演算装置20の
データ保持回路25の出力はd(T+1) であり、加算器2
2はd(T+1) とd(T+5) とを加算し、乗算器23はこの
加算結果と係数レジスタ24の係数a(2) とを掛け、こ
の乗算結果を第1段目の積和演算装置20の加算結果と
加算して、第3段目の積和演算装置20に出力する。At the next clock, d (T + 5) is given to the input data 32, and the output of the data holding circuit 25 of the second- stage product-sum operation unit 20 is d (T + 1). , Adder 2
2 adds d (T + 1) and d (T + 5), the multiplier 23 multiplies the result of addition by the coefficient a (2) of the coefficient register 24, and outputs the result of the multiplication in the first stage . The result is added to the addition result of the product-sum operation unit 20 and output to the product-sum operation unit 20 at the third stage .
【0028】前記と同様にして、第3段目の積和演算装
置20の加算器21の出力outは、(式3)で表され
るデータを出力する。In the same manner as described above, the output out of the adder 21 of the third- stage product-sum operation unit 20 outputs data represented by (Equation 3).
【0029】[0029]
【式3】 このように、この実施例の演算装置は、対称型のフィル
ターを実現することができる。(Equation 3) As described above, the arithmetic device of this embodiment can realize a symmetric filter.
【0030】従って、本実施例では、3個の積和演算装
置20…を同じ構成にし、この同じ構成の積和演算装置
20…を直列に接続したものであるので、半導体集積回
路として配置が容易であり、面積の削減および開発期間
の短縮を図ることができると共に、積和演算装置20…
の追加および削減が容易である。更に、1クロック内に
1つの乗算と1つの加算を処理すればよいので、動作周
波数を高くして処理能力を上げることができる。Therefore, in this embodiment, three product-sum operation devices are used.
Since the devices 20 have the same configuration and the product-sum operation devices 20 having the same configuration are connected in series, the arrangement is easy as a semiconductor integrated circuit, and the area and the development period can be reduced. As well as the sum-of-products arithmetic unit 20 ...
Is easy to add and reduce. Further, since one multiplication and one addition need only be processed in one clock, the operating frequency can be increased and the processing capability can be increased.
【0031】しかも、7つの入力データに各々係数を掛
けてその各乗算結果を加算する演算装置であっても、乗
算器23…を4個備えれば足りるので、従来のように入
力データの数に等しい7個の乗算器を備える場合に比し
て、乗算器を3個低減することができる。Moreover, even if the arithmetic unit multiplies each of the seven input data by a coefficient and adds the result of each multiplication, it is sufficient to provide four multipliers 23... The number of multipliers can be reduced by three as compared with the case where seven multipliers are provided.
【0032】尚、本実施例では、3つの積和演算装置2
0…と1個の乗算器33とを用いて、7つの入力データ
に対する演算を実現したが、積和演算装置20…を4
個、5個…と増やせば、各々9個、11個…の入力デー
タに対する演算が実現できるのは勿論である。In this embodiment, three product-sum operation devices 2
.. And one multiplier 33, the operation on the seven input data is realized.
If the number is increased to 5, 5,..., It is needless to say that the operation can be performed on 9, 11,.
【0033】また、演算する入力データの数が偶数の場
合には、乗算器33および係数レジスタ34を設けず、
第1段目の積和演算装置20のデータ保持回路24に対
し、乗算器33の結果の代わりに0を与え、第1段目の
積和演算装置20のデータ保持回路25の中のラッチを
1個にすることにより、前記実施例と同様の演算を実現
できる。When the number of input data to be operated is even, the multiplier 33 and the coefficient register 34 are not provided.
To the data holding circuit 24 of the first- stage product-sum operation device 20, 0 is given instead of the result of the multiplier 33, and the latch in the data holding circuit 25 of the first- stage product-sum operation device 20 is reset. By using only one, the same operation as in the above embodiment can be realized.
【0034】更に、各積和演算装置20…の加算器21
…を桁上げ保存加算器に置き換えて、部分和と部分桁上
げと乗算器23の乗算結果とを加算すると共に、最終段
の桁上げ保存加算器の2つの出力、即ち部分和と部分桁
上げとを加算する加算器を別途設けてもよい。この場合
には、桁上げの伝播がないので、演算速度が速く、また
回路規模を極めて小さくできる効果を奏する。Further, the adder 21 of each of the product-sum operation units 20...
Is replaced by a carry save adder, the partial sum, the partial carry and the result of the multiplication by the multiplier 23 are added, and the two outputs of the final stage carry save adder, that is, the partial sum and the partial carry May be separately provided. In this case, there is no carry propagation, so that the operation speed is high and the circuit scale can be extremely reduced.
【0035】加えて、係数が2、4、8等の2のべき乗
の場合には、各乗算器23…をシフタで構成してもよ
い。In addition, when the coefficient is a power of 2, such as 2, 4, 8, etc., each of the multipliers 23 may be constituted by a shifter.
【0036】また、各乗算器23…を、その乗算結果を
保持する記憶装置を有するもので構成してもよい。Further, each of the multipliers 23 may be configured to have a storage device for holding the result of the multiplication.
【0037】更に、本実施例では、各乗算の係数を各係
数レジスタ26…に保持したが、係数レジスタを持たず
に演算装置の外部から信号線を介して乗算器に与えた
り、又は乗算器を、特定の係数を掛ける乗算器で構成し
てもよい。Further, in the present embodiment, the coefficients of each multiplication are held in each coefficient register 26..., But are provided to the multiplier via a signal line from outside the arithmetic unit without the coefficient register, or May be configured by a multiplier for multiplying by a specific coefficient.
【0038】加えて、本実施例では、1クロックで各積
和演算装置20…内の加算と乗算との両処理を行った
が、各積和演算装置20…内の適当な箇所にラッチを設
けて、パイプライン処理を行なえば、1クロックの処理
量を少なくでき、クロック周波数を高くすることができ
る。In addition, in this embodiment, both addition and multiplication processing in each of the product-sum operation units 20 are performed in one clock, but a latch is provided at an appropriate position in each of the product-sum operation units 20. By providing and performing pipeline processing, the processing amount of one clock can be reduced and the clock frequency can be increased.
【0039】また、各加算器21…に適当なリミッター
機能を設けて、結果の値が設定範囲外になった場合に、
適当な値に置き換えて出力するように構成してもよい。Also, an appropriate limiter function is provided for each of the adders 21... When the value of the result is out of the set range.
A configuration may be adopted in which the output is replaced with an appropriate value.
【0040】[0040]
【発明の効果】以上説明したように、本発明の演算装置
によれば、共通の第1の入力データが与えられ、互いに
直列に接続されるn個(n≧2)の積和演算手段を備
え、前記各積和演算手段は、第1のデータ保持手段と、
第2のデータ保持手段と、前記第2のデータ保持手段の
内容と前記第1の入力データとを加算する第1の加算手
段と、前記第1の加算手段の加算結果と係数とを乗算す
る乗算手段と、前記乗算手段の乗算結果と前記第1のデ
ータ保持手段の格納データとを加算する第2の加算手段
とを備え、第1段目の積和演算手段では、第1のデータ
保持手段に第2の入力データが与えられ、第2のデータ
保持手段に第3の入力データが与えられ、第i(2≦i
≦n)段目の積和演算手段では、第1のデータ保持手段
に第i−1段目の積和演算手段の第2の加算手段の出力
が与えられ、第2のデータ保持手段に前記第i−1段目
の積和演算手段の第2のデータ保持手段の出力が与えら
れる構成して、同一の係数を使用する入力データ同志を
加算した後に係数を掛けたので、入力データの個数より
も少ない乗算器を使用しつつ、同一構成の積和演算手段
を複数個直列に接続した規則的な構成であって半導体集
積回路として配置が容易で、しかも入力データ数が異な
る対称型フィルター処理にも前記同一構成の積和演算手
段の個数調整により容易に対応できて拡張性が高く、高
速処理を行なうことができる演算装置を提供できる。As described above, according to the arithmetic unit of the present invention, the common first input data is provided, and n (n.gtoreq.2) product-sum operation means connected in series to each other are provided. wherein the respective product-sum operation means includes first data holding means,
Multiplies the second data holding means, a first adding means for adding the contents of the first input data of said second data holding means, the addition result and the coefficient of the first addition means a multiplying means, and a second adding means for adding the data stored in the multiplication result to the first data holding means of said multiplying means, in the first stage of the product-sum operation unit, the first data
The second input data is provided to the holding means, and the second data
The third input data is given to the holding means, and the ith (2 ≦ i)
.Ltoreq.n) the first data holding means
The output of the second adding means of the (i-1) th product-sum calculating means.
Is given to the second data holding means, and
Given the output of the second data holding means of the multiply-accumulate means of
Since the input data using the same coefficient are added to each other and then multiplied by the coefficient, the product-sum operation means of the same configuration is used while using less multipliers than the number of input data.
Are connected in series, are easy to arrange as a semiconductor integrated circuit, and have different numbers of input data.
The sum-of-products operator of the same configuration
It is possible to provide an arithmetic unit that can easily cope with the adjustment of the number of stages, has high expandability, and can perform high-speed processing.
【図1】本発明の実施例における演算装置を示すブロッ
ク図である。FIG. 1 is a block diagram illustrating an arithmetic unit according to an embodiment of the present invention.
【図2】従来の演算装置を示すブロック図である。FIG. 2 is a block diagram illustrating a conventional arithmetic device.
【図3】従来の他の演算装置を示すブロック図である。FIG. 3 is a block diagram showing another conventional arithmetic unit.
20 積和演算手段 24 データ保持回路(第1のデータ保持
回路) 25 データ保持回路(第2のデータ保持
回路) 21 加算器(第2の加算手段) 22 加算器(第1の加算手段) 23 乗算器(乗算手段) 26、34 係数レジスタ 29 クロック信号 32 入力データReference Signs List 20 product-sum operation means 24 data holding circuit (first data holding circuit) 25 data holding circuit (second data holding circuit) 21 adder (second adding means) 22 adder (first adding means) 23 Multipliers (multiplication means) 26, 34 Coefficient register 29 Clock signal 32 Input data
───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭59−127171(JP,A) 特開 昭60−119116(JP,A) 特開 平1−126819(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06F 17/10 JICSTファイル(JOIS)────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-59-127171 (JP, A) JP-A-60-119116 (JP, A) JP-A-1-126819 (JP, A) (58) Field (Int.Cl. 6 , DB name) G06F 17/10 JICST file (JOIS)
Claims (5)
に直列に接続されるn個(n≧2)の積和演算手段を備
え、前記各積和演算手段は、第 1のデータ保持手段と、第 2のデータ保持手段と、 前記第2のデータ保持手段の内容と前記第1の入力デー
タとを加算する第1の加算手段と、 前記第1の加算手段の加算結果と係数とを乗算する乗算
手段と、 前記乗算手段の乗算結果と前記第1のデータ保持手段の
格納データとを加算する第2の加算手段とを備え、 第1段目の積和演算手段では、第1のデータ保持手段に
第2の入力データが与えられ、第2のデータ保持手段に
第3の入力データが与えられ、 第i(2≦i≦n)段目の積和演算手段では、第1のデ
ータ保持手段に第i−1段目の積和演算手段の第2の加
算手段の出力が与えられ、第2のデータ保持手段に前記
第i−1段目の積和演算手段の第2のデータ保持手段の
出力が与えられる ことを特徴とする演算装置。1. A given common first input data, provided with a product-sum operation means n (n ≧ 2) which are connected in series with each other, the respective product-sum operation unit, a first data holding means, and second data holding means, a first adding means for adding the contents of the first input data of said second data holding means, and the addition result and the coefficient of the first addition means multiplication means for multiplying, and a second adding means for adding the data stored in the multiplication result to the first data holding means of said multiplying means, in the first stage of the product-sum operation unit, first Data retention means
The second input data is provided, and the second data
The third input data is provided, and the product-sum operation means of the i-th (2 ≦ i ≦ n) stage outputs the first data.
The second addition of the product-sum operation means of the (i-1) th stage to the data holding means.
The output of the arithmetic means is given and the second data holding means
Of the second data holding means of the product-sum operation means of the (i-1) th stage
An arithmetic unit characterized by receiving an output .
記憶されることを特徴とする請求項1記載の演算装置。2. The arithmetic unit according to claim 1, wherein the coefficient used in the multiplying means is stored in a register.
ータとして前記第1段目の積和演算手段に与えられると
ともに、 係数を記憶する第2のレジスタと、 前記第1の入力データと前記第2のレジスタの係数とを
乗算し、乗算結果を前記第2の入力データとして前記第
1段目の積和演算手段に出力する第2の乗算手段とを備
えたことを特徴とする請求項1又は請求項2記載の演算
装置。3. The method according to claim 2, wherein the first input data is the third input data.
Together provided to the first stage of the product-sum operation manual stage as over data, multiplies the second register for storing the coefficients, and a coefficient of said first input data and the second register, the multiplication result arithmetic unit according to claim 1 or claim 2, wherein further comprising a second multiplying means for outputting to the first stage of the product-sum operation manual stage as the second input data.
タの今回値と前回値の2つのデータを保持することを特
徴とする請求項1又は請求項2記載の演算装置。A second data holding means for inputting data;
3. The arithmetic unit according to claim 1, wherein two data of a current value and a previous value of the data are held.
1つは、桁上げ保存加算器で構成されることを特徴とす
る請求項1又は請求項2記載の演算装置。5. The arithmetic unit according to claim 1, wherein at least one of the adding means of the product-sum calculating means comprises a carry save adder.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5221341A JP2953918B2 (en) | 1993-09-06 | 1993-09-06 | Arithmetic unit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5221341A JP2953918B2 (en) | 1993-09-06 | 1993-09-06 | Arithmetic unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0773161A JPH0773161A (en) | 1995-03-17 |
| JP2953918B2 true JP2953918B2 (en) | 1999-09-27 |
Family
ID=16765292
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5221341A Expired - Fee Related JP2953918B2 (en) | 1993-09-06 | 1993-09-06 | Arithmetic unit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2953918B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2024015679A (en) * | 2022-07-25 | 2024-02-06 | 国立研究開発法人産業技術総合研究所 | arithmetic processing unit |
| CN119848406B (en) * | 2025-03-24 | 2025-08-12 | 深圳比特微电子科技有限公司 | Arithmetic circuits and computing devices |
-
1993
- 1993-09-06 JP JP5221341A patent/JP2953918B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0773161A (en) | 1995-03-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5287299A (en) | Method and apparatus for implementing a digital filter employing coefficients expressed as sums of 2 to an integer power | |
| JPH0235348B2 (en) | ||
| JPH08508857A (en) | Method and arrangement for multiplying a binary input signal by a tap coefficient in a transposed digital FIR filter and method for designing a transposed digital filter | |
| US20100146024A1 (en) | Digital filter, its synthesizing device, synthesizing program and synthesizing program recording medium | |
| US5016011A (en) | Increased performance of digital integrated circuits by processing with multiple-bit-width digits | |
| JP3129392B2 (en) | Two-dimensional IDCT circuit | |
| JP2953918B2 (en) | Arithmetic unit | |
| US5025257A (en) | Increased performance of digital integrated circuits by processing with multiple-bit-width digits | |
| US20040128335A1 (en) | Fast fourier transform (FFT) butterfly calculations in two cycles | |
| JPH0519170B2 (en) | ||
| US7003538B2 (en) | Process and apparatus for finite field multiplication (FFM) | |
| JP3139137B2 (en) | Digital signal processing circuit that performs filter operation of digital filter processing | |
| JPH0816903B2 (en) | Multiply-accumulate operation circuit | |
| JP2957845B2 (en) | Fast Fourier transform device | |
| JP3221076B2 (en) | Digital filter design method | |
| JPH06223097A (en) | Circuit description generating method for multiplier and product sum computing unit | |
| Deb et al. | FPGA based Matrix Multiplication Accelerator | |
| JPS6259828B2 (en) | ||
| JP2864598B2 (en) | Digital arithmetic circuit | |
| Bowlyn et al. | A novel distributed arithmetic approach for computing a radix-2 FFT butterfly implementation | |
| JPH0447454A (en) | Method and device for discrete fourier transformation or cosine transformation of digital data | |
| JPH0652215A (en) | Matrix arithmetic processor | |
| JPS59198020A (en) | Digital signal processor | |
| JPH01300338A (en) | Floating point multiplier | |
| JPH04364525A (en) | parallel computing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19990629 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070716 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080716 Year of fee payment: 9 |
|
| LAPS | Cancellation because of no payment of annual fees |