JPH10322164A - Digital filter - Google Patents

Digital filter

Info

Publication number
JPH10322164A
JPH10322164A JP13109297A JP13109297A JPH10322164A JP H10322164 A JPH10322164 A JP H10322164A JP 13109297 A JP13109297 A JP 13109297A JP 13109297 A JP13109297 A JP 13109297A JP H10322164 A JPH10322164 A JP H10322164A
Authority
JP
Japan
Prior art keywords
data
address
digital filter
counter
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP13109297A
Other languages
Japanese (ja)
Other versions
JP3097599B2 (en
Inventor
Masashi Nakagawa
昌士 中川
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP09131092A priority Critical patent/JP3097599B2/en
Publication of JPH10322164A publication Critical patent/JPH10322164A/en
Application granted granted Critical
Publication of JP3097599B2 publication Critical patent/JP3097599B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a digital filter in which dispenses with transfer of a first data memory and a second data memory, and a multiplicative step can be increased, and the precision of a filter can be improved, without damaging an arithmetic speed in a digital filter for thinning-out input data at a constant ratio. SOLUTION: Data are read from RAMs 63 and 64, in which input data 1 are written based on an address supplied from an address generator 51, and a value obtained by adding the data by an adder 30 is multiplied by a coefficient read from an ROM 71. The input data are divided into blocks constituted of N pieces of data and alternately stored in first and second memories. The addresses of the first and second data memories are calculated from the first and second numbers which indicate the block numbers of the block constituted of the N pieces of data, and the third number which indicates the location of data in the block.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ディジタルフィル
タに関し、特に入力データを一定の割合で間引いて出力
するディジタルフィルタに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a digital filter, and more particularly to a digital filter for thinning out input data at a constant rate and outputting the same.

【0002】[0002]

【従来の技術】近年、ディジタル回路の高集積化及びオ
ーバサンプリングA/D変換技術の発展にともない、デ
ィジタルフィルタを用いて信号処理を行うA/D変換技
術が主流となってきている。オーバサンプリングA/D
変換器は、最終的な変換周波数よりも、高いサンプリン
グ周波数でA/D変換を行い、ディジタルフィルタを用
いて、ローパスフィルタ処理を行うことで、折り返し雑
音を低減した後、データを間引くことを繰り返し、最終
的な変換周波数のデータを得る。このことは例えば、
「オーバサンプリングA−D変換技術」 湯川彰著 日
経BP社 1990年 97頁〜127頁などに詳し
い。
2. Description of the Related Art In recent years, A / D conversion technology for performing signal processing using a digital filter has become mainstream along with the high integration of digital circuits and the development of oversampling A / D conversion technology. Oversampling A / D
The converter performs A / D conversion at a sampling frequency higher than the final conversion frequency, performs low-pass filtering using a digital filter, reduces aliasing noise, and repeatedly thins out data. , And obtain the data of the final conversion frequency. This means, for example,
"Oversampling A / D Conversion Technology" Akira Yukawa, Nikkei BP, 1990, pp. 97-127.

【0003】オーバサンプリングA−D変換器用ディジ
タルフィルタとしては、FIR(Finite Imp
ulse Response)フィルタ、IIR(In
finite Impulse Response)フ
ィルタが、目的によって使い分けられている。その中
で、入出力の波形の位相の相互関係が変化しないもの、
すなわち群遅延歪みのないディジタルフィルタとして
は、完全直線位相FIRフィルタがある。
As a digital filter for an oversampling A / D converter, a FIR (Finite Imp) is used.
ulse response) filter, IIR (in)
A fine impulse response (Finite Impulse Response) filter is used depending on the purpose. Among them, those where the mutual relationship of the phases of the input and output waveforms do not change,
That is, as a digital filter having no group delay distortion, there is a perfect linear phase FIR filter.

【0004】次に、2N(Nは整数)タップを有する完
全直線位相FIRフィルタの第1の従来例について、図
4に示すブロック図を参照して説明すると、この完全直
線位相FIRフィルタは、入力データ1を順次遅延する
遅延回路2と、加算器3と、係数a0〜aN-1を加算器3
の出力と乗算する乗算器10〜1(N−1)と、累積加
算器4とから構成される。
Next, a first conventional example of a perfect linear phase FIR filter having 2N (N is an integer) taps will be described with reference to a block diagram shown in FIG. A delay circuit 2 for sequentially delaying data 1, an adder 3, and adding coefficients a 0 to a N-1 to the adder 3
And an accumulator 4.

【0005】以上のように構成された完全直線位相FI
Rフィルタの動作について説明する。ある時刻の入力デ
ータ1はx(n)で表され、これより遅延回路2により
1サンプル分遅れたデータはx(n−1)で表される。
同様に、遅延回路2により入力データ1を順次遅延し、
遅延したデータx(n−1)〜x(n−N+1)〜x
(n−2N+1)と入力データx(n)をそれぞれ加算
器3に入力する。
[0005] The complete linear phase FI constructed as described above
The operation of the R filter will be described. Input data 1 at a certain time is represented by x (n), and data delayed by one sample by the delay circuit 2 is represented by x (n-1).
Similarly, the input data 1 is sequentially delayed by the delay circuit 2,
Delayed data x (n-1) to x (n-N + 1) to x
(N−2N + 1) and input data x (n) are input to the adder 3.

【0006】2組のデータx(n−k),x(n+k−
(2N−1))(ここで、k=0〜N−1)は、加算器
3によりそれぞれ加算された後、乗算器10〜1(N−
1)により係数a0〜aN-1と乗算され、累積加算器4に
より全て加算される。従って、出力データy(n)は次
の(1)式により計算される。
Two sets of data x (nk), x (n + k-
(2N-1)) (where k = 0 to N-1) are added by the adder 3, and then added to the multipliers 10 to 1 (N-
1) are multiplied by the coefficients a 0 to a N−1, and all are added by the accumulator 4. Therefore, the output data y (n) is calculated by the following equation (1).

【0007】 [0007]

【0008】ここで、2組のデータx(n−k),x
(n+k−(2N−1))に乗算される係数は互いに等
しいから(1)式は次の(2)式のように変形できる。
Here, two sets of data x (nk), x
Since the coefficients multiplied by (n + k- (2N-1)) are equal to each other, the expression (1) can be modified as the following expression (2).

【0009】 [0009]

【0010】また、上述した完全直線位相FIRフィル
タを改良したディジタルフィルタの例が特開昭61−6
0005に記載されている。図5に示すブロック図及び
図6に示すタップ数を4としデータ遅延にシフトレジス
タを用いて構成した場合のブロック図を参照して、完全
直線位相FIRフィルタの第2の従来例を説明すると、
図5において、5はアドレス発生回路でROM7および
RAM61,62のアドレスを発生する。7は乗算係数
を記憶しておくためのROM、3は加算器、8は乗算
器、4は加算器3とレジスタ9からなる累積加算器であ
る。さらに、61,62はデータ遅延用のRAMであ
る。
An example of a digital filter obtained by improving the above-described perfect linear phase FIR filter is disclosed in Japanese Patent Laid-Open No. 61-6 / 1986.
0005. A second conventional example of a perfect linear phase FIR filter will be described with reference to the block diagram shown in FIG. 5 and the block diagram of FIG. 6 in which the number of taps is set to 4 and a data delay is configured using a shift register.
In FIG. 5, reference numeral 5 denotes an address generation circuit for generating addresses of the ROM 7 and the RAMs 61 and 62. Reference numeral 7 denotes a ROM for storing multiplication coefficients, reference numeral 3 denotes an adder, reference numeral 8 denotes a multiplier, and reference numeral 4 denotes a cumulative adder including the adder 3 and a register 9. Reference numerals 61 and 62 denote RAMs for data delay.

【0011】また、図6において20は1サンプル時間
の遅延を行うシフトレジスタ、31,32は対称の位置
のデータの加算を行う加算器、81,82は係数をかけ
る乗算器、4は累積加算器である。
In FIG. 6, reference numeral 20 denotes a shift register for delaying one sample time; 31, 32, adders for adding data at symmetrical positions; 81, 82, multipliers for applying coefficients; It is a vessel.

【0012】対称の位置の係数が等しいことにより、あ
らかじめ加算器31,32により対称の位置のデータを
加算し、このデータに乗算器81,82を用いてそれぞ
れ係数a1’,a2’をかけこの結果を累積加算器4で総
和をとることによりフィルタリングを行う。図5,6を
参照して具体的な処理手順を説明すると、最初にRAM
61からデータxn-1を読み出し、同時にRAM62か
らデータxn-4を読み出し、データxn-1とデータxn-4
を加算した後に係数a1’をかけ、この値を累積加算器
4に記憶する。
Since the coefficients at the symmetrical positions are equal, the data at the symmetrical positions are added in advance by the adders 31 and 32, and the coefficients a 1 ′ and a 2 ′ are added to the data using multipliers 81 and 82, respectively. The result is multiplied by the accumulator 4 to perform filtering. A specific processing procedure will be described with reference to FIGS.
61 reads data x n-1 from the read data x n-4 from RAM62 same time, the data x n-1 and the data x n-4
Is multiplied by a coefficient a 1 ′, and this value is stored in the accumulator 4.

【0013】次に、RAM61からデータxn-2を読み
出し、同時にRAM62からデータxn-3を読み出し、
データxn-2とデータxn-3を加算した後に係数a2’を
かけ、この値を累積加算器4により前回までの累積加算
値に加えることにより一つの出力サンプル値y(n−
1)を得る。
Next, data xn-2 is read from the RAM 61, and data xn-3 is read from the RAM 62 at the same time.
After adding the data x n−2 and the data x n−3, the result is multiplied by a coefficient a 2 ′, and this value is added to the previous cumulative addition value by the cumulative adder 4 to obtain one output sample value y (n−
Obtain 1).

【0014】この後、RAM61の一番古いデータは図
5の101を通りRAM62に書き込まれ、RAM61
には新しいデータが書き込まれ、前回の出力サンプル値
を計算したときと同様な操作を行い、次の出力サンプル
値を求める。
Thereafter, the oldest data in the RAM 61 is written to the RAM 62 through 101 in FIG.
Is written with new data, and the same operation as when the previous output sample value was calculated is performed to obtain the next output sample value.

【0015】このとき、上述したディジタルフィルタが
オーバサンプリングA/D変換器で使用されるデータを
間引くためのローパスフィルタであるときには、間引く
比率に応じて、演算量を削減することができる。例え
ば、1/3にデータを間引くとすると、上述した動作
は、y(n−1)を求める演算の次は、y(n+2)を
求めればよく、このときには、時刻tnと時刻t(n+
1)では、RAM61からRAM62へのデータの転
送、及び入力データの書き込みのみを行えばよい。
At this time, when the above-mentioned digital filter is a low-pass filter for thinning out the data used in the oversampling A / D converter, the amount of calculation can be reduced according to the thinning ratio. For example, assuming that the data is thinned out to 1/3, the above-described operation may be performed by calculating y (n + 2) next to the operation for obtaining y (n-1). In this case, time tn and time t (n +
In 1), only the transfer of data from the RAM 61 to the RAM 62 and the writing of input data need be performed.

【0016】[0016]

【発明が解決しようとする課題】上述した従来のディジ
タルフィルタは、同一係数を乗算器により乗算する2つ
のデータを、2つのデータをそれぞれ記憶している第1
のデータメモリと第2のデータメモリから読み出すため
には、第1のデータメモリから第2のデータメモリへの
データ転送が必要となり、このデータ転送の期間は乗算
処理ができないため高速化できないという問題がある。
In the above-described conventional digital filter, two data obtained by multiplying the same coefficient by a multiplier are stored in the first digital filter.
In order to read data from the data memory and the second data memory, it is necessary to transfer data from the first data memory to the second data memory, and the data transfer period cannot be multiplied, so that the speed cannot be increased. There is.

【0017】また高速化しようとすると、第1のデータ
メモリから第2のデータメモリへの転送時間を除外した
時間内に変換処理を行わなければならず、必然的にディ
ジタルフィルタのタップ数が制限されるという問題があ
る。
In order to increase the speed, the conversion process must be performed within the time excluding the transfer time from the first data memory to the second data memory, and the number of taps of the digital filter is necessarily limited. There is a problem that is.

【0018】このため、本発明の目的は、第1のデータ
メモリから第2のデータメモリへのデータ転送を不要と
し、ディジタルフィルタのタップ数を多くした高精度で
かつ高速のディジタルフィルタを提供することにある。
Therefore, an object of the present invention is to provide a high-accuracy and high-speed digital filter which eliminates the need for data transfer from the first data memory to the second data memory and increases the number of taps of the digital filter. It is in.

【0019】また、本発明のほかの目的は、第1のデー
タメモリ及び第2のデータメモリのアドレス生成が容易
なディジタルフィルタを提供することにある。
It is another object of the present invention to provide a digital filter which can easily generate addresses of the first data memory and the second data memory.

【0020】さらに、本発明のほかの目的は、アドレス
構成を簡素化しかつ回路遅延を1乗算期間のみとして高
速化したディジタルフィルタを提供することにある。
Still another object of the present invention is to provide a digital filter which simplifies an address configuration and has a high circuit delay with only one multiplication period.

【0021】[0021]

【課題を解決するための手段】そのため、本発明による
ディジタルフィルタは、入力データを記憶する第1及び
第2のデータメモリと、ディジタルフィルタの係数値を
発生する係数発生器と、前記第1及び前記第2のデータ
メモリと前記係数発生器のアドレス信号を発生するアド
レス発生器と、前記第1のデータメモリと前記第2のデ
ータメモリに記憶されている各データを加算する加算器
と、前記加算器の出力と前記係数発生器の出力とを乗算
する乗算器と、前記乗算器の乗算結果を累積加算する累
積加算器とを備え、入力データを1/N(N=2,3,
・・・)に間引くディジタルフィルタにおいて、前記ア
ドレス発生器は、前記第1及び第2のデータメモリに対
し、入力データをN個のデータからなるブロックに分け
て前記第1及び第2のデータメモリに交互に書き込むよ
うに前記アドレス信号を発生することを特徴としてい
る。
Therefore, a digital filter according to the present invention comprises first and second data memories for storing input data, a coefficient generator for generating coefficient values of the digital filter, and a first and a second data memory. An address generator for generating an address signal of the second data memory and the coefficient generator; an adder for adding each data stored in the first data memory and the second data memory; A multiplier for multiplying the output of the adder by the output of the coefficient generator; and a cumulative adder for cumulatively adding the multiplication result of the multiplier. The input data is 1 / N (N = 2, 3,
..), The address generator divides the input data into blocks of N data in the first and second data memories. The address signal is generated so as to alternately write to the address.

【0022】[0022]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面および表を参照して説明する。
Next, embodiments of the present invention will be described with reference to the drawings and tables.

【0023】図1は、本発明のディジタルフィルタの実
施の形態を示すブロック図である。本発明の実施の形態
によるディジタルフィルタは、入力データ1を遅延する
RAM63,64と、RAM63,64に記憶されてい
るデータを加算する加算器30と、係数を記憶するRO
M71と、加算器30に記憶されているデータとROM
71に記憶されている係数を乗算する乗算器8と、加算
器3とレジスタ9からなる累積加算器4と、RAM6
3,64およびROM71にアドレス信号を供給するア
ドレス発生器51とを備える。
FIG. 1 is a block diagram showing an embodiment of a digital filter according to the present invention. The digital filter according to the embodiment of the present invention includes RAMs 63 and 64 for delaying input data 1, an adder 30 for adding data stored in RAMs 63 and 64, and an RO for storing coefficients.
M71, data and ROM stored in the adder 30
A multiplier 8 for multiplying the coefficient stored in the memory 71; a cumulative adder 4 including an adder 3 and a register 9;
3 and 64 and an address generator 51 for supplying an address signal to the ROM 71.

【0024】なお、図1には明示していないが本実施の
形態によるディジタルフィルタは、48タップを有する
完全直線位相FIRローパスフィルタであり、入力デー
タを1/3に間引くとして説明を進める。すなわち、入
力データをサンプリングする周波数である入力サンプリ
ング周波数をFs1、出力データをサンプリングする周
波数である出力サンプリング周波数をFs2とすると、
Fs1:Fs2=3:1であり、入力データは1/Fs
1毎に入力され、出力データは1/Fs2毎に出力され
る。
Although not explicitly shown in FIG. 1, the digital filter according to the present embodiment is a perfect linear phase FIR low-pass filter having 48 taps, and the description will be made on the assumption that input data is thinned out to 1/3. That is, assuming that an input sampling frequency which is a frequency for sampling input data is Fs1 and an output sampling frequency which is a frequency for sampling output data is Fs2,
Fs1: Fs2 = 3: 1, and the input data is 1 / Fs
1 and the output data is output every 1 / Fs2.

【0025】次に、図1を参照して本発明の実施の形態
によるディジタルフィルタの基本動作について説明す
る。
Next, the basic operation of the digital filter according to the embodiment of the present invention will be described with reference to FIG.

【0026】入力データ1は、アドレス発生器51から
供給されるアドレス信号に従ってRAM63又はRAM
64に記憶される。次に、RAM63とRAM64から
読み出されたデータは加算器30で加算される。この加
算データは、アドレス発生器51から供給されるアドレ
ス信号に基づきROM71に記憶されている加算データ
に対応する係数とともに読み出され、乗算器8により乗
算される。
The input data 1 is stored in the RAM 63 or RAM in accordance with the address signal supplied from the address generator 51.
64. Next, the data read from the RAM 63 and the RAM 64 are added by the adder 30. This addition data is read out together with a coefficient corresponding to the addition data stored in the ROM 71 based on the address signal supplied from the address generator 51, and is multiplied by the multiplier 8.

【0027】乗算器8の出力データは、レジスタ9に保
持されているデータと加算器3により累算され、再びレ
ジスタ9に保持される。これを繰り返し、フィルタ演算
終了後、出力データを累積加算器から出力し、レジスタ
9がリセットされる。
The output data of the multiplier 8 is accumulated by the adder 3 with the data held in the register 9 and is again held in the register 9. This is repeated, and after the filter operation is completed, the output data is output from the accumulator and the register 9 is reset.

【0028】次に、表1に示すRAM63,64のアド
レス信号の遷移表をもとに、図1に示す本発明の実施の
形態によるディジタルフィルタの動作について説明す
る。
Next, the operation of the digital filter according to the embodiment of the present invention shown in FIG. 1 will be described based on the transition table of the address signals of the RAMs 63 and 64 shown in Table 1.

【0029】 [0029]

【0030】表1の左端に示す0〜15の数字は、RA
M63,64が保持している全データの16の状態を表
している。RAM63,64のアドレスA63,A64
は、順番a1,a2,bを用いてそれぞれA63=a1
+8b、A64=a2+8bで表すことができ、順番a
1,a2はそれぞれ0〜7、順番bは0,1,2の値を
とるので、A63,A64はそれぞれ0〜23までの値
をとる。
The numbers from 0 to 15 shown at the left end of Table 1 are RA
M63 and M64 represent 16 states of all data held. Addresses A63 and A64 of RAMs 63 and 64
Is A63 = a1 using the order a1, a2, and b, respectively.
+ 8b, A64 = a2 + 8b, and the order a
1 and a2 take values of 0 to 7, respectively, and the order b takes values of 0, 1 and 2, so that A63 and A64 take values of 0 to 23, respectively.

【0031】はじめに、入力データは図2に示すよう
に、間引きの比率に対応する3個の連続したデータから
なるブロックに分けられており、順番a1,a2はこの
ブロック番号を表している。また、順番bはブロック内
の順番を示しており、順番a1もしくは順番a2と組み
合わせることで、特定の状態において、RAM63,6
4に記憶されているデータが何サンプル分の遅延データ
に当たるかを示している。
First, as shown in FIG. 2, the input data is divided into blocks composed of three continuous data corresponding to the thinning ratio, and the order a1, a2 represents this block number. The order b indicates the order in the block, and when combined with the order a1 or the order a2, the RAM 63, 6
4 shows how many samples of the data stored in the delay data correspond to the delay data.

【0032】例えば、状態0において順番bは2→1→
0の順に変化するが、b=2,a1=7のときのRAM
63のアドレスA63は、A63=7+8・2=23で
あり、このアドレスには表1の矢印で示すようにデータ
x(n−44)が記憶されている。ここで44は、タッ
プ番号を示している。すなわち、表1の太線内の数字
は、順番a1,a2,bで指定されるRAM63,64
のアドレスにどのタップ番号のデータが対応するかを表
している。上記の場合、RAM64にはアドレスA64
=0+8・2=16に、表1の矢印で示すようにデータ
x(n−3)が記憶されている。
For example, in state 0, the order b is 2 → 1 →
0, but RAM changes when b = 2 and a1 = 7
The address A63 of 63 is A63 = 7 + 8.2 = 23, and data x (n-44) is stored in this address as shown by the arrow in Table 1. Here, 44 indicates a tap number. That is, the numbers in the bold lines in Table 1 correspond to the RAMs 63 and 64 specified in the order a1, a2 and b.
Indicates which tap number data corresponds to the address. In the above case, the address A64 is stored in the RAM 64.
= 0 + 8.2 = 16, data x (n−3) is stored as indicated by the arrow in Table 1.

【0033】次に、順番bが2を保持しつつ、順番a1
が7から6に変化し、これとともに順番a2が0から1
に変化すると、アドレスA63はA63=6+8・2=
22に、アドレスA64はA64=1+8・2=17に
変化し、アドレスA63にはデータx(n−38)が、
アドレスA64にはデータx(n−9)が記憶される。
Next, while the order b holds 2, the order a1
Changes from 7 to 6, and the order a2 changes from 0 to 1
, The address A63 becomes A63 = 6 + 8.2 =
22, the address A64 changes to A64 = 1 + 8.2 = 17, and the data x (n-38) is stored in the address A63.
Data x (n-9) is stored in the address A64.

【0034】さらに、順番bが2を保持しつつ、順番a
1が6から5に変化し、順番a2が1から2に変化する
と、アドレスA63はA63=5+8・2=21に、ア
ドレスA64はA64=2+8・2=18に変化し、ア
ドレスA63にはデータx(n−32)が、アドレスA
64にはデータx(n−15)が記憶される。
Further, while the order b holds 2, the order a
When 1 changes from 6 to 5, and the order a2 changes from 1 to 2, address A63 changes to A63 = 5 + 8.2 = 21, address A64 changes to A64 = 2 + 8.2 = 18, and data is stored in address A63. x (n-32) is the address A
64 stores data x (n-15).

【0035】同様に、順番bが2を保持したまま、順番
a1,a2がそれぞれ0,7まで進むとアドレスA63
はA63=0+8・2=16に、アドレスA64はA6
3=7+8・2=23に変化し、このときアドレスA6
3にはドレスA63にはデータx(n−2)が、アドレ
スA64にはデータx(n−45)が記憶される次に、
順番bが2から1に変化すると、順番a1は7→6→5
・・・0に変化し、順番a2は順番a2の変化と連動し
て0→1→2・・・7のように変化する。このような動
作を順番bが0に、順番a1およびa2がそれぞれ0及
び7になるまで繰り返して状態0が終了する。
Similarly, if the order a1 and a2 advance to 0 and 7 respectively while the order b holds 2, the address A63
Is A63 = 0 + 8.2 = 16, and address A64 is A6
3 = 7 + 8.2 · 2 = 23. At this time, the address A6
3, data x (n-2) is stored in the dress A63, and data x (n-45) is stored in the address A64.
When the order b changes from 2 to 1, the order a1 becomes 7 → 6 → 5
.. 0, and the order a2 changes as 0 → 1 → 2... 7 in conjunction with the change of the order a2. This operation is repeated until the order b becomes 0 and the orders a1 and a2 become 0 and 7, respectively, and the state 0 ends.

【0036】以上説明したように、状態0の期間、RA
M63にはデータが3個入力され、入力データが入力し
た順に、順番bが2→1→0の順に指定するアドレスに
書き込まれる。また、RAM64では状態0では書き込
みが行われない。
As described above, during state 0, RA
Three pieces of data are input to M63, and the data is written to the addresses that specify the order b in the order of 2 → 1 → 0 in the order of input data. In the RAM 64, writing is not performed in the state 0.

【0037】RAM63,64のアドレスは、表1の順
番a1,a2,bに示した順、すなわち、b:2→1→
0,a1:7→6→5・・・0(a2:0→1→2・・
・7)の順に読み出される。
The addresses of the RAMs 63 and 64 are in the order shown in the order a1, a2, b in Table 1, that is, b: 2 → 1 →
0, a1: 7 → 6 → 5... 0 (a2: 0 → 1 → 2.
・ Readout in the order of 7).

【0038】上述した結果より、状態0のとき次の表2
の順にアドレスが変化し、図1に示す累積加算器4から
出力データを出力する。
From the above results, the following Table 2 at the time of state 0
, And the output data is output from the accumulator 4 shown in FIG.

【0039】 [0039]

【0040】表2からわかるように、アドレスの変化は
1づつ増加又は減少するので入力データを等間隔で取り
込むことができる。また、最後に読み込むデータは、b
=0,a1=0の場合であり、このとき表1からわかる
ように入力端子(タップ番号0)にデータx(n)が入
力する。すなわち、最後のデータx(n)が入力して、
すぐフィルタ演算結果が得られるという特徴がある。
As can be seen from Table 2, since the change in the address increases or decreases by one, the input data can be taken in at equal intervals. The data to be read last is b
= 0, a1 = 0. At this time, as can be seen from Table 1, data x (n) is input to the input terminal (tap number 0). That is, the last data x (n) is input,
There is a feature that a filter operation result can be obtained immediately.

【0041】上述した理由により、回路遅延が小さくな
り高速のディジタルフィルタを実現することが可能であ
る。
For the above-mentioned reasons, the circuit delay is reduced and a high-speed digital filter can be realized.

【0042】次に、係数が記憶されているROM71を
読み出す際のアドレスについて説明する。
Next, an address for reading the ROM 71 storing the coefficients will be described.

【0043】表1からわかるように、状態0においてb
=0,a1=0のタップ番号は0となる。順番bを0と
したまま、a1が0→1・・・5→6→7と変化する
と、タップ番号は表3のタップ番号1のように変化す
る。ここで、タップ番号1に記憶されているデータx
(n−タップ番号1)とタップ番号2に記憶されている
データx(n−タップ番号2)には等しい係数が乗算さ
れる。ただし、タップ番号2=47−タップ番号1であ
る。
As can be seen from Table 1, in state 0, b
The tap number of = 0, a1 = 0 is 0. If a1 changes from 0 → 1... 5 → 6 → 7 while the order b remains 0, the tap numbers change as tap number 1 in Table 3. Here, data x stored in tap number 1
(N-tap number 1) and data x (n-tap number 2) stored in tap number 2 are multiplied by the same coefficient. However, tap number 2 = 47−tap number 1.

【0044】 [0044]

【0045】従って、ROM71に記憶されている係数
のアドレスは、タップ番号1が0→・・・→17→11
→5→1→・・・→10→4→2→・・・→9→3のよ
うに変化するのに連動し、係数のアドレスにより指定さ
れた係数と各タップに記憶されているデータx(n−
k)を乗算し、図1に示す累積加算器4により累積する
ことにより、入力データを1/3に間引いた状態0にお
ける出力データを得る。
Therefore, the address of the coefficient stored in the ROM 71 is such that the tap number 1 is 0 →... → 17 → 11
→ 5 → 1 → ・ ・ ・ → 10 → 4 → 2 → ・ ・ ・ → 9 → 3 In conjunction with the change, the coefficient specified by the coefficient address and the data x stored in each tap (N-
k), and accumulates by the accumulator 4 shown in FIG. 1 to obtain output data in the state 0 in which the input data is thinned to 1/3.

【0046】次に、表1に示す状態1の動作について説
明する。
Next, the operation in the state 1 shown in Table 1 will be described.

【0047】状態1で行われる演算は、状態0の出力デ
ータの次の状態である状態1の出力データを得るために
行われ、状態0の演算と違う点は、第1にRAM63,
64のアドレスが異なることと、第2に入力データの書
き込み先が状態0ではRAM63だったのに対し、状態
1ではRAM64に書き込むことである。ほかの動作、
すなわちROM71、加算器30、乗算器8、累積加算
器4の動作については状態0の場合と同様である。
The operation performed in the state 1 is performed to obtain the output data in the state 1 which is the next state of the output data in the state 0. The difference from the operation in the state 0 is that the RAM 63,
The second difference is that the write destination of the input data is RAM 63 in state 0, whereas the write destination of the input data is RAM 64 in state 1. Other actions,
That is, the operations of the ROM 71, the adder 30, the multiplier 8, and the accumulator 4 are the same as those in the state 0.

【0048】表1からわかるように、状態1のときのR
AM63,64のアドレス遷移及び入力信号の書き込み
は表4のようになる。
As can be seen from Table 1, R in state 1
Table 4 shows address transitions of the AMs 63 and 64 and writing of input signals.

【0049】 [0049]

【0050】このように、表4の各アドレスの演算をR
AM63,64の各アドレスA63=0,A64=6か
らA63=23,A64=23まで24回繰り返すこと
で、状態1における累積加算器4からの出力データを得
る。
As described above, the operation of each address in Table 4 is performed by R
The output data from the accumulator 4 in the state 1 is obtained by repeating 24 times from each address A63 = 0, A64 = 6 to A63 = 23, A64 = 23 of the AM 63, 64.

【0051】同様な処理を表1に示すように状態15ま
で繰り返し、48個の入力データに対し16個の出力デ
ータを得る。すなわち、状態が偶数のときはRAM63
に入力データを書き込み、状態が奇数のときはRAM6
4に入力データを書き込む。
The same processing is repeated up to state 15 as shown in Table 1, and 16 output data are obtained for 48 input data. That is, when the state is an even number, the RAM 63
Input data to the RAM 6 when the state is odd.
4. Write the input data into 4.

【0052】状態15まで進んだ後、再び状態0に戻り
上述した同様の演算を繰り返すことで、連続した入力デ
ータに対してローパスフィルタの演算処理を行い、1/
3に間引かれた連続した出力データを得ることができ
る。
After proceeding to state 15, the state returns to state 0 again, and the same operation as described above is repeated, thereby performing a low-pass filter operation on continuous input data.
Thus, continuous output data thinned by 3 can be obtained.

【0053】なお、本実施の形態では、1/3に間引く
場合について述べたが、本発明は、1/M(M=2,
3,・・・)に間引くすべてのフィルタについて適用で
き、当然、1/2に間引くハーフバンドフィルタに対し
ても適用可能である。
In this embodiment, the case of thinning out to 1/3 has been described. However, the present invention relates to 1 / M (M = 2,
3,...) Can be applied to all filters thinned out, and of course, it can also be applied to a half band filter thinned out by 2.

【0054】次に、本発明のディジタルフィルタを構成
するアドレス発生器51について、図3に示すブロック
図を参照して説明する。
Next, the address generator 51 constituting the digital filter of the present invention will be described with reference to the block diagram shown in FIG.

【0055】アドレス発生器51は、クロック1によっ
てカウント値を1ずつ増加する3ビットのアップカウン
タ101と、クロック2によってカウント値を1ずつ減
少する3ビットのダウンカウンタ102と、2対1スイ
ッチ103,104と、順番bの値0,1,2を発生す
る順番b発生回路200と、順番a1,a2,bからR
AM63,64のアドレスを生成し、出力端O1からR
AM63のアドレスA63を、出力端O2からRAM6
4のアドレスA64を出力するアドレス演算回路300
とを備えている。
The address generator 51 includes a 3-bit up counter 101 for increasing the count value by one at a clock 1, a 3-bit down counter 102 for decreasing a count value by one at a clock 2, and a two-to-one switch 103. , 104, an order b generating circuit 200 for generating the values 0, 1, 2 of the order b, and R from the orders a1, a2, b.
The addresses of AM63 and 64 are generated, and R is output from the output terminal O1.
The address A63 of the AM63 is transferred from the output terminal O2 to the RAM6.
Address operation circuit 300 that outputs address A64 of address 4
And

【0056】次に、アドレス発生器51の動作について
説明する。
Next, the operation of the address generator 51 will be described.

【0057】表1の状態0において、2対1スイッチ1
03の出力端はダウンカウンタ102と接続し、2対1
スイッチ104の出力端はアップカウンタ101と接続
する。順番b発生回路200が、アドレス演算回路30
0に2を出力している間、アップカウンタ101はスイ
ッチ104を介して、アドレス演算回路300に0から
7までの順番a2の値を出力し、ダウンカウンタ102
はスイッチ103を介して、アドレス演算回路300に
7から0までの順番a1の値を出力する。
In state 0 of Table 1, the 2-to-1 switch 1
03 is connected to the down counter 102, and the output terminal
The output terminal of the switch 104 is connected to the up counter 101. The order b generating circuit 200 is
While outputting 2 to 0, the up counter 101 outputs the value of the order a2 from 0 to 7 to the address arithmetic circuit 300 via the switch 104, and the down counter 102
Outputs the value of the order a1 from 7 to 0 to the address arithmetic circuit 300 via the switch 103.

【0058】アドレス演算回路300は、順番a1a
2,bの値から、RAM63のアドレスA63=a1+
8・bおよびRAM64のアドレスA64=a2+8・
bの値を計算し、それぞれ出力端O1,O2に出力す
る。順番bが1,0の場合についても順番a発生回路は
同様な動作を行い、表1に示す順番a1,a2をアドレ
ス演算回路300に出力する。
The address operation circuit 300 operates in the order a1a
From the values of 2 and b, the address A63 of the RAM 63 = a1 +
8 · b and the address A64 of the RAM 64 = a2 + 8 ·
The value of b is calculated and output to output terminals O1 and O2, respectively. When the order b is 1, 0, the order a generating circuit performs the same operation and outputs the order a1, a2 shown in Table 1 to the address arithmetic circuit 300.

【0059】一方、表1の状態が奇数の場合、スイッチ
103の出力端はアップカウンタ101と接続し、スイ
ッチ104の出力端はダウンカウンタ102と接続する
ことで、順番a1、順番a2は降順となり表1に示す順
番a1,a2を発生することができる。
On the other hand, when the state shown in Table 1 is an odd number, the output terminal of the switch 103 is connected to the up counter 101, and the output terminal of the switch 104 is connected to the down counter 102, so that the order a1 and the order a2 are in descending order. The orders a1 and a2 shown in Table 1 can be generated.

【0060】また、表1からわかるように順番a1,a
2の初期値は各状態(0〜15)によって異なるが、ア
ップカウンタ101の状態が奇数から偶数に切り替わる
ときは、クロック1を供給せずに1回分カウントアップ
しないようにし、ダウンカウンタ102の状態が偶数か
ら奇数に切り替わるときは、クロック2を余分に供給す
ることで1回分余計にカウントダウンさせることで、順
番a1,a2の初期値を変更することができる。
As can be seen from Table 1, the order a1, a
The initial value of 2 differs depending on each state (0 to 15). However, when the state of the up counter 101 is switched from an odd number to an even number, the clock 1 is not supplied to prevent the count up for one time, and the state of the down counter 102 is not changed. When is switched from an even number to an odd number, the initial value of the order a1, a2 can be changed by supplying an extra clock 2 to count down one more time.

【0061】また、アップカウンタ101及びダウンカ
ウンタ102の初期値を変更する方法として、各状態
(0〜15)に応じて初期値がセットされるように、ア
ップカウンタ101及びダウンカウンタ102を構成し
ても良い。さらに、図3においては103,104を2
対1スイッチとして説明したが、マルチプレクサ、セレ
クタなど任意の選択手段を用いることができる。
As a method of changing the initial values of the up counter 101 and the down counter 102, the up counter 101 and the down counter 102 are configured so that the initial value is set according to each state (0 to 15). May be. Further, in FIG.
Although described as a one-to-one switch, any selection means such as a multiplexer and a selector can be used.

【0062】[0062]

【発明の効果】以上説明したように、本発明によるディ
ジタルフィルタは、2個のRAM間のデータ転送が必要
無いため、その分の時間を確保する必要が無くなり、演
算速度を低下することなくフィルタ演算のタップ数を増
やすことができる。また、RAMのアドレスの演算を除
いては、短い周期での繰り返し動作が多く、各回路ブロ
ックの制御が容易である。また、アドレスが単純に昇順
又は降順に変化するので、RAMのアドレス生成を容易
に行うことができる。
As described above, the digital filter according to the present invention does not need to transfer data between the two RAMs, so that it is not necessary to secure the time for the data transfer and the filter can be executed without lowering the operation speed. The number of taps for calculation can be increased. Except for the operation of the RAM address, there are many repetitive operations in a short cycle, and control of each circuit block is easy. Further, since the address simply changes in ascending order or descending order, it is possible to easily generate the RAM address.

【0063】さらに、アドレス構成を簡素化したにもか
かわらず、回路遅延は1乗算分であり、回路規模を最小
に構成することができるだけでなく、ディジタルフィル
タの演算速度を高速化することができる。
Further, despite the simplification of the address configuration, the circuit delay is one multiplication, so that not only the circuit scale can be minimized, but also the operation speed of the digital filter can be increased. .

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

【図1】本発明のディジタルフィルタの実施の形態を示
すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a digital filter according to the present invention.

【図2】図1に示すディジタルフィルタの入力データの
構造を表す説明図である。
FIG. 2 is an explanatory diagram showing a structure of input data of the digital filter shown in FIG.

【図3】本発明のディジタルフィルタを構成するアドレ
ス発生器を示すブロック図である。
FIG. 3 is a block diagram showing an address generator constituting the digital filter of the present invention.

【図4】完全直線位相FIRフィルタの第1の従来例を
示すブロックである。
FIG. 4 is a block diagram showing a first conventional example of a perfect linear phase FIR filter.

【図5】完全直線位相FIRフィルタの第2の従来例を
示すブロックである。
FIG. 5 is a block diagram showing a second conventional example of a perfect linear phase FIR filter.

【図6】図5に示す従来の完全直線位相FIRフィルタ
において、データ遅延にシフトレジスタを用いて表した
ブロック図である。
6 is a block diagram showing a data delay using a shift register in the conventional perfect linear phase FIR filter shown in FIG. 5;

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

1 入力データ 2 遅延回路 3,30,31,32 加算器 4 累積加算器 5,51 アドレス発生器 61,62,63,64 RAM 7,71 ROM 8,81,82,10〜10(N−1) 乗算器 9,20 レジスタ 100 順番a発生回路 101 アップカウンタ 102 ダウンカウンタ 103,104 スイッチ 200 順番b発生回路 300 アドレス演算回路 Reference Signs List 1 input data 2 delay circuit 3, 30, 31, 32 adder 4 cumulative adder 5, 51 address generator 61, 62, 63, 64 RAM 7, 71 ROM 8, 81, 82, 10 to 10 (N-1 ) Multiplier 9,20 Register 100 Order a generator 101 Up counter 102 Down counter 103,104 Switch 200 Order b generator 300 Address operation circuit

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 入力データを記憶する第1及び第2のデ
ータメモリと、 ディジタルフィルタの係数値を発生する係数発生器と、 前記第1及び前記第2のデータメモリと前記係数発生器
のアドレス信号を発生するアドレス発生器と、 前記第1のデータメモリと前記第2のデータメモリに記
憶されている各データを加算する加算器と、 前記加算器の出力と前記係数発生器の出力とを乗算する
乗算器と、 前記乗算器の乗算結果を累積加算する累積加算器とを備
え、入力データを1/N(N=2,3,・・・)に間引
くディジタルフィルタにおいて、 前記アドレス発生器は、前記第1及び第2のデータメモ
リに対し、入力データをN個のデータからなるブロック
に分けて前記第1及び第2のデータメモリに交互に書き
込むように前記アドレス信号を発生することを特徴とす
るディジタルフィルタ。
A first data memory for storing input data; a coefficient generator for generating a coefficient value of a digital filter; an address of the first and second data memories and an address of the coefficient generator An address generator for generating a signal; an adder for adding each data stored in the first data memory and the second data memory; and an output of the adder and an output of the coefficient generator. A digital filter, comprising: a multiplier for multiplying; and a cumulative adder for cumulatively adding the multiplication result of the multiplier, wherein the digital filter thins out input data to 1 / N (N = 2, 3,...). Transmits the address signal to the first and second data memories such that input data is divided into blocks of N data and written alternately to the first and second data memories. A digital filter characterized by generating.
【請求項2】 前記ブロックの順番を表すブロック番号
が第1の番号及び第2の番号により決定され、前記第1
及び第2のデータメモリの前記アドレス信号は、前記ア
ドレス発生器により、前記第1及び第2の番号と、前記
ブロック内のデータの順番を表す第3の番号に基づき生
成されることを特徴とする請求項1記載のディジタルフ
ィルタ。
2. A block number representing an order of the blocks is determined by a first number and a second number.
And the address signal of the second data memory is generated by the address generator based on the first and second numbers and a third number representing the order of data in the block. The digital filter according to claim 1, wherein
【請求項3】 前記第1のデータメモリのアドレス信号
は、前記第1の番号+(2のN乗)×(前記第3の番
号)により生成され、前記第2のデータメモリのアドレ
ス信号は、前記第2の番号+(2のN乗)×(前記第3
の番号)により生成されることを特徴とする請求項2記
載のディジタルフィルタ。
3. The address signal of the first data memory is generated by the first number + (2N) × (the third number), and the address signal of the second data memory is , The second number + (2 N) × (the third number
3. The digital filter according to claim 2, wherein the digital filter is generated by the following.
【請求項4】 前記アドレス発生器は、前記第1及び第
2の番号を発生する順番1発生回路と、 前記第3の番号を発生する順番2発生回路とを備え、 前記順番1発生回路は、第1の入力端がアップカウンタ
の出力端に接続し出力端が前記第1及び第2のデータメ
モリのアドレス信号を発生するアドレス演算回路の第1
の入力端に接続する第1の選択手段と、 第1の入力端がダウンカウンタの出力端に接続し出力端
が前記アドレス演算回路の第2の入力端に接続する第2
の選択手段とを備え、 前記順番2発生回路の出力は、前記アドレス演算回路の
第3の入力端に接続し、前記アップカウンタの出力端
は、前記第2の選択手段の第2の入力端に接続し、前記
ダウンカウンタの出力端は、前記第1の選択手段の第2
の入力端に接続し、前記アップカウンタ又は前記ダウン
カウンタの動作が一巡するごとに、前記各選択手段の第
1の入力端又は前記各選択手段の第2の入力端に入力す
る信号を、前記第1の選択手段の出力端及び前記第2の
選択手段の出力端に交互に切り替えて出力することを特
徴とする請求項2記載のディジタルフィルタ。
4. The address generator includes a sequence 1 generation circuit that generates the first and second numbers, and a sequence 2 generation circuit that generates the third number, wherein the sequence 1 generation circuit is , A first input terminal connected to an output terminal of the up counter, and an output terminal of the first address calculation circuit for generating an address signal of the first and second data memories.
A first selecting means connected to the input terminal of the down counter; a second input terminal connected to the output terminal of the down counter; and an output terminal connected to the second input terminal of the address arithmetic circuit.
And an output terminal of the up-counter is connected to a third input terminal of the address operation circuit, and an output terminal of the up-counter is connected to a second input terminal of the second selection device. And the output terminal of the down counter is connected to a second terminal of the first selecting means.
A signal input to the first input terminal of each of the selection means or the second input terminal of each of the selection means each time the operation of the up counter or the down counter makes one cycle. 3. The digital filter according to claim 2, wherein the output is alternately switched to an output terminal of the first selection unit and an output terminal of the second selection unit.
【請求項5】 前記アップカウンタに入力するクロック
を一時停止し、前記アップカウンタの初期値を変更する
ことを特徴とする請求項4記載のディジタルフィルタ。
5. The digital filter according to claim 4, wherein a clock input to said up counter is temporarily stopped to change an initial value of said up counter.
【請求項6】 前記ダウンカウンタに入力するクロック
を一時余分に供給し、前記ダウンカウンタの初期値を変
更することを特徴とする請求項4記載のディジタルフィ
ルタ。
6. The digital filter according to claim 4, wherein an extra clock supplied to said down counter is temporarily supplied to change an initial value of said down counter.
【請求項7】 前記アップカウンタ及び前記ダウンカウ
ンタは、前記第1及び前記第2の番号と前記第3の番号
により、前記第1及び前記第2の番号と前記第3の番号
により定まる初期値にセットされることを特徴とする請
求項4記載のディジタルフィルタ。
7. The up counter and the down counter each have an initial value determined by the first and second numbers and the third number, and by the first and second numbers and the third number. 5. The digital filter according to claim 4, wherein:
JP09131092A 1997-05-21 1997-05-21 Digital filter Expired - Fee Related JP3097599B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP09131092A JP3097599B2 (en) 1997-05-21 1997-05-21 Digital filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP09131092A JP3097599B2 (en) 1997-05-21 1997-05-21 Digital filter

Publications (2)

Publication Number Publication Date
JPH10322164A true JPH10322164A (en) 1998-12-04
JP3097599B2 JP3097599B2 (en) 2000-10-10

Family

ID=15049797

Family Applications (1)

Application Number Title Priority Date Filing Date
JP09131092A Expired - Fee Related JP3097599B2 (en) 1997-05-21 1997-05-21 Digital filter

Country Status (1)

Country Link
JP (1) JP3097599B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958697A (en) * 2010-09-30 2011-01-26 电子科技大学 Realization method and device of multiphase filter structure
CN110212889A (en) * 2019-05-29 2019-09-06 北京机电工程研究所 A kind of digital signal samples device and method
CN116599496A (en) * 2023-07-17 2023-08-15 上海芯炽科技集团有限公司 Circuit structure of half-band FIR filter

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958697A (en) * 2010-09-30 2011-01-26 电子科技大学 Realization method and device of multiphase filter structure
CN110212889A (en) * 2019-05-29 2019-09-06 北京机电工程研究所 A kind of digital signal samples device and method
CN110212889B (en) * 2019-05-29 2020-11-13 北京机电工程研究所 Digital signal sampling device and method
CN116599496A (en) * 2023-07-17 2023-08-15 上海芯炽科技集团有限公司 Circuit structure of half-band FIR filter

Also Published As

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

Similar Documents

Publication Publication Date Title
US20050262176A1 (en) Polyphase filter with optimized silicon area
JP2008124593A (en) Decimation filter
JPH07112144B2 (en) Digital filter
JPH05235699A (en) Sampling frequency converter
JP2001188600A5 (en)
JPH082014B2 (en) Multi-stage digital filter
JP3097599B2 (en) Digital filter
JPH04323910A (en) A/d converter and d/a converter
JPH1155076A (en) Sampling frequency converting device
JPH0834407B2 (en) Input weighted transversal filter
JP2733403B2 (en) Digital filter for decimation
JPH0998069A (en) Fir type digital filter
JPH0590897A (en) Oversampling filter circuit
JP3243831B2 (en) FIR type filter
JP3258938B2 (en) Decimation filter
JP3197648B2 (en) Digital filter
JPH0884048A (en) Sampling rate converter
JP2628506B2 (en) Digital filter
JP2012085177A (en) Decimator circuit, and operation method for decimator circuit
JP3172046B2 (en) Sampling rate converter
RU2097828C1 (en) Programmable digital filter
JP3362796B2 (en) Music generator
JPH09298451A (en) Digital filter circuit and its control method
JP2001177378A (en) Fir digital filter
JP2540757B2 (en) Digital filter circuit for decimation

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: 20000711

LAPS Cancellation because of no payment of annual fees