JP2004289417A - Digital filter - Google Patents

Digital filter Download PDF

Info

Publication number
JP2004289417A
JP2004289417A JP2003078027A JP2003078027A JP2004289417A JP 2004289417 A JP2004289417 A JP 2004289417A JP 2003078027 A JP2003078027 A JP 2003078027A JP 2003078027 A JP2003078027 A JP 2003078027A JP 2004289417 A JP2004289417 A JP 2004289417A
Authority
JP
Japan
Prior art keywords
data
value
coefficient
addition
sum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003078027A
Other languages
Japanese (ja)
Inventor
Tetsuminoru Kuno
哲稔 久野
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003078027A priority Critical patent/JP2004289417A/en
Publication of JP2004289417A publication Critical patent/JP2004289417A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a digital filter capable of considerably reducing the circuit scale and obtaining the output data with high accuracy. <P>SOLUTION: The digital filter is provided with: switches 111 to 11n that select a value twice the filter coefficients of coefficient registers 211 to 21n when the delay data have a one-value or select a value zero when the delay data are another value and provides the output of the selected value on the basis of delay data in each stage of a shift register 10 which receives the input data expressed in a binary value; an adder circuit 12 for summing the data selected by the switches 111 to 11n; a total sum register 20 for storing the total sum of the filter coefficients; and a subtractor 22 for subtracting the total data SKn of the total sum register 20 from the summated data AD received from the adder circuit 12. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、複数のタップに所定のフィルタ係数が設定された非巡回形のデジタルフィルタに関し、特に、所定のビット数より低いビット数で量子化されたデジタル信号を入力し、所定のビット数のデジタル信号に変換するデジタルフィルタの回路構成の改良に関する。
【0002】
【従来の技術】
近年、デジタル技術の進展により、音声や映像の記録方式はデジタル記録が主流になってきている。音声信号を対象としたデジタル処理方式の一つとして、オーバサンプリング方式やデルタシグマ方式と呼ばれる手法が提案され、実用化されている。これらの手法は、アナログ信号をデジタル信号に変換するAD(Analog Digital)変換の一手法である。これらの手法では、アナログ音声信号を、所定の標本化周波数より高い周波数で標本化し、また所定のビット数より低いビット数で量子化を行ないデジタル信号に変換する。次に、このデジタル信号をデジタルフィルタで構成されるローパスフィルタで帯域制限を行ない、デシメーション(Decimation、間引き)処理により所定の標本化周波数で、所定の量子化ビット数のデジタル信号に変換する。具体的には、標本化周波数48KHz、量子化ビット数16ビットの所定のデジタル信号を得る場合、例えば、48KHzの10倍近い標本化周波数で標本化し、1ビットの量子化でAD変換を行なう。このようなAD変換により得られたデジタル信号に対して、デジタルローパスフィルタは、帯域制限することで低いサンプリングレートに対応させるとともに、デジタルフィルタ演算によりビット数を増加させ、標本化周波数が48KHz、量子化ビット数が16ビットのデジタル信号を得ることが可能となる。
【0003】
また、これらの手法のように信号帯域と比較して高い周波数で標本化、および低ビット数で量子化されたデジタル信号を光ディスク等に記録した次世代のCD等も、例えばスーパーオーディオCDなどと呼ばれて提案されている。
【0004】
オーバサンプリング方式やデルタシグマ方式と呼ばれる手法においては、上述したようにデジタルフィルタで構成されるローパスフィルタが、音質等を決める上で重要となる。このため、通常、このようなデジタルローパスフィルタは、直線位相特性を有する非巡回形のFIR形デジタルフィルタで構成される。また、理想的な周波数特性を有するフィルタを実現するため、多段数のタップを有し、各タップには所定の重み付けを行なうフィルタ係数が設定された、トランスバーサル形フィルタが利用される。すなわち、理想的な周波数特性を有するFIR形デジタルフィルタを実現するには、タップ数を増すことが必要であり、タップ数を増加させるとフィルタ係数との演算が増える。その結果、この演算のための掛算器の個数が増え、加算器や遅延回路も含めて回路規模が増大するという課題があった。
【0005】
このような課題に対処するため、回路規模の削減を図りつつ所望の特性を得るような、デジタルフィルタの回路構成の改良に関する手法が提案されている(例えば、特許文献1参照)。
【0006】
図9は、従来例におけるデジタルフィルタの構成を示すブロック図である。
【0007】
図9において、1ビットで量子化された入力データは、クロックに同期してシフトレジスタ10でn段シフトされる。シフトレジスタ10の各段から出力される遅延データD1〜Dnは、それぞれスイッチ111〜11nに供給される。遅延データD1〜Dnは、それぞれスイッチ111〜11nの切り換え制御信号として利用される。スイッチ111〜11nは、シフトレジスタ10からの遅延データの値が「0」のとき、ゼロのデータを選択し、シフトレジスタ10からの遅延データの値が「+1」のとき、係数レジスタ191〜19nに記憶したそれぞれの係数データK1〜Knを選択する。係数データK1〜Knは、hビット幅であり、各フィルタ係数に相当する係数値「k1」〜「kn」を表わす。すなわち、スイッチ111〜11nは、各段からの遅延データD1〜Dnと係数データK1〜Knとの掛け算を実行することと等価である。スイッチ111〜11nの出力は、加算回路12において加算され、mビットの出力データとして出力される。
【0008】
一般にFIR形デジタルフィルタは、シフトレジスタ等により入力データのビット幅に対応した複数段の遅延回路を設け、さらに各遅延からの遅延データと複数ビット幅の係数データとの掛け算を必要とする。このとき、遅延段数、すなわちタップ数が多いと、掛け算を行なうための掛算器が増加し、回路規模も非常に大きくなる。これに対し、上述した従来例では、遅延回路に1ビット幅のシフトレジスタを用い、さらに掛算器として、スイッチあるいはそれと等価な回路を利用できるので、全体として大幅に回路規模を削減でき、LSIに適したデジタルフィルタを実現できる。
【0009】
【特許文献1】
特開平2−186710号公報
【0010】
【発明が解決しようとする課題】
しかしながら、従来例のようなデジタルフィルタは、1ビットの入力データ、すなわちデータの値が「+1」と「0」との2値に対する処理を行なっており、「正値」と「負値」とからなる2値に対する処理を行なっていない。このために、フィルタの出力データには正方向のオフセット成分が重畳され、このオフセット成分により正確な値を有する出力データが得られないという課題があった。特に、このオフセット成分は、設定するフィルタ係数により変化するため、フィルタ特性によっては、このオフセット成分が直流ノイズ成分となり、音声デジタル信号を扱うような場合、音質劣化を招くおそれがあった。
【0011】
一方、「正値」と「負値」との2値からなる入力データに対してFIR形デジタルフィルタを構成する場合、データ自体の表現や負値に対する処理のため回路規模が増加するという課題があった。すなわち、入力データを「正値」と「負値」として構成する場合、一般的に利用される2の補数表示を用い、例えば「+1」と「−1」の2値とすると、「正値」は「01」、「負値」は「11」の表記となり、2ビット必要となる。さらに、2の補数表示による負値を扱う演算処理の場合、負値を正値に変換するための反転回路および「+1」の加算回路が必要となることがある。このように、負値を扱う構成とした場合、オフセット成分による影響はなくなるが、回路規模の増加を招くおそれがあった。
【0012】
本発明は、デジタルフィルタを構成する回路規模の増加を抑制するとともに、精度よい出力データを得ることができるデジタルフィルタを提供することを目的とする。
【0013】
【課題を解決するための手段】
上記課題を解決するため、本発明のデジタルフィルタは、2値で表現される入力データを複数段シフトしながら記憶するシフトレジスタと、複数個のフィルタ係数を記憶する複数個の係数レジスタと、シフトレジスタの各段における遅延データに基づき、この遅延データが一方の値のときには、その段に対応する係数レジスタのフィルタ係数の値を選択し、この遅延データが他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、複数個の選択回路からの各選択データを加算し、加算結果を加算データとして出力する加算回路と、複数個の上記係数レジスタに記憶した各フィルタ係数の総和の2分の1の値を総和データとして記憶する総和レジスタと、上記加算データから上記総和データを減算し、減算結果を出力データとして出力する減算器とを備えた構成である。
【0014】
このような構成により、各段の遅延データに対応してフィルタ係数あるいはゼロを選択する選択回路は、掛算器と等価な機能であり回路規模の削減を実現している。また、加算回路からの加算データより、総和レジスタに記憶した各フィルタ係数の総和の2分の1の値を減算することにより、出力データに重畳されるオフセット成分を除去している。これにより、デジタルフィルタを構成する回路規模の増加を抑制するとともに、精度よい出力データを得ることができるデジタルフィルタの実現を可能としている。
【0015】
さらに、本発明のデジタルフィルタは、入力データを入力する入力端子と、複数個のフィルタ係数を入力する係数入力端子と、入力端子に供給された1ビットで表現される入力データを、複数段シフトしながら記憶するシフトレジスタと、係数入力端子に供給された複数個のフィルタ係数を、それぞれに記憶する複数個の係数レジスタと、シフトレジスタの各段における遅延データに基づき、遅延データが一方の値のときにはその段に対応する係数レジスタのフィルタ係数の値を選択し、遅延データが他方の値のときにはゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、複数個の選択回路からの各選択データを加算し、加算結果に対応した値を加算データとして出力する加算回路と、係数入力端子に供給された複数個のフィルタ係数を、複数個分だけ累積加算し、累積加算した結果に対応した値を総和データとして出力するアキュムレータと、上記加算データから上記総和データを減算し、減算結果を出力データとして出力する減算器と、出力データを出力する出力端子とを備えた構成である。
【0016】
このような構成により、各フィルタ係数が、所定の係数レジスタに設定されるのと並行して、各フィルタ係数は、アキュムレータにより順次累積加算されて総和データが得られるため、フィルタ係数を変更する毎に、別途に総和データを演算する必要がなく、この演算のための処理が削減できる。よって、任意のフィルタ特性が設定可能なデジタルフィルタが実現できるとともに、デジタルフィルタを構成する回路規模の増加を抑制でき、精度よい出力データを得ることができるデジタルフィルタの実現を可能としている。
【0017】
また、本発明のデジタルフィルタは、入力データを入力する入力端子と、複数個のフィルタ係数を入力する係数入力端子と、入力端子に供給された1ビットで表現される入力データを、複数段シフトしながら記憶するシフトレジスタと、係数入力端子に供給された複数個のフィルタ係数を、それぞれに記憶する複数個の係数レジスタと、シフトレジスタの各段における遅延データに基づき、遅延データが一方の値のときにはその段に対応する係数レジスタのフィルタ係数の値を選択し、遅延データが他方の値のときにはゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、複数個の選択回路からの各選択データを加算し、加算結果に対応した値を加算データとして出力する加算回路と、加算回路からの加算データを、所定のタイミングで取り込み、記憶し、取り込んだ加算データに対応した値を総和データとして出力する総和レジスタと、上記加算データから上記総和データを減算し、減算結果を出力データとして出力する減算器と、出力データを出力する出力端子とを備える。さらに、上記シフトレジスタは、セット指令信号が入力されることにより、遅延データを出力するすべての段から、上記一方の値を出力するセット入力を有し、上記総和レジスタは、シフトレジスタのセット入力にセット指令信号が入力されるタイミングに応じて、加算データを取り込む構成である。
【0018】
このような構成により、各フィルタ係数が、所定の係数レジスタに設定されるとともに、セット指令信号が入力されるタイミングに応じて、加算回路からすべてのフィルタ係数を加算した値が出力される。総和レジスタは、このすべてのフィルタ係数を加算した値を取り込むことにより総和データが記憶されるため、フィルタ係数を変更する毎に、別途に総和データを演算する必要がなく、この演算のための処理が削減できる。よって、任意のフィルタ特性が設定可能なデジタルフィルタが実現できるとともに、デジタルフィルタを構成する回路規模の増加を抑制でき、精度よい出力データを得ることができるデジタルフィルタの実現を可能としている。
【0019】
また、本発明のデジタルフィルタは、入力データを入力する入力端子と、複数個のフィルタ係数を入力する係数入力端子と、入力端子に供給された1ビットで表現される、一方、または他方の値を有した入力データを、複数段シフトしながら記憶するシフトレジスタと、選択制御のための第1の選択制御信号を入力し、第1の選択制御信号に基づき、第1の選択制御信号が無効のときには、その段に対応するシフトレジスタの遅延データの値を選択し、第1の選択制御信号が有効のときには、上記一方の値を選択し、それぞれに選択した値を第2の選択制御信号として出力する複数個の第1の選択回路と、係数入力端子に供給された複数個のフィルタ係数を、それぞれに記憶する複数個の係数レジスタと、第2の選択制御信号に基づき、第2の選択制御信号が一方の値のときにはその段に対応する係数レジスタのフィルタ係数の値を選択し、第2の選択制御信号が他方の値のときにはゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の第2の選択回路と、複数個の第2の選択回路からの各選択データを加算し、加算結果に対応した値を加算データとして出力する加算回路と、加算回路からの加算データを、所定のタイミングで取り込み、記憶し、取り込んだ加算データに対応した値を総和データとして出力する総和レジスタと、上記加算データから上記総和データを減算し、減算結果を出力データとして出力する減算器と、出力データを出力する出力端子とを備える。さらに、総和レジスタは、第1の選択制御信号が有効とされるタイミングに応じて加算データを取り込む構成である。
【0020】
このような構成により、各フィルタ係数が、所定の係数レジスタに設定されるとともに、第1の選択制御信号が有効とされるタイミングに応じて、加算回路からすべてのフィルタ係数を加算した値が出力される。総和レジスタは、このすべてのフィルタ係数を加算した値を取り込むことにより総和データが記憶されるため、フィルタ係数を変更する毎に、別途に総和データを演算する必要がなく、この演算のための処理が削減できる。よって、任意のフィルタ特性が設定可能なデジタルフィルタが実現できるとともに、デジタルフィルタを構成する回路規模の増加を抑制でき、精度よい出力データを得ることができるデジタルフィルタの実現を可能としている。
【0021】
【発明の実施の形態】
以下、本発明の実施の形態について図面を用いて説明する。
【0022】
(実施の形態1)
図1は、本発明の実施の形態1におけるデジタルフィルタの構成の一例を示すブロック図である。本デジタルフィルタは、2値の入力データを複数段にわたり遅延させた遅延データに対して重み付け加算を施すことでフィルタ演算を行ない、フィルタ演算により帯域制限された複数ビット幅の出力データを出力するデジタルフィルタである。また、重み付け加算により得たデータに対して、重畳された直流成分を除去するオフセット補正部を備えたことを特徴とする。
【0023】
図1において、2値の入力データは、1ビット幅のデータとして入力端子30に供給される。本実施の形態1においては、2値は「1」と「0」とであり、2値のうちの一方を「1」、他方を「0」として説明する(以下、データが有する数値については括弧「 」を用いて示す)。入力端子30に供給された入力データは、シフトレジスタ10に供給され、クロック端子32に供給されたクロックに従って、サンプル、およびシフトされる。シフトレジスタ10は、n(nは2以上の整数)段、すなわちn個のタップで構成されており、各段から出力される遅延データD1〜Dnは、それぞれ、選択回路としてのスイッチ111〜11nに供給される。遅延データD1〜Dnは、それぞれのスイッチ111〜11nに対して、切り換え制御信号として動作する。スイッチ111〜11nは、シフトレジスタ10からの遅延データの値が「0」の場合はゼロの値であるデータを選択し、また、シフトレジスタ10からの遅延データの値が「1」の場合は、係数レジスタ211〜21nにあらかじめ記憶したデータを選択し、選択したデータを選択データとし出力する。ここでは、スイッチ111〜11nは等価的に重み付けを行なう掛算器として機能する。係数レジスタ211〜21nは、本デジタルフィルタにおける所定のフィルタ係数k1〜knに対応した係数値をあらかじめ記憶したレジスタである。フィルタ係数k1〜knは、本デジタルフィルタの伝達特性を決めるフィルタ係数であり、このフィルタ係数k1〜knを所定の値にそれぞれ設定することにより本デジタルフィルタの周波数特性も決定される。図1に示す構成では、所定のフィルタ係数k1〜knに対して、フィルタ係数の2倍に相当する係数値「2xk1」〜「2xkn」が所定の係数データK1〜Knとして、それぞれ係数レジスタ211〜21nに記憶される。また、係数レジスタ211〜21nに記憶された所定の係数値「2xk1」〜「2xkn」は、それぞれh(hは2以上の整数)ビット幅の係数データK1〜Knとして出力される。スイッチ111〜11nは、遅延データD1〜Dnに基づき選択したゼロ、あるいは係数データを、加算回路12に供給する。加算回路12は、各スイッチ111〜11nから供給された各選択データをすべて加算し、加算結果をmビット幅の加算データADとして出力する。以上、シフトレジスタ10、スイッチ111〜11n、係数レジスタ211〜21n、および加算回路12により、FIR形デジタルフィルタ部100が構成される。
【0024】
総和レジスタ20は、フィルタ係数k1〜knの総和に相当するデータを、あらかじめ記憶したレジスタである。すなわち、総和レジスタ20には、各フィルタ係数k1〜knの総和(k1+k2+k3+・・・+kn)に相当する係数総和値「Σkn」が総和データSKnとして記憶され、総和レジスタ20からこの総和データSKnが出力される。減算器22は、加算回路12からの加算データADより総和レジスタ20からの総和データSKnを減算する減算器である。減算器22により減算された減算結果は、出力端子31に供給される。出力端子31からは、本デジタルフィルタの出力データとして、pビット幅のデータが出力される。以上、総和レジスタ20、および減算器22により、オフセット補正部200が構成される。
【0025】
以上のように構成された本実施の形態1におけるデジタルフィルタの動作について、以下、より具体的な例を示して説明する。ここでは、具体的な一例として、シフトレジスタ10の段数として、n=4、すなわち4段の場合を例に挙げて説明する。
【0026】
例えば、各遅延データにおいて、D1=「1」、D2=「0」、D3=「1」、D4=「0」の場合、スイッチ111は遅延データD1が「1」であることより係数値が「2xk1」である係数データK1を選択し、スイッチ112は遅延データD2が「0」であることよりゼロを選択し、スイッチ113は遅延データD3が「1」であることより係数値が「2xk3」である係数データK3を選択し、スイッチ114は遅延データD4が「0」であることよりゼロを選択する。これより、加算回路12は、係数レジスタ211の係数値「2xk1」、および係数レジスタ213の係数値「2xk3」の加算と同等の演算を行なう。加算回路12は、係数値「2xk1」と係数値「2xk3」とを加算した値「2x(k1+k3)」を加算データADとして出力する。一方、総和レジスタ20には、あらかじめ各フィルタ係数k1〜k4の総和(k1+k2+k3+k4)に相当する係数総和値「ΣKn」、すなわち「k1+k2+k3+k4」が設定されている。よって、減算器22により、値「2x(k1+k3)」を有する加算データADから、値「k1+k2+k3+k4」を有する総和データSKnが減算される。すなわち、このとき、本デジタルフィルタは「{2x(k1+k3)―(k1+k2+k3+k4)}」なる値を有する出力データを出力する。
【0027】
なお、本発明のデジタルフィルタのように、入力データは1ビットであっても、それぞれの係数データK1〜Knとしては、例えばhビットとして示したように高ビット幅のデータであり、出力データとしても例えばpビットとして示したように高ビット幅の出力データとすることができる。すなわち、低ビット幅であるが高いサンプリングレートで入力された入力データに対して、本デジタルフィルタでは、フィルタ演算により帯域制限することで低いサンプリングレートに対応できるように変換し、帯域制限された分、ビット幅に関しては高ビット幅へとトレードオフされたと言える。このような原理を利用し、例えば、サンプリングレート3.072MHzの1ビットの入力音声データから、サンプリングレートが64分の1である、サンプリングレート48KHzの16ビットのPCM(Pulse Code Modulation)音声データへの変換に利用される。
【0028】
以上、本実施の形態1のデジタルフィルタの構成、および動作について説明したが、本発明のデジタルフィルタは、次に説明するフィルタ演算式の変形に基づき構成している。以下、フィルタ演算式の変形に従い、本発明のデジタルフィルタの動作原理について説明する。
【0029】
一般に、フィルタ係数kr(rは、1〜n)を用いた重み付け加算によるFIR形デジタルフィルタのフィルタ演算式は、各遅延されたデータをdr(rは、1〜n)とし、その出力をYとすると、次の式1で示される。
【0030】
Y=Σ{drxkr} ・・・・・式1
なお、記号Σは、rが1からn(nは2以上の整数)までそれぞれ括弧内の演算を行ない、その総和をとることを示す。すなわち、式1の右辺は、{(d1xk1)+(d2xk2)+・・・+(dnxkn)}の演算を行なうことを示す。
【0031】
式1は、次のように変形できる。
【0032】
Y=Σ{(dr+1−1)xkr} ・・・・・式2
さらに、式2は、次のように変形できる。
【0033】
Y=Σ{(dr+1)xkr}−Σ{kr} ・・・・・式3
ここで、各遅延されたデータdrが、2値の値として「−1」、または「+1」をとると仮定する。すると、式3における(dr+1)は、2値の値として「0」、または「2」をとる。言い換えれば、各遅延データD1〜Dnの値「0」、または「1」に応じて、フィルタ係数の0倍の値ゼロ、あるいは2倍の値「2xkr」を加算し、式3の演算を実施すれば、式1で示すFIR形デジタルフィルタと等価の構成が実現できる。すなわち、式3は、さらに、次の式4に変形できる。
【0034】
Y=Σ{(2xkr)xDr}−Σ{kr} ・・・・・式4
さらに、式4は、次のように変形できる。
【0035】
Y=Σ{(2xDr−1)xkr} ・・・・・式5
式4は、図1で示した本実施の形態1のデジタルフィルタの構成を示す式であり、式1で示したFIR形デジタルフィルタの演算式と等価である。また、式1と式5との比較より、dr=2xDr−1であり、Drの値は「0」あるいは「1」であるから、drは、「−1」あるいは「+1」である。
【0036】
換言すると、本実施の形態1の構成によるデジタルフィルタは、シフトレジスタへの入力データを負値「−1」、および正値「+1」からなる2値データとし、式1で表現されるフィルタ演算を行なうデジタルフィルタの構成と等価である。よって、本発明によれば、簡単な構成で、2値「−1」、および「+1」を入力とするFIR形デジタルフィルタと等価なデジタルフィルタが構成できる。すなわち、2値「−1」、「+1」を2の補数による2進数で表現する場合、通常は2ビット幅必要であるが、本発明によれば、1ビット幅の入力データで同等のデジタルフィルタが実現できる。
【0037】
一方、上述したように、1ビットの入力データとして、そのままの値「0」、および「1」としてローパスフィルタ特性のフィルタ演算処理を行なうと、出力データにはオフセット成分の影響が現れる。すなわち、入力データは、負値を有しないため、正方向に直流成分としてのオフセット成分を有しており、このオフセット成分がローパスフィルタ特性のフィルタを通過し、その結果、出力データにもこのオフセット成分の影響が現れる。これに対して、本発明のデジタルフィルタでは、まず、FIR形デジタルフィルタ部100において従来と同等のフィルタ処理を行ない、さらに、オフセット補正部200においてこのオフセット成分を除去する構成としているため、オフセット成分の影響を抑制した、精度よい出力データを得ることができる。
【0038】
以上、本発明のデジタルフィルタは、このような動作原理に基づき構成されているため、回路規模の増加を抑制するとともに、オフセット成分の影響がなく、精度よい出力データを得ることができる。
【0039】
なお、図1を用いて説明した本実施の形態1の構成例では、係数レジスタ211〜21nに各フィルタ係数の2倍に相当する係数値を記憶した例を示して説明したが、他の構成により実現することも可能である。例えば、係数レジスタ211〜21nには各フィルタ係数に相当する係数値を記憶し、スイッチ111〜11nの係数データ入力において、上位ビット方向に1ビット分ビットシフトしたり、あるいは、加算回路12からの加算データADにおいて上位ビット方向に1ビット分ビットシフトしたりすることで、各フィルタ係数の2倍に相当するデータを実現してもよい。
【0040】
図2は、このような一例として、図1で説明した構成の変形例を示したブロック図である。図2では、係数レジスタ211〜21nには各フィルタ係数k1〜knに相当する各係数値「k1」〜「kn」を有した係数データK1〜Knを記憶し、加算回路12からの加算データADに、定数「2」を掛け算する掛算器23を設けた構成としている。すなわち、図1の構成における各フィルタ係数の2倍に相当する係数値「2xk1」〜「2xkn」を選択し加算する処理は、図2の構成のように各フィルタ係数に相当する係数値「k1」〜「kn」を選択し加算した後、加算データの2倍である掛算データとして出力する処理でも同一の結果が得られる。よって、図2の構成であっても、図1と構成は異なるが同一の出力結果が得られる。なお、図2では、掛算器23により2倍する構成を示しているが、加算回路12からの加算データADを上位ビット方向に1ビット分ビットシフトし、最下位ビットであるLSBには論理値「0」を設定することで、容易に2倍の演算を実現できる。
【0041】
また、上述した式2、式3において、「1」を2分の1である「(1/2)」に置換え、その式に基づく構成を実現することも可能である。式2、および式3を、次の式2’、および式3’のように置換える。
【0042】
Y=Σ{(dr+(1/2)−(1/2))xkr} ・・・・・式2’
Y=Σ{(dr+(1/2))xkr}−Σ{(1/2)xkr} ・・・式3’
ここで、各遅延されたデータdrが、2値の値として「−(1/2)」、または「+(1/2)」をとると仮定しても、式1と等価である。すなわち、係数レジスタ211〜21nには、フィルタ係数k1〜knに相当する係数値「k1」〜「kn」を有する係数データK1〜Knを格納し、総和レジスタ20には、各フィルタ係数k1〜knの総和に相当する係数総和値「Σkn」の2分の1の値を有する総和データSKnを格納するような構成であってもよい。
【0043】
言い換えれば、総和レジスタ20に記憶する総和データSKnは、係数レジスタ211〜21nに記憶した各係数データK1〜Knの総和の2分の1である、という関係があればよい。すなわち、SKn=(1/2)x(K1+K2+・・・+Kn)の関係を満たす総和データSKnを総和レジスタ20に格納すればよい。
【0044】
さらに、通常、加算回路12内部に複数設けられた加算器の出力において、下位ビットを切り捨て、あるいは丸めることでビット幅を減らし、回路規模を節約することが行なわれる。この場合、例えば、下位ビットをaビット分切り捨て、あるいは丸めることで、データ値としては2のa乗で割り算されたと、表現されることがある。例えば、ビット幅が8ビットのデータバス上でのデータ値「64」に対し、このデータバスの下位2ビットを切り捨てた場合、切り捨て後の上記データ値は「16」と表現でき、切り捨てによりデータ値が4で割り算された、あるいは4分の1を掛け算されたと表現できる。このような場合、言うまでもなく、上述の総和レジスタ20の総和データSKnと、係数レジスタ211〜21nの各係数データK1〜Knの総和とは、2分の1の関係ではなくなる。すなわち、ビット切り捨て分などを考慮した表現が必要である。このような場合も考慮して、本発明のデジタルフィルタは、各遅延に対応したフィルタ係数により重み付け加算した結果を定数Mで割り算した値のデータに対し、総和レジスタ20は、これらフィルタ係数の総和を上記定数Mの2倍の定数2Mで割り算した値のデータを記憶すればよいと言える。言い換えれば、このような場合は、SKn={1/(2xM)}x(K1+K2+・・・+Kn)の関係を満たす総和データSKnを総和レジスタ20に格納すればよい。ここで、定数Mは、ビット切り捨て分などを考慮するため導入した定数であり、ゼロ以外の数ならどんな数でもよい。
【0045】
すなわち、本発明のデジタルフィルタは、2値で表現される入力データを入力順に遅延した遅延データに対して、各遅延に対応したフィルタ係数により重み付け加算した結果に対し定数Mで割り算した値のデータを出力するFIR形デジタルフィルタ部100と、FIR形デジタルフィルタ部100から出力されたデータから、上記フィルタ係数の総和を定数Mの2倍の定数2Mで割り算した値のデータを、減算するオフセット補正部とを備え、これによって、回路規模の削減を図るとともに、出力データに重畳されるオフセット成分を除去し、出力データの精度の向上を図っている。
【0046】
また、図1、および図2のスイッチ111〜11nは、スイッチによる選択回路の例で説明したが、ゲート回路により、あるいはトランスファゲートを利用して実現してもよい。図3は、ゲート回路、あるいはトランスファゲートを用いて、図1におけるスイッチ111〜11nを実現した具体的な構成例を示す図である。
【0047】
図3の(a)は、論理積演算を行なうANDゲート80を用いて構成した一例であり、スイッチ11nを代表して示している。係数データKnとしてはフィルタ係数knの2倍の入力データ値「2xkn」として、最下位ビットであるLSBには論理値「0」が入力され、LSBより上位の各ビットには、フィルタ係数knに対応する論理値「Kn2」〜「Knh」が入力される。論理値「Kn2」〜「Knh」を示す各ビットは、それぞれ各ANDゲート80の一方の入力端子に接続される。また、シフトレジスタ10からの遅延データDnは、各ANDゲート80の他方の入力端子に接続される。このような構成により、遅延データDnが論理値「0」のときは、出力データとしてはゼロが出力される。また、遅延データDnが論理値「1」のときは、出力データとしては、係数値「2xkn」が出力される。
【0048】
図3の(b)は、信号伝達の制御が可能なトランスファゲート81、82を用いて構成した一例であり、スイッチ11nを代表して示している。遅延データDnが論理値「0」のときは、反転回路であるインバータ83の出力が論理値「1」となり、各トランスファゲート81がONとなる。これにより、遅延データDnが論理値「0」のときは、出力データとしてはゼロが出力される。逆に、遅延データDnが論理値「1」のときは、各トランスファゲート82がONとなる。これにより、遅延データDnが論理値「1」のときは、出力データとしては、係数値「2xkn」が出力される。
【0049】
また、図1、および図2で説明した構成では、出力端子31からの出力データは、サンプリングレートがクロック端子32のクロックレートと同一であるが、例えば、出力端子31からの出力データに対して固定レートで間引くことにより、所望のサンプリングレート出力とすることができる。具体的な例として、サンプリングレート3.072MHzの1ビットの入力音声データとした場合、出力端子31からは、サンプリングレート3.072MHzの例えば16ビットの音声出力データが得られる。この音声出力データに対して64回に一度、データを取り込むようにすることで、サンプリングレート48KHzの16ビットのPCM音声データを得ることができる。
【0050】
(実施の形態2)
図4は、本発明の実施の形態2であるデジタルフィルタの構成の一例を示すブロック図である。本実施の形態2におけるデジタルフィルタは、実施の形態1と比較して、外部から各係数データが入力可能であり、入力された各係数データが、それぞれの係数レジスタに設定されるとともに、以下で説明するアキュムレータにも供給され、累積加算される構成であることを特徴とする。すなわち、実施の形態1においては、フィルタ特性を決定する各フィルタ係数が固定された係数値として各レジスタに記憶されたのに対して、本実施の形態2では、任意に各フィルタ係数を設定可能とし、任意のフィルタ特性が得られるように構成したことを特徴とする。このような構成により、例えば、時間的に変化する伝送路特性により信号の劣化が生じる場合であっても、この劣化を補正するような特性を加味したフィルタ係数を適応的に設定するようなデジタルフィルタとして利用できる。なお、本実施の形態2では、実施の形態1における図2で説明した構成を基本にし、その改良した例を挙げて説明するが、図1で説明した構成に対しても適用することができる。また、図4において、図2と同一の符号を付した構成要素は同一の機能を有しており、これらについては説明を省略する。
【0051】
図4において、係数入力端子33は、本デジタルフィルタの各フィルタ係数k1〜knに対応した係数値「k1」〜「kn」を有する係数データK1〜Knが供給される入力端子である。係数レジスタ411〜41nは、本デジタルフィルタにおける所定の係数データK1〜Knを記憶するレジスタである。係数入力端子33に順次供給された各係数データK1〜Knは、それぞれ所定の係数レジスタ411〜41nに転送され、各係数レジスタ411〜41nに所定の係数値「k1」〜「kn」の係数データK1〜Knが格納される。また、アキュムレータ40は、供給されたデータを、順次累積加算する機能を有する。すなわち、係数入力端子33に供給された各係数データK1〜Knは、アキュムレータ40にも転送され、アキュムレータ40は、順次転送される係数データK1〜Knを累積加算する。本実施の形態2におけるデジタルフィルタは、このような構成とすることにより、任意のフィルタ係数に対応する係数データが設定可能であり、このような機能を有することで任意のフィルタ特性を設定することができる。また、このような機能を有することにより、例えば、フィルタ係数を必要に応じて変更し適応的に最適なフィルタ特性を得るようなデジタルフィルタとして利用することができる。
【0052】
以下、図4で示す構成により、任意の係数データが設定される動作について説明する。まず、所定のフィルタ係数k1〜knを設定するとき、係数入力端子33には各フィルタ係数k1〜knに相当する係数値「k1」〜「kn」を有する各係数データK1〜Knを、例えば、K1、K2、K3、と順にKnまで供給する。これにより、係数入力端子33に順番に供給される各係数データK1〜Knは、対応する各係数レジスタ411〜41nに転送されるとともに、アキュムレータ40にも転送される。すなわち、係数レジスタ411には所定の係数値「k1」、係数レジスタ412には所定の係数値「k2」、と順番に、各係数レジスタ411〜41nに応じた係数データK1〜Knが格納される。このような動作とともに、アキュムレータ40に対しても係数データが、K1、K2、K3と順にKnまで転送され、アキュムレータ40の累積加算の機能により、転送された各係数データは、K1、K2、K3と順にKnまで累積加算される。このように、アキュムレータ40には、最終的に各係数データK1〜Knの各係数値「k1」〜「kn」を加算した値「k1+k2+k3+・・・+kn」である係数総和値「Σkn」が設定される。すなわち、アキュムレータ40には、図2での総和レジスタ20と同一の総和データSKnが設定され、アキュムレータ40から係数総和値「Σkn」を有する総和データSKnが出力される。このような動作により、係数レジスタ411〜41nに所定の係数データK1〜Kn、およびアキュムレータ40にも各係数値「k1」〜「kn」が累積加算された総和データSKnが設定され、実施の形態1と同一のフィルタ係数を設定した場合、実施の形態1と同一の特性を有するデジタルフィルタが実現できる。さらに、このような構成とすることにより、任意のフィルタ特性が設定可能なデジタルフィルタが実現できる。特に、係数総和値「Σkn」は、各係数データK1〜Knの設定と並行して、アキュムレータ40により順次累積加算して得られるため、フィルタ係数を変更する毎に、別途に係数総和値を演算する必要がなく、この演算のための処理が削減できる。
【0053】
図5、および図6は、以上説明した図4に示す構成とは異なった構成ではあるが、図4で示した構成と同様に、外部から入力された各係数データK1〜Knがそれぞれのレジスタに設定される機能を有する他の構成例を示すブロック図である。
【0054】
図5において、係数入力端子33に供給された係数データK1〜Knは、図4で説明した構成と同様に、それぞれ所定の係数レジスタ411〜41nに転送され、各係数レジスタ411〜41nに所定の係数データK1〜Knが格納される。また、シフトレジスタ50は、図4で説明したシフトレジスタ10と比較して、シフトレジスタ50の出力をすべて「1」として出力するように制御するセット入力を有する。シフトレジスタ50のセット入力は、外部からのセット指令信号が供給されるセット入力端子34に接続される。また、図5の構成において、図4で説明したアキュムレータ40に代えて、図2で説明した構成と同様に総和レジスタ20を有している。
【0055】
すなわち、セット入力端子34に、セット指令信号が入力されると、シフトレジスタ50からの遅延データD1〜Dnは、すべて値「1」として出力される。このため、スイッチ111〜11nは、すべて係数レジスタ側を選択する。よって、加算回路12の出力には、各係数値「k1」〜「kn」を加算した値「k1+k2+k3+・・・+kn」、すなわち係数総和値「Σkn」が出力される。総和レジスタ20は、この係数総和値「Σkn」を適切なタイミングで取り込むことにより、図4で示したアキュムレータ40と同様に、総和レジスタ20には、係数総和値「Σkn」を有する総和データSKnが設定される。このように、所定のタイミングでシフトレジスタ50をセットし、このタイミングに対応した適切なタイミングで総和レジスタ20に加算回路12の出力を取り込むことにより、図4で示した構成と同様の機能を実現できる。また、図4の構成と比較して、アキュムレータ40よりも回路規模が小さくてすむ総和レジスタ20を設ければよいため、回路規模を削減することができる。
【0056】
また、図6において、係数入力端子33に供給された係数データK1〜Knは、図5で説明した構成と同様に、それぞれ所定の係数レジスタ411〜41nに転送され、各係数レジスタ411〜41nに所定の係数データK1〜Knが格納される。また図6の構成において、図5と比較して、第1の選択回路としてのスイッチ421〜42nを有していることを特徴とする。スイッチ421〜42nの制御入力は、第1の選択制御信号としての係数ロード指令信号が供給される係数ロード入力端子35に接続される。また、スイッチ421〜42nの一方の入力には、それぞれシフトレジスタ10からの遅延データD1〜Dnが接続され、他方の入力には、2値入力値の一方の値としての値「1」のデータが設定される。また、図6の構成において、図4で説明したアキュムレータ40に代えて、図2、図5で説明した構成と同様に総和レジスタ20を有している。
【0057】
すなわち、係数ロード入力端子35に入力された係数ロード指令信号が有効であるとスイッチ421〜42nは、すべて「1」を選択する。このため、第2の選択回路としてのスイッチ111〜11nは、すべて係数レジスタ側を選択する。よって、加算回路12の出力には、図5の場合と同様に、各係数値を加算した値「k1+k2+k3+・・・+kn」が出力される。総和レジスタ20は、この各係数値を加算した値を適切なタイミングで取り込むことにより、図4で示したアキュムレータ40と同様に、総和レジスタ20には、各係数値を加算した値「k1+k2+k3+・・・+kn」、すなわち係数総和値「Σkn」を有する総和データSKnが設定される。このように、所定のタイミングで係数ロード信号を入力し、このタイミングに対応した適切なタイミングで総和レジスタ20に加算回路12の出力を取り込むことにより、図4で示した構成と同様の機能を実現できる。
【0058】
また、図7、および図8は、図1で説明した構成を基本として、図5、図6で示した構成と同様に、外部から入力された各係数データがそれぞれのレジスタに設定される機能を有する他の構成例を示すブロック図である。
【0059】
図7の構成は、図1での構成を基本とし、図5で説明した出力をすべて「1」として出力するように制御するセット入力を有したシフトレジスタ50を利用した構成である。係数レジスタ411〜41nには、係数入力端子33より、係数データK1〜Knとして、それぞれフィルタ係数の2倍に相当する係数値「2xk1」〜「2xkn」が設定される。セット入力端子34に、セット指令信号が入力されると、シフトレジスタ50からの遅延データD1〜Dnは、すべて値「1」が出力され、スイッチ111〜11nは、すべて係数レジスタ側を選択する。よって、加算回路12の出力には、各係数値を加算した値「k1+k2+k3+・・・+kn」の2倍の値、すなわち係数総和値「Σkn」の2倍の値が出力される。総和レジスタ20は、この係数総和値「Σkn」の2倍の値を、まず、定数「2分の1」を掛け算する掛算器41で掛け算され、この掛け算結果を適切なタイミングで取り込むことにより、図1で示した総和レジスタ20と同様に、係数総和値「Σkn」を有する総和データSKnが設定される。このように、図7で示した構成によっても、図4で示した構成と同様の機能を実現できる。
【0060】
図8の構成は、図1での構成を基本とし、図6と同様に第1の選択回路としてのスイッチ421〜42nを有した構成である。係数レジスタ411〜41nには、係数入力端子33より、係数データK1〜Knとして、それぞれフィルタ係数の2倍に相当する係数値「2xk1」〜「2xkn」が設定される。係数ロード入力端子35に、第1の選択制御信号としての係数ロード指令信号が入力されると、スイッチ421〜42nは、すべて値「1」を選択し、第2の選択回路としてのスイッチ111〜11nは、すべて係数レジスタ側を選択する。よって、加算回路12の出力には、各係数値を加算した値「k1+k2+k3+・・・+kn」の2倍、すなわち係数総和値「Σkn」の2倍の値が出力される。総和レジスタ20は、この係数総和値「Σkn」の2倍の値を、まず、定数「2分の1」を掛け算する掛算器41で掛け算され、この掛け算結果を適切なタイミングで取り込むことにより、図1で示した総和レジスタ20と同様に、係数総和値「Σkn」を有する総和データSKnが設定される。このように、図8で示した構成によっても、図4で示した構成と同様の機能を実現できる。
【0061】
【発明の効果】
以上説明したように、本発明のデジタルフィルタによれば、デジタルフィルタを構成する回路規模の増加を抑制するとともに、精度よい出力データを得ることができる。
【図面の簡単な説明】
【図1】本発明の実施の形態1のデジタルフィルタの構成を示すブロック図
【図2】本発明の実施の形態1のデジタルフィルタの構成の変形例を示すブロック図
【図3】(a)図1のスイッチ111〜11nを、ANDゲートを用いて構成した一例を示す図
(b)図1のスイッチ111〜11nを、トランスファゲートを用いて構成した一例を示す図
【図4】本発明の実施の形態2のデジタルフィルタの構成を示すブロック図
【図5】本発明の実施の形態2のデジタルフィルタの構成の変形例を示すブロック図
【図6】本発明の実施の形態2のデジタルフィルタの構成の他の変形例を示すブロック図
【図7】本発明の実施の形態2のデジタルフィルタの構成の他の変形例を示すブロック図
【図8】本発明の実施の形態2のデジタルフィルタの構成の他の変形例を示すブロック図
【図9】従来例におけるデジタルフィルタの構成を示すブロック図
【符号の説明】
10,50 シフトレジスタ
12 加算回路
20 総和レジスタ
22 減算器
23 (2倍の)掛算器
30 入力端子
31 出力端子
32 クロック端子
33 係数入力端子
34 セット入力端子
35 係数ロード入力端子
40 アキュムレータ
41 (2分の1の)掛算器
80 ANDゲート
81,82 トランスファゲート
83 インバータ
100 FIR形デジタルフィルタ部
111〜11n,421〜42n スイッチ
191〜19n,211〜21n,411〜41n 係数レジスタ
200 オフセット補正部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a non-recursive digital filter in which a predetermined filter coefficient is set to a plurality of taps, and in particular, a digital signal quantized with a bit number lower than a predetermined bit number is input, and a predetermined bit number The present invention relates to improvement of a circuit configuration of a digital filter that converts a digital signal into a digital signal.
[0002]
[Prior art]
In recent years, with the progress of digital technology, digital recording has become mainstream in audio and video recording methods. As one of digital processing methods for audio signals, a method called an oversampling method or a delta-sigma method has been proposed and put to practical use. These methods are one method of AD (Analog Digital) conversion for converting an analog signal into a digital signal. In these methods, an analog audio signal is sampled at a frequency higher than a predetermined sampling frequency, and is quantized with a bit number lower than a predetermined bit number to be converted into a digital signal. Next, the digital signal is band-limited by a low-pass filter including a digital filter, and is converted into a digital signal having a predetermined sampling frequency and a predetermined number of quantization bits by a decimation (decimation) process. Specifically, when a predetermined digital signal having a sampling frequency of 48 KHz and a quantization bit number of 16 bits is obtained, for example, sampling is performed at a sampling frequency that is nearly 10 times as large as 48 KHz, and AD conversion is performed by 1-bit quantization. For the digital signal obtained by such AD conversion, the digital low-pass filter limits the band to correspond to a low sampling rate, increases the number of bits by digital filter operation, and sets the sampling frequency to 48 kHz and the quantum This makes it possible to obtain a digital signal having 16 bits.
[0003]
In addition, next-generation CDs and the like in which digital signals sampled at a higher frequency than the signal band and quantized with a lower bit number and recorded on an optical disk or the like as in these methods are also referred to as super audio CDs, for example. Called and proposed.
[0004]
In a method called an oversampling method or a delta-sigma method, a low-pass filter composed of a digital filter as described above is important in determining sound quality and the like. For this reason, such a digital low-pass filter is usually constituted by a non-cyclic FIR digital filter having a linear phase characteristic. Further, in order to realize a filter having ideal frequency characteristics, a transversal type filter having a multistage number of taps and a filter coefficient for performing predetermined weighting is set for each tap is used. That is, in order to realize an FIR digital filter having ideal frequency characteristics, it is necessary to increase the number of taps. When the number of taps is increased, the number of calculations with the filter coefficient increases. As a result, there is a problem that the number of multipliers for this operation increases, and the circuit scale including the adder and the delay circuit increases.
[0005]
In order to cope with such a problem, there has been proposed a method for improving the circuit configuration of a digital filter so as to obtain desired characteristics while reducing the circuit scale (for example, see Patent Document 1).
[0006]
FIG. 9 is a block diagram showing a configuration of a digital filter in a conventional example.
[0007]
In FIG. 9, input data quantized by one bit is shifted by n stages in the shift register 10 in synchronization with a clock. Delay data D1 to Dn output from each stage of the shift register 10 are supplied to switches 111 to 11n, respectively. The delay data D1 to Dn are used as switching control signals for the switches 111 to 11n, respectively. The switches 111 to 11n select zero data when the value of the delay data from the shift register 10 is “0”, and select the coefficient registers 191 to 19n when the value of the delay data from the shift register 10 is “+1”. Is selected for each of the coefficient data K1 to Kn stored in. The coefficient data K1 to Kn have an h-bit width and represent coefficient values “k1” to “kn” corresponding to each filter coefficient. That is, the switches 111 to 11n are equivalent to executing the multiplication of the delay data D1 to Dn from each stage and the coefficient data K1 to Kn. The outputs of the switches 111 to 11n are added in the adder circuit 12 and output as m-bit output data.
[0008]
In general, an FIR digital filter requires a plurality of stages of delay circuits corresponding to the bit width of input data provided by a shift register or the like, and further requires multiplication of delay data from each delay by coefficient data having a plurality of bit widths. At this time, if the number of delay stages, that is, the number of taps is large, the number of multipliers for performing the multiplication increases, and the circuit scale becomes very large. On the other hand, in the above-described conventional example, a shift register having a 1-bit width is used for the delay circuit, and a switch or a circuit equivalent thereto can be used as a multiplier. A suitable digital filter can be realized.
[0009]
[Patent Document 1]
JP-A-2-186710
[0010]
[Problems to be solved by the invention]
However, the digital filter as in the conventional example processes 1-bit input data, that is, processes the binary value of the data “+1” and “0”, and outputs “positive value” and “negative value”. Are not processed. For this reason, there is a problem that a positive offset component is superimposed on the output data of the filter, and output data having an accurate value cannot be obtained due to the offset component. In particular, since the offset component changes depending on the filter coefficient to be set, depending on the filter characteristics, the offset component becomes a DC noise component, and when audio digital signals are handled, sound quality may be deteriorated.
[0011]
On the other hand, when an FIR digital filter is configured for binary input data of “positive value” and “negative value”, there is a problem that the circuit scale increases due to expression of data itself and processing for negative values. there were. That is, when the input data is configured as a “positive value” and a “negative value”, a commonly used two's complement notation is used. "" Is represented as "01" and "negative value" is represented as "11", which requires two bits. Further, in the case of an arithmetic operation for handling a negative value in two's complement notation, an inverting circuit for converting a negative value into a positive value and an adding circuit of “+1” may be required. As described above, in the case of using a configuration in which a negative value is handled, the influence of the offset component is eliminated, but the circuit scale may be increased.
[0012]
SUMMARY OF THE INVENTION It is an object of the present invention to provide a digital filter capable of suppressing an increase in circuit scale of a digital filter and obtaining accurate output data.
[0013]
[Means for Solving the Problems]
In order to solve the above problems, a digital filter according to the present invention includes: a shift register that stores input data expressed in binary while shifting the data by a plurality of stages; a plurality of coefficient registers that store a plurality of filter coefficients; Based on the delay data in each stage of the register, when this delay data is one value, the value of the filter coefficient of the coefficient register corresponding to that stage is selected, and when this delay data is the other value, a value of zero is set. A plurality of selection circuits for selecting and outputting selected values as selection data, an addition circuit for adding each selection data from the plurality of selection circuits and outputting an addition result as addition data, A sum register for storing a half value of the sum of the filter coefficients stored in the coefficient register as sum data; Subtracted over data, a configuration in which a subtractor that outputs a subtraction result as output data.
[0014]
With such a configuration, the selection circuit that selects a filter coefficient or zero in accordance with the delay data of each stage has a function equivalent to a multiplier and realizes a reduction in circuit scale. Further, the offset component superimposed on the output data is removed by subtracting a half value of the sum of the filter coefficients stored in the sum register from the addition data from the addition circuit. This makes it possible to suppress an increase in the circuit size of the digital filter and to realize a digital filter capable of obtaining accurate output data.
[0015]
Further, the digital filter of the present invention includes an input terminal for inputting input data, a coefficient input terminal for inputting a plurality of filter coefficients, and shifting input data represented by 1 bit supplied to the input terminal by a plurality of stages. And a plurality of coefficient registers for respectively storing the plurality of filter coefficients supplied to the coefficient input terminal. The delay data is one value based on the delay data in each stage of the shift register. A plurality of selection circuits for selecting the value of the filter coefficient of the coefficient register corresponding to the stage, selecting the value of zero when the delay data is the other value, and outputting the selected value as selection data. An addition circuit for adding each selection data from the plurality of selection circuits and outputting a value corresponding to the addition result as addition data, and a coefficient input terminal An accumulator that accumulates a plurality of supplied filter coefficients by a plurality of values, outputs a value corresponding to the result of the accumulative addition as sum data, and subtracts the sum data from the sum data and outputs a subtraction result. The configuration includes a subtractor that outputs data and an output terminal that outputs output data.
[0016]
With such a configuration, in parallel with the setting of each filter coefficient in a predetermined coefficient register, each filter coefficient is sequentially cumulatively added by an accumulator to obtain total data. In addition, there is no need to separately calculate the sum data, and the processing for this calculation can be reduced. Therefore, it is possible to realize a digital filter in which arbitrary filter characteristics can be set, to suppress an increase in the circuit scale of the digital filter, and to realize a digital filter capable of obtaining accurate output data.
[0017]
Further, the digital filter of the present invention includes an input terminal for inputting input data, a coefficient input terminal for inputting a plurality of filter coefficients, and shifting input data represented by 1 bit supplied to the input terminal by a plurality of stages. And a plurality of coefficient registers for respectively storing the plurality of filter coefficients supplied to the coefficient input terminal. The delay data is one value based on the delay data in each stage of the shift register. A plurality of selection circuits for selecting the value of the filter coefficient of the coefficient register corresponding to the stage, selecting the value of zero when the delay data is the other value, and outputting the selected value as selection data. An addition circuit that adds each selection data from the plurality of selection circuits and outputs a value corresponding to the addition result as addition data, The sum data is fetched and stored at a predetermined timing, stored, and a sum register that outputs a value corresponding to the fetched sum data as sum data, subtracts the sum data from the sum data, and outputs a subtraction result as output data It has a subtractor and an output terminal for outputting output data. Further, the shift register has a set input for outputting the one value from all stages that output delay data when a set command signal is input, and the sum register includes a set input of the shift register. Is configured to take in addition data in accordance with the timing at which the set command signal is input to the CPU.
[0018]
With such a configuration, each filter coefficient is set in a predetermined coefficient register, and a value obtained by adding all the filter coefficients is output from the addition circuit in accordance with the timing at which the set command signal is input. The summation register stores the summation data by taking in the value obtained by adding all the filter coefficients. Therefore, every time the filter coefficient is changed, it is not necessary to separately calculate the summation data. Can be reduced. Therefore, it is possible to realize a digital filter in which arbitrary filter characteristics can be set, to suppress an increase in the circuit scale of the digital filter, and to realize a digital filter capable of obtaining accurate output data.
[0019]
Further, the digital filter of the present invention has an input terminal for inputting input data, a coefficient input terminal for inputting a plurality of filter coefficients, and one or the other value represented by 1 bit supplied to the input terminal. A shift register that stores input data having a plurality of stages while shifting the data, and a first selection control signal for selection control, and the first selection control signal is invalid based on the first selection control signal. In the case of, the value of the delay data of the shift register corresponding to the stage is selected, and when the first selection control signal is valid, the one of the above values is selected, and the selected value is converted to the second selection control signal. A plurality of first selection circuits, a plurality of coefficient registers respectively storing a plurality of filter coefficients supplied to a coefficient input terminal, and a second selection control signal based on a second selection control signal. When the selection control signal has one value, the value of the filter coefficient of the coefficient register corresponding to that stage is selected. When the second selection control signal has the other value, a value of zero is selected. A plurality of second selection circuits that output as selection data, an addition circuit that adds each selection data from the plurality of second selection circuits, and outputs a value corresponding to the addition result as addition data; At the predetermined timing, stores the sum data, and outputs a value corresponding to the fetched sum data as sum data, and subtracts the sum data from the sum data, and outputs the subtraction result as output data. It has a subtractor for outputting and an output terminal for outputting output data. Further, the sum register is configured to take in the added data in accordance with the timing at which the first selection control signal becomes valid.
[0020]
With such a configuration, each filter coefficient is set in a predetermined coefficient register, and a value obtained by adding all the filter coefficients from the adder circuit is output according to the timing at which the first selection control signal becomes valid. Is done. The summation register stores the summation data by taking in the value obtained by adding all the filter coefficients. Therefore, every time the filter coefficient is changed, it is not necessary to separately calculate the summation data. Can be reduced. Therefore, it is possible to realize a digital filter in which arbitrary filter characteristics can be set, to suppress an increase in the circuit scale of the digital filter, and to realize a digital filter capable of obtaining accurate output data.
[0021]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0022]
(Embodiment 1)
FIG. 1 is a block diagram illustrating an example of a configuration of a digital filter according to Embodiment 1 of the present invention. This digital filter performs a filter operation by performing weighted addition on delay data obtained by delaying binary input data over a plurality of stages, and outputs output data of a plurality of bit widths band-limited by the filter operation. Filter. An offset correction unit for removing a DC component superimposed on data obtained by weighted addition is provided.
[0023]
In FIG. 1, binary input data is supplied to an input terminal 30 as 1-bit width data. In the first embodiment, the two values are “1” and “0”, and one of the two values is described as “1” and the other is described as “0”. Indicated by parentheses ""). The input data supplied to the input terminal 30 is supplied to the shift register 10, and is sampled and shifted according to the clock supplied to the clock terminal 32. The shift register 10 includes n (n is an integer of 2 or more) stages, that is, n taps, and delay data D1 to Dn output from each stage are respectively connected to switches 111 to 11n as selection circuits. Supplied to The delay data D1 to Dn operate as switching control signals for the respective switches 111 to 11n. The switches 111 to 11n select data having a value of zero when the value of the delay data from the shift register 10 is “0”, and select the data when the value of the delay data from the shift register 10 is “1”. , Select data previously stored in the coefficient registers 211 to 21n, and output the selected data as selected data. Here, the switches 111 to 11n function as multipliers for weighting equivalently. The coefficient registers 211 to 21n are registers in which coefficient values corresponding to predetermined filter coefficients k1 to kn in the present digital filter are stored in advance. The filter coefficients k1 to kn are filter coefficients that determine the transfer characteristics of the present digital filter. By setting the filter coefficients k1 to kn to predetermined values, the frequency characteristics of the present digital filter are also determined. In the configuration shown in FIG. 1, for the predetermined filter coefficients k1 to kn, coefficient values “2xk1” to “2xkn” corresponding to twice the filter coefficients are used as the predetermined coefficient data K1 to Kn, respectively, and stored in the coefficient registers 211 to Kn. 21n. The predetermined coefficient values "2xk1" to "2xkn" stored in the coefficient registers 211 to 21n are output as coefficient data K1 to Kn having a bit width of h (h is an integer of 2 or more). The switches 111 to 11n supply zeros or coefficient data selected based on the delay data D1 to Dn to the adder circuit 12. The addition circuit 12 adds all the selection data supplied from the switches 111 to 11n, and outputs the addition result as addition data AD having an m-bit width. As described above, the shift register 10, the switches 111 to 11n, the coefficient registers 211 to 21n, and the adding circuit 12 constitute the FIR digital filter unit 100.
[0024]
The sum register 20 is a register in which data corresponding to the sum of the filter coefficients k1 to kn is stored in advance. That is, the sum register 20 stores a coefficient sum value “Σkn” corresponding to the sum (k1 + k2 + k3 +... + Kn) of the filter coefficients k1 to kn as the sum data SKn, and outputs the sum data SKn from the sum register 20. Is done. The subtractor 22 is a subtractor that subtracts the sum data SKn from the sum register 20 from the sum data AD from the adder circuit 12. The subtraction result obtained by the subtractor 22 is supplied to the output terminal 31. From the output terminal 31, data having a p-bit width is output as output data of the digital filter. As described above, the offset correction unit 200 is configured by the sum register 20 and the subtractor 22.
[0025]
The operation of the digital filter according to the first embodiment configured as described above will be described below with reference to a more specific example. Here, as a specific example, a case where the number of stages of the shift register 10 is n = 4, that is, four stages will be described.
[0026]
For example, in each delay data, when D1 = “1”, D2 = “0”, D3 = “1”, and D4 = “0”, the switch 111 sets the coefficient value because the delay data D1 is “1”. The switch 112 selects zero because the delay data D2 is “0”, and the switch 113 selects the coefficient data “2xk3” because the delay data D3 is “1”. , And the switch 114 selects zero because the delay data D4 is “0”. Thus, the addition circuit 12 performs an operation equivalent to the addition of the coefficient value “2 × k1” of the coefficient register 211 and the coefficient value “2 × k3” of the coefficient register 213. The addition circuit 12 outputs a value “2x (k1 + k3)” obtained by adding the coefficient value “2xk1” and the coefficient value “2xk3” as the addition data AD. On the other hand, in the sum register 20, a coefficient sum value “ΣKn” corresponding to the sum (k1 + k2 + k3 + k4) of the filter coefficients k1 to k4, that is, “k1 + k2 + k3 + k4” is set in advance. Therefore, the sum data SKn having the value “k1 + k2 + k3 + k4” is subtracted from the addition data AD having the value “2x (k1 + k3)” by the subtracter 22. That is, at this time, the digital filter outputs output data having a value of “{2 × (k1 + k3) − (k1 + k2 + k3 + k4)}”.
[0027]
As in the digital filter of the present invention, even if the input data is 1 bit, each of the coefficient data K1 to Kn is, for example, data of a high bit width as shown as h bits, and is output data. Can also be output data of a high bit width as shown as, for example, p bits. That is, the present digital filter converts the input data input at a low bit width but input at a high sampling rate so as to be able to cope with a low sampling rate by limiting the band by a filter operation. It can be said that the bit width has been traded off to a higher bit width. Utilizing such a principle, for example, from 1-bit input audio data of a sampling rate of 3.072 MHz to 16-bit PCM (Pulse Code Modulation) audio data of a sampling rate of 48 KHz and a sampling rate of 1/64, Used for conversion.
[0028]
Although the configuration and operation of the digital filter according to the first embodiment have been described above, the digital filter according to the present invention is configured based on a modification of a filter operation expression described below. Hereinafter, the operation principle of the digital filter of the present invention will be described according to a modification of the filter operation expression.
[0029]
Generally, a filter operation expression of an FIR digital filter by weighted addition using a filter coefficient kr (r is 1 to n) is such that each delayed data is dr (r is 1 to n) and the output is Y Then, it is expressed by the following equation 1.
[0030]
Y = {drxkr} Equation 1
Note that the symbol Σ indicates that r is an arithmetic operation in parentheses from 1 to n (n is an integer of 2 or more), and the sum is obtained. That is, the right side of Expression 1 indicates that the calculation of {(d1 × k1) + (d2 × k2) +... + (Dnxkn)} is performed.
[0031]
Equation 1 can be modified as follows.
[0032]
Y = {(dr + 1−1) xkr} Equation 2
Further, Equation 2 can be modified as follows.
[0033]
Y = {(dr + 1) xkr} − {kr} Equation 3
Here, it is assumed that each delayed data dr takes "-1" or "+1" as a binary value. Then, (dr + 1) in Equation 3 takes “0” or “2” as a binary value. In other words, according to the value “0” or “1” of each of the delay data D1 to Dn, the value of 0 times the filter coefficient or the value of 2 × kr of the filter coefficient is added, and the calculation of Expression 3 is performed. Then, a configuration equivalent to the FIR type digital filter shown in Expression 1 can be realized. That is, Equation 3 can be further transformed into the following Equation 4.
[0034]
Y = {(2 × kr) × Dr} − {kr} Equation 4
Further, Equation 4 can be modified as follows.
[0035]
Y = {(2 × Dr−1) × kr} Equation 5
Equation 4 is an equation showing the configuration of the digital filter of the first embodiment shown in FIG. 1, and is equivalent to the operation equation of the FIR digital filter shown in Equation 1. Also, according to the comparison between Expressions 1 and 5, dr = 2 × Dr−1 and the value of Dr is “0” or “1”, and therefore dr is “−1” or “+1”.
[0036]
In other words, the digital filter according to the configuration of the first embodiment uses the input data to the shift register as binary data including a negative value “−1” and a positive value “+1”, and performs a filter operation expressed by Expression 1. Is equivalent to the configuration of a digital filter that performs Therefore, according to the present invention, a digital filter equivalent to an FIR type digital filter that inputs binary “−1” and “+1” can be configured with a simple configuration. That is, when the binary values “−1” and “+1” are represented by a binary number of two's complement, a two-bit width is usually required. A filter can be realized.
[0037]
On the other hand, as described above, when the filter operation of the low-pass filter characteristic is performed with the values “0” and “1” as they are as 1-bit input data, the output data is affected by the offset component. That is, since the input data does not have a negative value, it has an offset component as a DC component in the positive direction, and this offset component passes through a filter having a low-pass filter characteristic. As a result, the output data also has this offset component. Influence of ingredients appears. On the other hand, in the digital filter of the present invention, the FIR digital filter unit 100 first performs the same filter processing as the conventional one, and furthermore, the offset correction unit 200 removes this offset component. And it is possible to obtain accurate output data in which the influence of is suppressed.
[0038]
As described above, since the digital filter of the present invention is configured based on such an operation principle, it is possible to suppress an increase in circuit scale and obtain accurate output data without being affected by an offset component.
[0039]
In the configuration example of the first embodiment described with reference to FIG. 1, an example in which the coefficient registers 211 to 21n store the coefficient values corresponding to twice the filter coefficients has been described. It is also possible to realize this. For example, coefficient values corresponding to the respective filter coefficients are stored in the coefficient registers 211 to 21n, and the coefficient data input to the switches 111 to 11n is shifted by one bit in the upper bit direction, or By shifting the added data AD by one bit in the upper bit direction, data corresponding to twice the filter coefficient may be realized.
[0040]
FIG. 2 is a block diagram showing a modification of the configuration described with reference to FIG. 1 as an example. 2, coefficient data K1 to Kn having respective coefficient values “k1” to “kn” corresponding to the respective filter coefficients k1 to kn are stored in the coefficient registers 211 to 21n. And a multiplier 23 for multiplying by a constant “2”. That is, the process of selecting and adding the coefficient values “2xk1” to “2xkn” corresponding to twice the filter coefficients in the configuration of FIG. 1 is performed by the coefficient value “k1” corresponding to each filter coefficient as in the configuration of FIG. After selecting and adding "" to "kn", the same result can be obtained in a process of outputting as multiplied data that is twice the added data. Therefore, even with the configuration of FIG. 2, the same output result is obtained although the configuration is different from that of FIG. Although FIG. 2 shows a configuration in which the data is doubled by the multiplier 23, the addition data AD from the addition circuit 12 is bit-shifted by one bit in the upper bit direction, and the least significant bit LSB is a logical value. By setting “0”, double calculation can be easily realized.
[0041]
Further, in Expressions 2 and 3 described above, “1” can be replaced by “(1 /)”, which is half, and a configuration based on the expression can be realized. Equations 2 and 3 are replaced with the following equations 2 ′ and 3 ′.
[0042]
Y = {(dr + (1/2)-(1/2)) xkr} Equation 2 ′
Y = {(dr + (1/2)) xkr}-{(1/2) xkr} Equation 3 '
Here, even if it is assumed that each delayed data dr takes "-(1/2)" or "+ (1/2)" as a binary value, it is equivalent to Equation 1. That is, the coefficient registers 211 to 21n store coefficient data K1 to Kn having coefficient values “k1” to “kn” corresponding to the filter coefficients k1 to kn, and the sum register 20 stores the filter coefficients k1 to kn. May be stored such that the sum total data SKn having a value that is a half of the coefficient sum value “$ kn” corresponding to the sum of.
[0043]
In other words, it suffices that there is a relationship that the sum data SKn stored in the sum register 20 is one half of the sum of the coefficient data K1 to Kn stored in the coefficient registers 211 to 21n. That is, the sum data SKn satisfying the relationship of SKn = (1/2) × (K1 + K2 +... + Kn) may be stored in the sum register 20.
[0044]
Further, in the output of a plurality of adders provided inside the adder circuit 12, the lower bits are truncated or rounded to reduce the bit width and to save the circuit scale. In this case, for example, the data value may be expressed as being divided by 2 to the power of a by truncating or rounding the lower bits by a bits. For example, if the lower 2 bits of the data bus are truncated for a data value "64" on a data bus having a bit width of 8 bits, the data value after the truncation can be expressed as "16". It can be expressed that the value is divided by four or multiplied by one fourth. In such a case, needless to say, the sum data SKn of the sum register 20 described above and the sum of the coefficient data K1 to Kn of the coefficient registers 211 to 21n are no longer half. That is, it is necessary to provide an expression that takes into account bit truncation. In consideration of such a case, the digital filter according to the present invention uses the sum register 20 to calculate the sum of these filter coefficients for data obtained by dividing the result of weighting and adding by the filter coefficient corresponding to each delay by a constant M. Is divided by a constant 2M, which is twice the constant M, to store the data. In other words, in such a case, the total sum data SKn satisfying the relationship of SKn = {1 / (2 × M)} x (K1 + K2 +... + Kn) may be stored in the total sum register 20. Here, the constant M is a constant introduced in consideration of the amount of bit truncation, and may be any number other than zero.
[0045]
That is, the digital filter according to the present invention is a data filter in which input data expressed in binary is delayed in the order of input, weighted addition is performed by a filter coefficient corresponding to each delay, and a result obtained by dividing by a constant M is obtained. And an offset correction for subtracting data of a value obtained by dividing the sum of the filter coefficients by a constant 2M, which is twice the constant M, from the data output from the FIR digital filter 100. And thereby, the circuit scale is reduced, the offset component superimposed on the output data is removed, and the accuracy of the output data is improved.
[0046]
Also, the switches 111 to 11n in FIGS. 1 and 2 have been described as examples of the selection circuit using switches, but may be realized by a gate circuit or by using a transfer gate. FIG. 3 is a diagram illustrating a specific configuration example in which the switches 111 to 11n in FIG. 1 are realized using a gate circuit or a transfer gate.
[0047]
FIG. 3A shows an example in which an AND gate 80 performing an AND operation is used, and the switch 11n is shown as a representative. As the coefficient data Kn, an input data value “2xkn” twice the filter coefficient kn, a logical value “0” is input to the LSB which is the least significant bit, and each bit higher than the LSB has a filter coefficient kn. Corresponding logical values "Kn2" to "Knh" are input. Each bit indicating a logical value “Kn2” to “Knh” is connected to one input terminal of each AND gate 80, respectively. The delay data Dn from the shift register 10 is connected to the other input terminal of each AND gate 80. With such a configuration, when the delay data Dn has the logical value “0”, zero is output as the output data. When the delay data Dn has the logical value “1”, the coefficient value “2 × kn” is output as the output data.
[0048]
FIG. 3B shows an example in which transfer gates 81 and 82 capable of controlling signal transmission are used, and the switch 11n is shown as a representative. When the delay data Dn has the logical value "0", the output of the inverter 83, which is an inverting circuit, has the logical value "1", and each transfer gate 81 is turned on. Thus, when the delay data Dn has the logical value “0”, zero is output as the output data. Conversely, when the delay data Dn has the logical value "1", each transfer gate 82 is turned ON. Thus, when the delay data Dn has the logical value “1”, the coefficient value “2 × kn” is output as the output data.
[0049]
In the configuration described with reference to FIGS. 1 and 2, the output data from the output terminal 31 has the same sampling rate as the clock rate of the clock terminal 32. By thinning out at a fixed rate, a desired sampling rate output can be obtained. As a specific example, when 1-bit input audio data with a sampling rate of 3.072 MHz is used, for example, 16-bit audio output data with a sampling rate of 3.072 MHz is obtained from the output terminal 31. By taking in the data once every 64 times for this audio output data, 16-bit PCM audio data with a sampling rate of 48 KHz can be obtained.
[0050]
(Embodiment 2)
FIG. 4 is a block diagram illustrating an example of a configuration of a digital filter according to Embodiment 2 of the present invention. Compared with the digital filter according to the first embodiment, the digital filter according to the second embodiment can input each coefficient data from the outside, and each input coefficient data is set in each coefficient register. It is also supplied to an accumulator to be described and is cumulatively added. That is, in the first embodiment, each filter coefficient for determining a filter characteristic is stored in each register as a fixed coefficient value, whereas in the second embodiment, each filter coefficient can be arbitrarily set. And an arbitrary filter characteristic is obtained. With such a configuration, for example, even when a signal is deteriorated due to a time-varying transmission path characteristic, a digital filter that adaptively sets a filter coefficient that takes into account characteristics to correct the deterioration is used. Can be used as a filter. Although the second embodiment is based on the configuration described in FIG. 2 in the first embodiment and describes an improved example thereof, the present embodiment can also be applied to the configuration described in FIG. . In FIG. 4, components denoted by the same reference numerals as those in FIG. 2 have the same functions, and description thereof will be omitted.
[0051]
In FIG. 4, a coefficient input terminal 33 is an input terminal to which coefficient data K1 to Kn having coefficient values “k1” to “kn” corresponding to respective filter coefficients k1 to kn of the present digital filter are supplied. The coefficient registers 411 to 41n are registers for storing predetermined coefficient data K1 to Kn in the present digital filter. The coefficient data K1 to Kn sequentially supplied to the coefficient input terminal 33 are respectively transferred to predetermined coefficient registers 411 to 41n, and the coefficient data of predetermined coefficient values “k1” to “kn” are stored in the coefficient registers 411 to 41n. K1 to Kn are stored. The accumulator 40 has a function of sequentially accumulating the supplied data. That is, the coefficient data K1 to Kn supplied to the coefficient input terminal 33 are also transferred to the accumulator 40, and the accumulator 40 accumulates the sequentially transferred coefficient data K1 to Kn. With the digital filter according to the second embodiment having such a configuration, coefficient data corresponding to an arbitrary filter coefficient can be set, and by having such a function, an arbitrary filter characteristic can be set. Can be. In addition, by having such a function, for example, the filter can be used as a digital filter that changes filter coefficients as needed and adaptively obtains optimum filter characteristics.
[0052]
Hereinafter, an operation of setting arbitrary coefficient data by the configuration shown in FIG. 4 will be described. First, when setting predetermined filter coefficients k1 to kn, coefficient data K1 to Kn having coefficient values “k1” to “kn” corresponding to the respective filter coefficients k1 to kn are input to the coefficient input terminal 33, for example, K1, K2, and K3 are sequentially supplied to Kn. Thus, the coefficient data K1 to Kn sequentially supplied to the coefficient input terminal 33 are transferred to the corresponding coefficient registers 411 to 41n and also transferred to the accumulator 40. That is, coefficient data K1 to Kn corresponding to each of the coefficient registers 411 to 41n are stored in the coefficient register 411 in the order of a predetermined coefficient value “k1” and the coefficient register 412 in a predetermined coefficient value “k2”. . Along with such an operation, the coefficient data is transferred to the accumulator 40 up to Kn in the order of K1, K2, and K3, and the transferred coefficient data is converted into K1, K2, and K3 by the accumulative addition function of the accumulator 40. Are sequentially accumulated up to Kn. In this way, the accumulator 40 is finally set with the coefficient sum value “」 kn ”that is the value“ k1 + k2 + k3 +... + Kn ”obtained by adding the respective coefficient values“ k1 ”to“ kn ”of the respective coefficient data K1 to Kn. Is done. That is, the same sum data SKn as the sum register 20 in FIG. 2 is set in the accumulator 40, and the accumulator 40 outputs the sum data SKn having the coefficient sum value “Σkn”. According to such an operation, predetermined coefficient data K1 to Kn are set in coefficient registers 411 to 41n, and total sum data SKn obtained by accumulatively adding each coefficient value “k1” to “kn” is set in accumulator 40. When the same filter coefficient as that of the first embodiment is set, a digital filter having the same characteristics as the first embodiment can be realized. Further, with such a configuration, a digital filter whose arbitrary filter characteristics can be set can be realized. In particular, since the coefficient sum value “Σkn” is obtained by accumulative addition by the accumulator 40 in parallel with the setting of each of the coefficient data K1 to Kn, the coefficient sum value is separately calculated every time the filter coefficient is changed. It is not necessary to perform this operation, and the processing for this operation can be reduced.
[0053]
FIGS. 5 and 6 are different from the configuration shown in FIG. 4 described above. However, similarly to the configuration shown in FIG. 4, each coefficient data K1 to Kn input from the outside is stored in each register. FIG. 14 is a block diagram showing another configuration example having a function set to the function.
[0054]
In FIG. 5, the coefficient data K1 to Kn supplied to the coefficient input terminal 33 are transferred to predetermined coefficient registers 411 to 41n, respectively, as in the configuration described in FIG. Coefficient data K1 to Kn are stored. Further, the shift register 50 has a set input for controlling the output of the shift register 50 to be all “1” as compared with the shift register 10 described in FIG. The set input of the shift register 50 is connected to a set input terminal 34 to which an external set command signal is supplied. Further, in the configuration of FIG. 5, instead of the accumulator 40 described in FIG. 4, a sum register 20 is provided as in the configuration described in FIG.
[0055]
That is, when the set command signal is input to the set input terminal 34, all the delay data D1 to Dn from the shift register 50 are output as the value “1”. Therefore, the switches 111 to 11n all select the coefficient register side. Therefore, the output of the adder circuit 12 outputs a value “k1 + k2 + k3 +... + Kn” obtained by adding the respective coefficient values “k1” to “kn”, that is, a coefficient sum value “$ kn”. The sum register 20 captures the coefficient sum value “Σkn” at an appropriate timing, so that the sum register 20 stores the sum data SKn having the coefficient sum value “Σkn” in the same manner as the accumulator 40 shown in FIG. Is set. As described above, the shift register 50 is set at a predetermined timing, and the output of the adder circuit 12 is taken into the sum register 20 at an appropriate timing corresponding to this timing, thereby realizing the same function as the configuration shown in FIG. it can. In addition, as compared with the configuration of FIG. 4, the sum register 20 having a smaller circuit size than the accumulator 40 may be provided, so that the circuit size can be reduced.
[0056]
6, the coefficient data K1 to Kn supplied to the coefficient input terminal 33 are transferred to predetermined coefficient registers 411 to 41n, respectively, as in the configuration described with reference to FIG. Predetermined coefficient data K1 to Kn are stored. Further, the configuration of FIG. 6 is characterized in that switches 421 to 42n as first selection circuits are provided as compared with FIG. Control inputs of the switches 421 to 42n are connected to a coefficient load input terminal 35 to which a coefficient load command signal as a first selection control signal is supplied. Further, delay data D1 to Dn from the shift register 10 are respectively connected to one input of the switches 421 to 42n, and data of a value “1” as one of binary input values is connected to the other input. Is set. In addition, the configuration of FIG. 6 includes a sum register 20 in place of the accumulator 40 described in FIG. 4, similarly to the configurations described in FIGS.
[0057]
That is, when the coefficient load command signal input to the coefficient load input terminal 35 is valid, the switches 421 to 42n all select “1”. Therefore, the switches 111 to 11n as the second selection circuits all select the coefficient register side. Therefore, as in the case of FIG. 5, a value “k1 + k2 + k3 +... + Kn” obtained by adding the respective coefficient values is output to the output of the adding circuit 12. The sum register 20 takes in the value obtained by adding the respective coefficient values at an appropriate timing, so that the sum value of the respective coefficient values “k1 + k2 + k3 +...” Is stored in the sum register 20 similarly to the accumulator 40 shown in FIG. + Kn ”, that is, the sum total data SKn having the coefficient sum value“ $ kn ”is set. As described above, by inputting the coefficient load signal at a predetermined timing and taking in the output of the adder circuit 12 into the sum register 20 at an appropriate timing corresponding to this timing, the same function as the configuration shown in FIG. it can.
[0058]
7 and 8 are based on the configuration described with reference to FIG. 1, and are similar to the configurations shown in FIGS. 5 and 6, in which each coefficient data input from the outside is set in each register. FIG. 16 is a block diagram showing another configuration example having the following.
[0059]
The configuration in FIG. 7 is based on the configuration in FIG. 1 and uses a shift register 50 having a set input for controlling the outputs described in FIG. 5 to output all “1”. In the coefficient registers 411 to 41n, coefficient values “2xk1” to “2xkn” corresponding to twice the filter coefficients are set as coefficient data K1 to Kn from the coefficient input terminal 33. When the set command signal is input to the set input terminal 34, the delay data D1 to Dn from the shift register 50 all output the value "1", and the switches 111 to 11n all select the coefficient register side. Therefore, the output of the addition circuit 12 outputs a value twice as large as the value “k1 + k2 + k3 +... + Kn” obtained by adding the respective coefficient values, that is, a value twice as large as the total coefficient value “$ kn”. The summation register 20 first multiplies a value twice as large as the coefficient summation value "$ kn" by a multiplier 41 for multiplying a constant "1/2", and captures the multiplication result at an appropriate timing. Similarly to the sum register 20 shown in FIG. 1, the sum data SKn having the coefficient sum value “Σkn” is set. As described above, the same functions as those of the configuration shown in FIG. 4 can be realized by the configuration shown in FIG.
[0060]
The configuration in FIG. 8 is based on the configuration in FIG. 1 and includes switches 421 to 42n as first selection circuits, as in FIG. In the coefficient registers 411 to 41n, coefficient values “2xk1” to “2xkn” corresponding to twice the filter coefficients are set as coefficient data K1 to Kn from the coefficient input terminal 33. When a coefficient load command signal as a first selection control signal is input to the coefficient load input terminal 35, the switches 421 to 42n all select the value “1”, and the switches 111 to 42 as the second selection circuit. 11n all select the coefficient register side. Therefore, the output of the adder circuit 12 outputs a value twice as large as the value “k1 + k2 + k3 +... + Kn” obtained by adding the respective coefficient values, that is, a value twice as large as the total coefficient value “$ kn”. The summation register 20 first multiplies a value twice as large as the coefficient summation value "$ kn" by a multiplier 41 for multiplying a constant "1/2", and captures the multiplication result at an appropriate timing. Similarly to the sum register 20 shown in FIG. 1, the sum data SKn having the coefficient sum value “Σkn” is set. In this way, the same function as the configuration shown in FIG. 4 can be realized by the configuration shown in FIG.
[0061]
【The invention's effect】
As described above, according to the digital filter of the present invention, it is possible to suppress an increase in the scale of a circuit constituting the digital filter and obtain accurate output data.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a digital filter according to a first embodiment of the present invention.
FIG. 2 is a block diagram showing a modification of the configuration of the digital filter according to the first embodiment of the present invention;
FIG. 3A is a diagram showing an example in which switches 111 to 11n of FIG. 1 are configured using an AND gate;
(B) A diagram showing an example in which the switches 111 to 11n in FIG. 1 are configured using transfer gates.
FIG. 4 is a block diagram showing a configuration of a digital filter according to a second embodiment of the present invention.
FIG. 5 is a block diagram showing a modification of the configuration of the digital filter according to the second embodiment of the present invention;
FIG. 6 is a block diagram showing another modification of the configuration of the digital filter according to the second embodiment of the present invention;
FIG. 7 is a block diagram showing another modification of the configuration of the digital filter according to the second embodiment of the present invention;
FIG. 8 is a block diagram showing another modification of the configuration of the digital filter according to the second embodiment of the present invention;
FIG. 9 is a block diagram showing a configuration of a digital filter in a conventional example.
[Explanation of symbols]
10,50 shift register
12 Addition circuit
20 sum register
22 Subtractor
23 (2x) multiplier
30 input terminals
31 Output terminal
32 clock terminal
33 Coefficient input terminal
34 set input terminal
35 Coefficient load input terminal
40 accumulator
41 (1/2) Multiplier
80 AND gate
81, 82 transfer gate
83 inverter
100 FIR digital filter
111-11n, 421-42n switch
191-19n, 211-21n, 411-41n Coefficient register
200 offset correction unit

Claims (18)

1ビットで表現される入力データを複数段シフトしながら記憶するシフトレジスタと、
フィルタの伝達特性を決定するフィルタ係数に対応した係数データを、それぞれ記憶する複数個の係数レジスタと、
前記シフトレジスタの各段における遅延データに基づき、前記遅延データが一方の値のときには、その段に対応する前記係数レジスタの係数データの値を選択し、前記遅延データが他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、
前記複数個の選択回路からの各選択データを加算し、加算結果を加算データとして出力する加算回路と、
前記フィルタ係数の総和に対応した総和データを記憶する総和レジスタと、
前記加算データから前記総和データを減算し、減算結果を出力データとして出力する減算器とを備え、
前記それぞれの係数レジスタは、前記フィルタ係数の2倍の値である係数値を係数データとして記憶し、
前記総和レジスタは、前記フィルタ係数の総和値である係数総和値を総和データとして記憶することを特徴とするデジタルフィルタ。
A shift register for storing input data represented by one bit while shifting the data by a plurality of stages;
A plurality of coefficient registers each storing coefficient data corresponding to a filter coefficient for determining a transfer characteristic of the filter;
Based on the delay data in each stage of the shift register, when the delay data has one value, the value of the coefficient data of the coefficient register corresponding to that stage is selected, and when the delay data has the other value, zero is selected. A plurality of selection circuits for selecting the values of
An addition circuit that adds each selection data from the plurality of selection circuits and outputs an addition result as addition data;
A sum register for storing sum data corresponding to the sum of the filter coefficients;
A subtractor that subtracts the sum data from the addition data and outputs the subtraction result as output data,
The respective coefficient registers store a coefficient value that is twice the filter coefficient as coefficient data,
A digital filter, wherein the sum register stores a coefficient sum value, which is a sum value of the filter coefficients, as sum data.
1ビットで表現される入力データを複数段シフトしながら記憶するシフトレジスタと、
フィルタの伝達特性を決定するフィルタ係数に対応した係数データを、それぞれ記憶する複数個の係数レジスタと、
前記シフトレジスタの各段における遅延データに基づき、前記遅延データが一方の値のときには、その段に対応する前記係数レジスタの係数データの値を選択し、前記遅延データが他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、
前記複数個の選択回路からの各選択データを加算し、加算結果を加算データとして出力する加算回路と、
前記加算データを2倍にし、2倍にした前記加算データを掛算データとして出力する掛算器と、
前記フィルタ係数の総和に対応した総和データを記憶する総和レジスタと、
前記掛算データから前記総和データを減算し、減算結果を出力データとして出力する減算器とを備え、
前記それぞれの係数レジスタは、前記フィルタ係数の値である係数値を係数データとして記憶し、
前記総和レジスタは、前記フィルタ係数の総和値である係数総和値を総和データとして記憶することを特徴とするデジタルフィルタ。
A shift register for storing input data represented by one bit while shifting the data by a plurality of stages;
A plurality of coefficient registers each storing coefficient data corresponding to a filter coefficient for determining a transfer characteristic of the filter;
Based on the delay data in each stage of the shift register, when the delay data has one value, the value of the coefficient data of the coefficient register corresponding to that stage is selected, and when the delay data has the other value, zero is selected. A plurality of selection circuits for selecting the values of
An addition circuit that adds each selection data from the plurality of selection circuits and outputs an addition result as addition data;
A multiplier for doubling the addition data and outputting the doubled addition data as multiplication data;
A sum register for storing sum data corresponding to the sum of the filter coefficients;
A subtractor that subtracts the sum data from the multiplied data and outputs a subtraction result as output data;
The respective coefficient registers store a coefficient value that is a value of the filter coefficient as coefficient data,
A digital filter, wherein the sum register stores a coefficient sum value, which is a sum value of the filter coefficients, as sum data.
2値で表現される入力データを入力順に遅延した各遅延データに対して、各遅延に対応したフィルタ係数により重み付け加算し、重み付け加算した結果を加算データとして出力するFIR形デジタルフィルタ部と、
前記FIR形デジタルフィルタ部の加算データから、前記フィルタ係数の総和の2分の1である総和データを、減算するオフセット補正部とを備えたことを特徴とするデジタルフィルタ。
An FIR type digital filter unit that weights and adds the delay data obtained by delaying the input data expressed in binary in the order of input using filter coefficients corresponding to the respective delays and outputs the weighted addition result as addition data;
A digital filter, comprising: an offset correction unit that subtracts, from the addition data of the FIR digital filter unit, total data that is one half of the total sum of the filter coefficients.
2値で表現される入力データを入力順に遅延した各遅延データに対して、各遅延に対応したフィルタ係数により重み付け加算し、重み付け加算した結果のM分の1(Mは0以外の定数)に相当する加算データを出力するFIR形デジタルフィルタ部と、
前記FIR形デジタルフィルタ部の加算データから、前記フィルタ係数の総和の2M分の1(2Mは前記Mの2倍の定数)である総和データを、減算するオフセット補正部とを備えたことを特徴とするデジタルフィルタ。
Weighted addition is performed on each delay data obtained by delaying input data expressed in binary in the order of input by using filter coefficients corresponding to each delay, and the weighted addition is reduced to 1 / M (M is a constant other than 0). An FIR type digital filter unit for outputting corresponding addition data,
An offset correction unit for subtracting, from the addition data of the FIR digital filter unit, total data which is 1 / 2M of the total of the filter coefficients (2M is a constant twice as large as M). And a digital filter.
2値で表現される入力データを複数段シフトしながら記憶するシフトレジスタと、
複数個のフィルタ係数を記憶する複数個の係数レジスタと、
前記シフトレジスタの各段における遅延データに基づき、前記遅延データが一方の値のときには、その段に対応する前記係数レジスタのフィルタ係数の値を選択し、前記遅延データが他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、
前記複数個の選択回路からの各選択データを加算し、加算結果を加算データとして出力する加算回路と、
前記複数個の係数レジスタに記憶した各フィルタ係数の総和の2分の1の値を総和データとして記憶する総和レジスタと、
前記加算データから前記総和データを減算し、減算結果を出力データとして出力する減算器とを備えたことを特徴とするデジタルフィルタ。
A shift register for storing input data represented by binary values while shifting the data by a plurality of stages;
A plurality of coefficient registers for storing a plurality of filter coefficients;
Based on the delay data in each stage of the shift register, when the delay data has one value, the value of the filter coefficient of the coefficient register corresponding to that stage is selected, and when the delay data has the other value, zero. A plurality of selection circuits for selecting the values of
An addition circuit that adds each selection data from the plurality of selection circuits and outputs an addition result as addition data;
A sum register for storing a half value of the sum of the filter coefficients stored in the plurality of coefficient registers as sum data;
A digital filter, comprising: a subtractor that subtracts the sum data from the added data and outputs a result of the subtraction as output data.
2値で表現される入力データを複数段シフトしながら記憶するシフトレジスタと、
複数個のフィルタ係数を記憶する複数個の係数レジスタと、
前記シフトレジスタの各段における遅延データに基づき、前記遅延データが一方の値のときには、その段に対応する前記係数レジスタのフィルタ係数の値を選択し、前記遅延データが他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、
前記複数個の選択回路からの各選択データを加算し、加算結果のM分の1(Mは0以外の定数)に相当する値を加算データとして出力する加算回路と、
前記複数個の係数レジスタに記憶した各フィルタ係数の総和の2M分の1(2Mは前記Mの2倍の定数)の値を総和データとして記憶する総和レジスタと、
前記加算データから前記総和データを減算し、減算結果を出力データとして出力する減算器とを備えたことを特徴とするデジタルフィルタ。
A shift register for storing input data represented by binary values while shifting the data by a plurality of stages;
A plurality of coefficient registers for storing a plurality of filter coefficients;
Based on the delay data in each stage of the shift register, when the delay data has one value, the value of the filter coefficient of the coefficient register corresponding to that stage is selected, and when the delay data has the other value, zero. A plurality of selection circuits for selecting the values of
An addition circuit for adding each selection data from the plurality of selection circuits and outputting a value corresponding to 1 / M (M is a constant other than 0) of the addition result as addition data;
A sum register that stores a value of 1 / 2M (2M is a constant twice the M) of the sum of the filter coefficients stored in the plurality of coefficient registers as sum data;
A digital filter, comprising: a subtractor that subtracts the sum data from the added data and outputs a result of the subtraction as output data.
前記M分の1、および前記2M分の1におけるMは、2のa乗(aは整数)であり、それぞれのデータに対するビットシフトにより行なわれることを特徴とする請求項4または請求項6記載のデジタルフィルタ。7. The method according to claim 4, wherein M in said 1 / M and 1 in 2M is a power of 2 (a is an integer), and is performed by bit shifting each data. Digital filter. 前記2値で表現される入力データは、1ビットで表現される入力データであることを特徴とする請求項3から7までのいずれか一項に記載のデジタルフィルタ。The digital filter according to claim 3, wherein the input data represented by the binary is input data represented by one bit. 入力データを入力する入力端子と、
複数個のフィルタ係数を入力する係数入力端子と、
前記入力端子に供給された1ビットで表現される入力データを、複数段シフトしながら記憶するシフトレジスタと、
前記係数入力端子に供給された前記複数個のフィルタ係数を、それぞれに記憶する複数個の係数レジスタと、
前記シフトレジスタの各段における遅延データに基づき、前記遅延データが一方の値のときには、その段に対応する前記係数レジスタのフィルタ係数の値を選択し、前記遅延データが他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、
前記複数個の選択回路からの各選択データを加算し、加算結果に対応した値を加算データとして出力する加算回路と、
前記係数入力端子に供給された前記複数個のフィルタ係数を、前記複数個分だけ累積加算し、累積加算した結果に対応した値を総和データとして出力するアキュムレータと、
前記加算データから前記総和データを減算し、減算結果を出力データとして出力する減算器と、
前記出力データを出力する出力端子とを備えたことを特徴とするデジタルフィルタ。
An input terminal for inputting input data,
A coefficient input terminal for inputting a plurality of filter coefficients,
A shift register for storing input data represented by 1 bit supplied to the input terminal while shifting the data by a plurality of stages;
A plurality of coefficient registers each storing the plurality of filter coefficients supplied to the coefficient input terminal,
Based on the delay data in each stage of the shift register, when the delay data has one value, the value of the filter coefficient of the coefficient register corresponding to that stage is selected, and when the delay data has the other value, zero. A plurality of selection circuits for selecting the values of
An addition circuit that adds each selection data from the plurality of selection circuits and outputs a value corresponding to the addition result as addition data;
An accumulator that cumulatively adds the plurality of filter coefficients supplied to the coefficient input terminal by the plurality, and outputs a value corresponding to a result of the cumulative addition as total data;
A subtractor that subtracts the sum data from the addition data and outputs the subtraction result as output data;
An output terminal for outputting the output data.
前記加算回路は、前記各選択データを加算し、加算結果のM分の1(Mは0以外の定数)に相当する値を加算データとして出力し、
前記アキュムレータは、前記供給された複数個のフィルタ係数を、前記複数個分だけ累積加算し、累積加算した結果の2M分の1(2Mは前記Mの2倍の定数)の値を総和データとして出力することを特徴とする請求項9記載のデジタルフィルタ。
The addition circuit adds the selected data and outputs a value corresponding to 1 / M (M is a constant other than 0) of the addition result as addition data,
The accumulator accumulates the supplied plurality of filter coefficients by the number of accumulators, and sets a value of 1 / 2M (2M is a constant of twice the M) of a result of the accumulative addition as total data. 10. The digital filter according to claim 9, wherein the digital filter outputs.
前記加算回路は、前記各選択データを加算し、加算結果のM分の1(Mは0以外の定数)に相当する値を加算データとして出力し、
前記アキュムレータは、前記供給された複数個のフィルタ係数の2M分の1(2Mは前記Mの2倍の定数)の値を、前記複数個分だけ累積加算し、累積加算した結果の値を総和データとして出力することを特徴とする請求項9記載のデジタルフィルタ。
The addition circuit adds the selected data and outputs a value corresponding to 1 / M (M is a constant other than 0) of the addition result as addition data,
The accumulator accumulatively adds a value of 1 / 2M (2M is a constant twice the M) of the supplied plurality of filter coefficients for the plurality of filter coefficients, and sums a value of a result of the accumulative addition. The digital filter according to claim 9, wherein the digital filter outputs data.
入力データを入力する入力端子と、
複数個のフィルタ係数を入力する係数入力端子と、
前記入力端子に供給された1ビットで表現される入力データを、複数段シフトしながら記憶するシフトレジスタと、
前記係数入力端子に供給された前記複数個のフィルタ係数を、それぞれに記憶する複数個の係数レジスタと、
前記シフトレジスタの各段における遅延データに基づき、前記遅延データが一方の値のときには、その段に対応する前記係数レジスタのフィルタ係数の値を選択し、前記遅延データが他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、
前記複数個の選択回路からの各選択データを加算し、加算結果に対応した値を加算データとして出力する加算回路と、
前記加算回路からの加算データを、所定のタイミングで取り込み、記憶し、前記取り込んだ加算データに対応した値を総和データとして出力する総和レジスタと、
前記加算データから前記総和データを減算し、減算結果を出力データとして出力する減算器と、
前記出力データを出力する出力端子とを備え、
前記シフトレジスタは、セット指令信号が入力されることにより、前記遅延データを出力するすべての段から、前記一方の値を出力するセット入力を有し、
前記総和レジスタは、前記シフトレジスタのセット入力に前記セット指令信号が入力されるタイミングに応じて、前記加算データを取り込むことを特徴とするデジタルフィルタ。
An input terminal for inputting input data,
A coefficient input terminal for inputting a plurality of filter coefficients,
A shift register for storing input data represented by 1 bit supplied to the input terminal while shifting the data by a plurality of stages;
A plurality of coefficient registers each storing the plurality of filter coefficients supplied to the coefficient input terminal,
Based on the delay data in each stage of the shift register, when the delay data has one value, the value of the filter coefficient of the coefficient register corresponding to that stage is selected, and when the delay data has the other value, zero. A plurality of selection circuits for selecting the values of
An addition circuit that adds each selection data from the plurality of selection circuits and outputs a value corresponding to the addition result as addition data;
A sum register for fetching the addition data from the addition circuit at a predetermined timing, storing the sum data, and outputting a value corresponding to the fetched addition data as sum data;
A subtractor that subtracts the sum data from the addition data and outputs the subtraction result as output data;
An output terminal for outputting the output data,
The shift register has a set input that outputs the one value from all stages that output the delayed data when a set command signal is input,
The digital filter, wherein the sum register takes in the addition data in accordance with a timing at which the set command signal is input to a set input of the shift register.
前記加算回路は、前記各選択データを加算し、加算結果のM分の1(Mは0以外の定数)に相当する値を加算データとして出力し、
前記総和レジスタは、前記所定のタイミングで取り込んだ加算データの2M分の1(2Mは前記Mの2倍の定数)の値を総和データとして出力することを特徴とする請求項12記載のデジタルフィルタ。
The addition circuit adds the selected data and outputs a value corresponding to 1 / M (M is a constant other than 0) of the addition result as addition data,
13. The digital filter according to claim 12, wherein the sum register outputs a value of 1/2 M (2M is a constant twice as large as M) of the added data fetched at the predetermined timing as sum data. .
入力データを入力する入力端子と、
複数個のフィルタ係数を入力する係数入力端子と、
前記入力端子に供給された1ビットで表現される、一方、または他方の値を有した入力データを、複数段シフトしながら記憶するシフトレジスタと、
選択制御のための第1の選択制御信号を入力し、前記第1の選択制御信号に基づき、前記第1の選択制御信号が無効のときには、その段に対応する前記シフトレジスタの遅延データの値を選択し、前記第1の選択制御信号が有効のときには、前記一方の値を選択し、それぞれに選択した値を第2の選択制御信号として出力する複数個の第1の選択回路と、
前記係数入力端子に供給された前記複数個のフィルタ係数を、それぞれに記憶する複数個の係数レジスタと、
前記第2の選択制御信号に基づき、前記第2の選択制御信号が一方の値のときには、その段に対応する前記係数レジスタのフィルタ係数の値を選択し、前記第2の選択制御信号が他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の第2の選択回路と、
前記複数個の第2の選択回路からの各選択データを加算し、加算結果に対応した値を加算データとして出力する加算回路と、
前記加算回路からの加算データを、所定のタイミングで取り込み、記憶し、前記取り込んだ加算データに対応した値を総和データとして出力する総和レジスタと、
前記加算データから前記総和データを減算し、減算結果を出力データとして出力する減算器と、
前記出力データを出力する出力端子とを備え、
前記総和レジスタは、前記第1の選択制御信号が有効とされるタイミングに応じて前記加算データを取り込むことを特徴とするデジタルフィルタ。
An input terminal for inputting input data,
A coefficient input terminal for inputting a plurality of filter coefficients,
A shift register for storing input data represented by one bit supplied to the input terminal and having one or the other value while shifting the data by a plurality of stages;
A first selection control signal for selection control is input, and when the first selection control signal is invalid based on the first selection control signal, the value of the delay data of the shift register corresponding to that stage And when the first selection control signal is valid, a plurality of first selection circuits for selecting one of the values and outputting the selected value as a second selection control signal,
A plurality of coefficient registers each storing the plurality of filter coefficients supplied to the coefficient input terminal,
When the second selection control signal has one value based on the second selection control signal, the value of the filter coefficient of the coefficient register corresponding to that stage is selected, and the second selection control signal is set to the other value. A plurality of second selection circuits for selecting a value of zero and outputting the selected value as selection data,
An addition circuit that adds each selected data from the plurality of second selection circuits and outputs a value corresponding to the addition result as addition data;
A sum register for fetching the addition data from the addition circuit at a predetermined timing, storing the sum data, and outputting a value corresponding to the fetched addition data as sum data;
A subtractor that subtracts the sum data from the addition data and outputs the subtraction result as output data;
An output terminal for outputting the output data,
The digital filter according to claim 1, wherein the sum register takes in the addition data in accordance with a timing at which the first selection control signal becomes valid.
前記加算回路は、前記各選択データを加算し、加算結果のM分の1(Mは0以外の定数)に相当する値を加算データとして出力し、
前記総和レジスタは、前記所定のタイミングで取り込んだ加算データの2M分の1(2Mは前記Mの2倍の定数)の値を総和データとして出力することを特徴とする請求項14記載のデジタルフィルタ。
The addition circuit adds the selected data and outputs a value corresponding to 1 / M (M is a constant other than 0) of the addition result as addition data,
15. The digital filter according to claim 14, wherein the sum register outputs a value of 1 / 2M (2M is a constant twice as large as M) of the added data acquired at the predetermined timing as the sum data. .
入力データを入力する入力端子と、
フィルタの伝達特性を決定する複数個のフィルタ係数を入力する係数入力端子と、
前記入力端子に供給された1ビットで表現される入力データを複数段シフトしながら記憶するシフトレジスタと、
前記係数入力端子に供給された前記複数個のフィルタ係数の2倍の値である係数値を係数データとして、それぞれ記憶する複数個の係数レジスタと、
前記シフトレジスタの各段における遅延データに基づき、前記遅延データが一方の値のときには、その段に対応する前記係数レジスタの係数データの値を選択し、前記遅延データが他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の選択回路と、
前記複数個の選択回路からの各選択データを加算し、加算結果を加算データとして出力する加算回路と、
前記加算回路からの加算データの2分の1の値を、所定のタイミングで取り込み、記憶し、前記取り込んだ加算データの値を総和データとして出力する総和レジスタと、
前記加算データから前記総和データを減算し、減算結果を出力データとして出力する減算器とを備え、
前記シフトレジスタは、セット指令信号が入力されることにより、前記遅延データを出力するすべての段から、前記一方の値を出力するセット入力を有し、
前記総和レジスタは、前記シフトレジスタのセット入力にセット指令信号が入力されるタイミングに応じて前記加算データの2分の1の値を取り込むことを特徴とするデジタルフィルタ。
An input terminal for inputting input data,
A coefficient input terminal for inputting a plurality of filter coefficients for determining a transfer characteristic of the filter,
A shift register for storing input data represented by 1 bit supplied to the input terminal while shifting the data by a plurality of stages;
A plurality of coefficient registers each storing a coefficient value that is twice the value of the plurality of filter coefficients supplied to the coefficient input terminal as coefficient data,
Based on the delay data in each stage of the shift register, when the delay data has one value, the value of the coefficient data of the coefficient register corresponding to that stage is selected, and when the delay data has the other value, zero is selected. A plurality of selection circuits for selecting the values of
An addition circuit that adds each selection data from the plurality of selection circuits and outputs an addition result as addition data;
A sum register that captures and stores a half value of the addition data from the addition circuit at a predetermined timing, and outputs the value of the captured addition data as total data;
A subtractor that subtracts the sum data from the addition data and outputs the subtraction result as output data,
The shift register has a set input that outputs the one value from all stages that output the delayed data when a set command signal is input,
A digital filter, wherein the sum register takes in a half value of the added data in accordance with a timing at which a set command signal is input to a set input of the shift register.
入力データを入力する入力端子と、
フィルタの伝達特性を決定する複数個のフィルタ係数を入力する係数入力端子と、
前記入力端子に供給された1ビットで表現される、一方、または他方の値を有した入力データを、複数段シフトしながら記憶するシフトレジスタと、
選択制御のための第1の選択制御信号を入力し、前記第1の選択制御信号に基づき、前記第1の選択制御信号が無効のときには、その段に対応する前記シフトレジスタの遅延データの値を選択し、前記第1の選択制御信号が有効のときには、前記一方の値を選択し、それぞれに選択した値を第2の選択制御信号として出力する複数個の第1の選択回路と、
前記係数入力端子に供給された前記複数個のフィルタ係数の2倍の値である係数値を係数データとして、それぞれ記憶する複数個の係数レジスタと、
前記第2の選択制御信号に基づき、前記第2の選択制御信号が一方の値のときには、その段に対応する前記係数レジスタの値を選択し、前記第2の選択制御信号が他方の値のときには、ゼロの値を選択し、それぞれに選択した値を選択データとして出力する複数個の第2の選択回路と、
前記複数個の第2の選択回路からの各選択データを加算し、加算結果を加算データとして出力する加算回路と、
前記加算回路からの加算データの2分の1の値を、所定のタイミングで取り込み、記憶し、前記取り込んだ加算データの値を総和データとして出力する総和レジスタと、
前記加算データから前記総和データを減算し、減算結果を出力データとして出力する減算器とを備え、
前記総和レジスタは、前記第1の選択制御信号が有効とされるタイミングに応じて前記加算データの2分の1の値を取り込むことを特徴とするデジタルフィルタ。
An input terminal for inputting input data,
A coefficient input terminal for inputting a plurality of filter coefficients for determining a transfer characteristic of the filter,
A shift register for storing input data represented by one bit supplied to the input terminal and having one or the other value while shifting the data by a plurality of stages;
A first selection control signal for selection control is input, and when the first selection control signal is invalid based on the first selection control signal, the value of the delay data of the shift register corresponding to that stage And when the first selection control signal is valid, a plurality of first selection circuits for selecting one of the values and outputting the selected value as a second selection control signal,
A plurality of coefficient registers each storing a coefficient value that is twice the value of the plurality of filter coefficients supplied to the coefficient input terminal as coefficient data,
When the second selection control signal has one value based on the second selection control signal, the value of the coefficient register corresponding to the stage is selected, and the second selection control signal is set to the other value. Sometimes, a plurality of second selection circuits that select a value of zero and output the selected value as selection data,
An addition circuit that adds the respective selection data from the plurality of second selection circuits and outputs an addition result as addition data;
A sum register that captures and stores a half value of the addition data from the addition circuit at a predetermined timing, and outputs the value of the captured addition data as total data;
A subtractor that subtracts the sum data from the addition data and outputs the subtraction result as output data,
A digital filter, wherein the sum register takes in a half value of the added data in accordance with a timing at which the first selection control signal becomes valid.
2値で表現される入力データを入力順に遅延した各遅延データに対して、各遅延に対応したフィルタ係数により重み付け加算し、重み付け加算した結果のM分の1(Mは0以外の定数)に相当する加算データを導出するステップと、
前記加算データから、前記フィルタ係数の総和の2M分の1(2Mは前記Mの2倍の定数)である総和データを、減算するステップとを備えたことを特徴とするデジタルフィルタ演算方法。
Weighted addition is performed on each delay data obtained by delaying input data expressed in binary in the order of input by using filter coefficients corresponding to each delay, and the weighted addition is reduced to 1 / M (M is a constant other than 0). Deriving the corresponding summation data;
Subtracting, from the added data, total data that is 1/2 M of the total of the filter coefficients (2M is a constant twice as large as M).
JP2003078027A 2003-03-20 2003-03-20 Digital filter Pending JP2004289417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003078027A JP2004289417A (en) 2003-03-20 2003-03-20 Digital filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003078027A JP2004289417A (en) 2003-03-20 2003-03-20 Digital filter

Publications (1)

Publication Number Publication Date
JP2004289417A true JP2004289417A (en) 2004-10-14

Family

ID=33292633

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003078027A Pending JP2004289417A (en) 2003-03-20 2003-03-20 Digital filter

Country Status (1)

Country Link
JP (1) JP2004289417A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100907961B1 (en) 2006-09-28 2009-07-16 야마하 가부시키가이샤 Digital filter
JP2012160907A (en) * 2011-01-31 2012-08-23 Icom Inc Digital filter, radio apparatus, filtering method and program
KR101301857B1 (en) * 2006-07-11 2013-08-29 삼성전자주식회사 Programmable finite impulse response filter and design method thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101301857B1 (en) * 2006-07-11 2013-08-29 삼성전자주식회사 Programmable finite impulse response filter and design method thereof
KR100907961B1 (en) 2006-09-28 2009-07-16 야마하 가부시키가이샤 Digital filter
JP2012160907A (en) * 2011-01-31 2012-08-23 Icom Inc Digital filter, radio apparatus, filtering method and program

Similar Documents

Publication Publication Date Title
EP1081863B1 (en) Delta-sigma modulator with two-step quantization, and method for using two-step quantization in delta-sigma modulation
JP3337722B2 (en) Digital interpolator
US5345233A (en) Digital Σ-Δ modulator
US20060255992A1 (en) Multibit delta sigma modulation da converter
KR100611702B1 (en) Digital filter device and filter processing method thereof
JP3636130B2 (en) Trellis type noise shaping modulator
JP2004120182A (en) Decimation filter and interpolation filter
JP2004289417A (en) Digital filter
JP4067548B2 (en) Digital signal processing apparatus and audio signal reproduction apparatus
US6151613A (en) Digital filter and method for a MASH delta-sigma modulator
JP3131429U (en) Sigma Delta circuit
US6486813B1 (en) Oversampling circuit digital/analog converter
JP3833884B2 (en) Digital filter
JP2005020554A (en) Digital filter
JP3226660B2 (en) Digital ΔΣ modulator
EP1681769B1 (en) Integrated circuit containing a delta-sigma modulator with two-step quantization
JP3949560B2 (en) High-speed oversampling modulation circuit
JPH0613906A (en) Sigma-delta modulator
JP4128109B2 (en) Digital signal processor
JP2022115280A (en) Analog-digital conversion circuit, analog-digital conversion device, analog-digital conversion method, and program
JP2009065515A (en) Digital filter
JPH04150416A (en) D/a converter
JP2002009624A (en) Digital σδ modulator
JP2001345703A (en) Digital-to-analog converter and digital-to-analog converting method
JP2012085177A (en) Decimator circuit, and operation method for decimator circuit