JP2008085923A - Digital filter - Google Patents

Digital filter Download PDF

Info

Publication number
JP2008085923A
JP2008085923A JP2006266139A JP2006266139A JP2008085923A JP 2008085923 A JP2008085923 A JP 2008085923A JP 2006266139 A JP2006266139 A JP 2006266139A JP 2006266139 A JP2006266139 A JP 2006266139A JP 2008085923 A JP2008085923 A JP 2008085923A
Authority
JP
Japan
Prior art keywords
filter
calculation
coefficient
filter processing
processing
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
JP2006266139A
Other languages
Japanese (ja)
Inventor
Naotoshi Nishioka
直俊 西岡
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2006266139A priority Critical patent/JP2008085923A/en
Priority to KR1020070096785A priority patent/KR100907961B1/en
Priority to CN2007101515518A priority patent/CN101154937B/en
Publication of JP2008085923A publication Critical patent/JP2008085923A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0223Computation saving measures; Accelerating measures
    • H03H17/0227Measures concerning the coefficients
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0223Computation saving measures; Accelerating measures
    • H03H17/0233Measures concerning the signal representation
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0223Computation saving measures; Accelerating measures
    • H03H17/0238Measures concerning the arithmetic used
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H21/00Adaptive networks
    • H03H21/0012Digital adaptive filters

Abstract

<P>PROBLEM TO BE SOLVED: To cause a digital filter to make computation with an accuracy of computation adapted to conditions of an execution of filtering-processing and avoid needless electrical power consumption. <P>SOLUTION: Filter coefficients in a coefficient storing section 200 are rewritable via an interface 300 under control of a coefficient rewriting control section 401. Data path section 100 executes computation for applying filtering-processing using the filter coefficients in the coefficient storing section 200 to an input audio sample x(n). A filtering-processing control section 402 is means for controlling computation of the data path section 100, and makes selection of whether the single precision arithmetic or double precision arithmetic is to be executed in dependence on the filter coefficient stored in the coefficient storing section 200. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

この発明は、オーディオ機器等に好適なデジタルフィルタに関する。   The present invention relates to a digital filter suitable for audio equipment and the like.

デジタルフィルタは、集積回路化が可能であり、小型化、低価格化、高信頼化を実現できるとともに、フィルタ特性をソフトウェア処理によって容易に調整することができる等、アナログフィルタと比較して多くの利点を有している。このデジタルフィルタは、例えば所望のフィルタ処理を実行するようにプログラムされたDSP(Digital Signal Processor;デジタル信号処理装置)により実現される。そして、最近では、フィルタ処理に用いるフィルタ係数をユーザが自由に書き換えることができるような構成のデジタルフィルタが提供されている。   Digital filters can be integrated circuits, and can be downsized, priced, and highly reliable, and filter characteristics can be easily adjusted by software processing. Has advantages. This digital filter is realized by, for example, a DSP (Digital Signal Processor) programmed to execute desired filter processing. Recently, a digital filter having a configuration in which a user can freely rewrite filter coefficients used for filter processing has been provided.

図10は、この種のデジタルフィルタの機能構成を示すブロック図である。このデジタルフィルタは、この3バンドイコライザとして機能するようにプログラムされたDSPにより構成されている。ここで、3バンドイコライザは、各々IIR(Infinite Impulse Response)フィルタにより構成されたイコライザEQ0、EQ1およびEQ2をバイクワッド縦続接続してなるものであり、入力オーディオサンプルx(n)に所望の周波数特性を与えて出力オーディオサンプルy(n)として出力する。なお、このようなイコライザ用のIIRフィルタに関しては例えば特許文献1に開示されている。そして、図10に示すデジタルフィルタは、3バンドイコライザとしての機能を営むために、各サンプリング周期において、図示の遅延処理901〜912と、乗算処理921〜936と、加算処理941〜943とを実行する。   FIG. 10 is a block diagram showing a functional configuration of this type of digital filter. This digital filter is composed of a DSP programmed to function as this three-band equalizer. Here, the 3-band equalizer is formed by cascading equalizers EQ0, EQ1, and EQ2 each configured by an IIR (Infinite Impulse Response) filter, and has a desired frequency characteristic for an input audio sample x (n). Is output as an output audio sample y (n). Such an IIR filter for an equalizer is disclosed in Patent Document 1, for example. The digital filter shown in FIG. 10 performs the illustrated delay processing 901 to 912, multiplication processing 921 to 936, and addition processing 941 to 943 in each sampling period in order to serve as a three-band equalizer. To do.

各サンプリング周期において、乗算処理921〜935では、遅延処理901〜911の出力信号値dEQ00等に対し、図示のフィルタ係数cEQ00等を各々乗算する。また、各サンプリング周期において、加算処理941では、乗算処理921〜925の各出力値を加算し、加算処理942では、乗算処理926〜930の各出力値を加算し、加算処理943では、乗算処理931〜935の各出力値を加算する。これにより加算処理941〜943の出力値として、下記式(1)〜(3)に示す信号値dEQ10、dEQ20およびdEQ30が算出され、次のサンプリング周期への切り換わりの際には、この算出結果に合わせて信号値の更新が行われる。
dEQ10
=cEQ00×dEQ00+cEQ01×dEQ01+cEQ02×dEQ02
+cEQ03×dEQ10+cEQ04×dEQ11 ……(1)
dEQ20
=cEQ10×dEQ10+cEQ11×dEQ11+cEQ12×dEQ12
+cEQ13×dEQ20+cEQ14×dEQ21 ……(2)
dEQ30
=cEQ20×dEQ20+cEQ21×dEQ21+cEQ22×dEQ22
+cEQ23×dEQ30+cEQ24×dEQ31 ……(3)
In each sampling period, the multiplication processes 921 to 935 multiply the output signal values dEQ00 and the like of the delay processes 901 to 911 by the illustrated filter coefficient cEQ00 and the like, respectively. In each sampling cycle, the output value of the multiplication processes 921 to 925 is added in the addition process 941, the output values of the multiplication processes 926 to 930 are added in the addition process 942, and the multiplication process is performed in the addition process 943. Each output value of 931-935 is added. As a result, signal values dEQ10, dEQ20, and dEQ30 shown in the following equations (1) to (3) are calculated as output values of the addition processes 941 to 943, and this calculation result is obtained when switching to the next sampling period. The signal value is updated at the same time.
dEQ10
= CEQ00 * dEQ00 + cEQ01 * dEQ01 + cEQ02 * dEQ02
+ CEQ03 × dEQ10 + cEQ04 × dEQ11 (1)
dEQ20
= CEQ10 x dEQ10 + cEQ11 x dEQ11 + cEQ12 x dEQ12
+ CEQ13 × dEQ20 + cEQ14 × dEQ21 (2)
dEQ30
= CEQ20 x dEQ20 + cEQ21 x dEQ21 + cEQ22 x dEQ22
+ CEQ23 × dEQ30 + cEQ24 × dEQ31 (3)

図11は、図10に示すイコライザEQx(x=0〜2)のうちの1個のフィルタ特性を模式的に示したものである。図11に示すように、1個のイコライザEQxのフィルタ特性は、通過させる信号のゲインが最大となるピーク周波数f0、同ピーク周波数f0におけるゲインG、周波数選択の鋭さを示すキューQにより特定される。そして、第xバンド(x=0〜2)のイコライザEQxの目標とするピーク周波数f0、ゲインGおよびキューQが与えられた場合、同イコライザEQxに用いるフィルタ係数cEQx0、cEQx1、cEQx2、cEQx3、cEQx4は、次式により演算される。
cEQx0=(1+α×A)/β ……(4)
cEQx1=−2×(cosω)/β ……(5)
cEQx2=(1−α×A)/β ……(6)
cEQx3=2×(cosω)/β ……(7)
cEQx4=−(1−α/A)/β ……(8)
FIG. 11 schematically shows a filter characteristic of one of the equalizers EQx (x = 0 to 2) shown in FIG. As shown in FIG. 11, the filter characteristic of one equalizer EQx is specified by the peak frequency f0 at which the gain of the signal to be passed is maximized, the gain G at the peak frequency f0, and the queue Q indicating the sharpness of frequency selection. . When the target peak frequency f0, gain G, and queue Q of the equalizer EQx in the x-th band (x = 0 to 2) are given, the filter coefficients cEQx0, cEQx1, cEQx2, cEQx3, cEQx4 used for the equalizer EQx Is calculated by the following equation.
cEQx0 = (1 + α × A) / β (4)
cEQx1 = −2 × (cosω) / β (5)
cEQx2 = (1−α × A) / β (6)
cEQx3 = 2 × (cosω) / β (7)
cEQx4 =-(1-α / A) / β (8)

ただし、A、ω、α、βは、次の通りである。また、下記においてFsはサンプリング周波数である。
A=10^(G/40) ……(9)
ω=(2×π×f0)/Fs ……(10)
α=(sinω)/(2Q) ……(11)
β=1+(α/A) ……(12)
However, A, ω, α, and β are as follows. In the following, Fs is a sampling frequency.
A = 10 ^ (G / 40) (9)
ω = (2 × π × f0) / Fs (10)
α = (sin ω) / (2Q) (11)
β = 1 + (α / A) (12)

ユーザは、イコライザEQx(x=0〜2)の各々に関して、例えばパーソナルコンピュータ等を用いて、所望のピーク周波数f0、ゲインGおよびキューQに基づいてフィルタ係数cEQx0、cEQx1、cEQx2、cEQx3およびcEQx4を算出し、デジタルフィルタの係数記憶部に書き込むことができる。この係数書き込みが行われると、以後、デジタルフィルタは、係数記憶部に書き込まれたフィルタ係数を用いて上記式(1)〜(3)の演算を行う3バンドイコライザとして機能する。   For each of the equalizers EQx (x = 0 to 2), the user sets the filter coefficients cEQx0, cEQx1, cEQx2, cEQx3, and cEQx4 based on a desired peak frequency f0, gain G, and queue Q, for example. It can be calculated and written to the coefficient storage unit of the digital filter. When this coefficient writing is performed, the digital filter functions as a three-band equalizer that performs the calculations of the above formulas (1) to (3) using the filter coefficients written in the coefficient storage unit.

さて、上記式(1)〜(3)に含まれる乗算処理、すなわち、図10における乗算処理921〜936は、DSP内の乗算器を時分割制御の下で用いることにより実行される。また、上記式(1)〜(3)に含まれる加算処理、すなわち、図10における加算処理941〜943は、DSP内の加算器を時分割制御の下で用いることにより実行される。ここで、DSP内の乗算器や加算器は、有限のビット幅のデータを取り扱うものであるため、どうしても演算の際に誤差が発生する。この演算誤差が大きいと、3バンドイコライザの特性として、要求仕様(例えばピーク周波数f0、ゲインGおよびキューQ)を満たすものが得られない可能性がある。また、特に図10に示す3バンドイコライザのようなIIRフィルタにより構成されたデジタルフィルタは、FIR(Finite Impulse Response;有限インパルス応答)フィルタに比べて演算量が少ないという利点を有する一方、演算誤差が大きいと、リミットサイクルと呼ばれる発振現象を引き起こす場合がある。   Now, the multiplication processes included in the above formulas (1) to (3), that is, the multiplication processes 921 to 936 in FIG. 10, are executed by using a multiplier in the DSP under time division control. Further, the addition processes included in the above formulas (1) to (3), that is, the addition processes 941 to 943 in FIG. 10, are executed by using adders in the DSP under time division control. Here, since multipliers and adders in the DSP handle data of a finite bit width, an error is inevitably generated in the calculation. If this calculation error is large, it may not be possible to obtain a three-band equalizer that satisfies the required specifications (for example, peak frequency f0, gain G, and queue Q). In particular, a digital filter constituted by an IIR filter such as a three-band equalizer shown in FIG. 10 has an advantage that the amount of calculation is smaller than that of an FIR (Finite Impulse Response) filter, while the calculation error is small. If it is large, an oscillation phenomenon called a limit cycle may be caused.

ところが、要求仕様の不充足、リミットサイクルの発生等の不具合が発生するか否かの分かれ目となる演算精度は、一定ではなく、如何なるフィルタ処理を実行するかに依存する。例えば図10に示されるようなIIRフィルタの場合、通過帯域の中心となるピーク周波数f0が高い場合には演算精度をそれ程高くしなくても不具合は発生しないが、ピーク周波数f0が低い場合には演算精度を高くしないと不具合が発生する傾向がある。従って、様々な条件(例えばピーク周波数f0)でDSPにフィルタ処理を実行させる場合には、それらの各条件で実行されるフィルタ処理のうち、不具合を発生させないために必要とされる演算精度が最も高いもの、すなわち、ワーストケースでの演算精度を求め、その演算精度が確保されるようにする必要がある。   However, the calculation accuracy, which is the difference between whether or not a failure such as a lack of requirement specifications or a limit cycle occurs, is not constant and depends on what filter processing is executed. For example, in the case of an IIR filter as shown in FIG. 10, when the peak frequency f0 that is the center of the passband is high, no problem occurs even if the calculation accuracy is not so high, but when the peak frequency f0 is low. If the calculation accuracy is not increased, problems tend to occur. Therefore, when the DSP performs filter processing under various conditions (for example, the peak frequency f0), the calculation accuracy required to prevent the occurrence of malfunctions is the highest among the filter processing executed under these conditions. It is necessary to obtain a high calculation accuracy in the worst case, that is, to ensure the calculation accuracy.

このようなワーストケースを考慮したデジタルフィルタの設計手法として、従来、2つの方法があった。第1の方法は、DSPの演算器のハードウェア本来の演算精度、より具体的には乗算器や加算器のビット幅をワーストケースにおいて必要とされるものに合わせる設計手法である。   Conventionally, there are two methods for designing a digital filter in consideration of such a worst case. The first method is a design method that matches the original calculation accuracy of the DSP arithmetic unit, more specifically, the bit width of the multiplier or adder to what is required in the worst case.

第2の方法は、第1の方法のようにDSPのハードウェアの構成をワーストケースに合わせて最適化するのではなく、ワーストケースでは倍精度演算を演算器に実行させ、ワーストケースにおいて必要な演算精度を確保する手法である。例えば前掲図10の3バンドイコライザにおいて、ワーストケースを想定すると、DSPの乗算器や加算器の本来の演算精度では、必要な演算精度に満たない場合、この第2の方法では、DSPに下記式(13)〜(15)に示す倍精度演算を実行させ、必要な演算精度を得る。
dEQ10
=cEQ00×dEQ00L+cEQ01×dEQ01L+cEQ02×dEQ02L
+cEQ03×dEQ10L+cEQ04×dEQ11L
+cEQ00×dEQ00U+cEQ01×dEQ01U+cEQ02×dEQ02U
+cEQ03×dEQ10U+cEQ04×dEQ11U ……(13)
dEQ20
=cEQ10×dEQ10L+cEQ11×dEQ11L+cEQ12×dEQ12L
+cEQ13×dEQ20L+cEQ14×dEQ21L
+cEQ10×dEQ10U+cEQ11×dEQ11U+cEQ12×dEQ12U
+cEQ13×dEQ20U+cEQ14×dEQ21U ……(14)
dEQ30
=cEQ20×dEQ20L+cEQ21×dEQ21L+cEQ22×dEQ22L
+cEQ23×dEQ30L+cEQ24×dEQ31L
+cEQ20×dEQ20U+cEQ21×dEQ21U+cEQ22×dEQ22U
+cEQ23×dEQ30U+cEQ24×dEQ31U ……(15)
The second method does not optimize the DSP hardware configuration in accordance with the worst case as in the first method. In the worst case, the double-precision operation is executed by the computing unit in the worst case, which is necessary in the worst case. This is a technique for ensuring the calculation accuracy. For example, in the three-band equalizer shown in FIG. 10, assuming the worst case, if the original calculation accuracy of the DSP multiplier or adder does not satisfy the required calculation accuracy, the second method uses the following formula for the DSP: The double precision calculation shown in (13) to (15) is executed to obtain the required calculation precision.
dEQ10
= CEQ00 x dEQ00L + cEQ01 x dEQ01L + cEQ02 x dEQ02L
+ CEQ03 x dEQ10L + cEQ04 x dEQ11L
+ CEQ00 × dEQ00U + cEQ01 × dEQ01U + cEQ02 × dEQ02U
+ CEQ03 × dEQ10U + cEQ04 × dEQ11U (13)
dEQ20
= CEQ10 x dEQ10L + cEQ11 x dEQ11L + cEQ12 x dEQ12L
+ CEQ13 x dEQ20L + cEQ14 x dEQ21L
+ CEQ10 × dEQ10U + cEQ11 × dEQ11U + cEQ12 × dEQ12U
+ CEQ13 × dEQ20U + cEQ14 × dEQ21U (14)
dEQ30
= CEQ20 x dEQ20L + cEQ21 x dEQ21L + cEQ22 x dEQ22L
+ CEQ23 x dEQ30L + cEQ24 x dEQ31L
+ CEQ20 × dEQ20U + cEQ21 × dEQ21U + cEQ22 × dEQ22U
+ CEQ23 × dEQ30U + cEQ24 × dEQ31U (15)

上記式(13)〜(15)において、dEQxyL(x=0〜2、y=0〜4)は、信号値dEQxy(x=0〜2、y=0〜4)の下位ビット、dEQxyU(x=0〜2、y=0〜4)は、信号値dEQxy(x=0〜2、y=0〜4)の上位ビットである。
特開2003−110405号公報
In the above equations (13) to (15), dEQxyL (x = 0 to 2, y = 0 to 4) is a lower bit of the signal value dEQxy (x = 0 to 2, y = 0 to 4), dEQxyU (x = 0-2, y = 0-4) are the upper bits of the signal value dEQxy (x = 0-2, y = 0-4).
JP 2003-110405 A

ところで、上述した第1の方法は、ワーストケースに合わせて乗算器等の演算精度を決定するため、演算のためのハードウェアが大規模なものになるという問題がある。また、演算のためのハードウェアが大規模化するのに伴い、消費電力が大きくなるという問題がある。また、上述した第2の方法は、演算のためのハードウェアの規模を変えるものではないので、第1の方法に比べてハードウェアの規模を小さくすることができるが、ワーストケースに合わせた演算精度を得るために演算回数を増やして倍精度演算を行うので、消費電力が大きくなるという問題がある。また、第1および第2の方法のいずれにおいても、デジタルフィルタの演算精度は、ワーストケースでの使用に耐え得るような演算精度に固定される。しかし、ユーザがフィルタ係数を自由に書き換えることが可能なデジタルフィルタの場合、デジタルフィルタはワーストケースでない条件(例えばピーク周波数f0を高くして動作させる等)でも使用されることがある。そのような場合でも、上記第1の方法または第2の方法により設計されたデジタルフィルタは、ワーストケースを考慮して決定された演算精度、すなわち、本来必要な演算精度よりも高い演算精度で演算を行うため、過剰な演算精度での演算により無駄に電力を消費する、という問題がある。   By the way, the above-described first method has a problem that the hardware for calculation becomes large because the calculation accuracy of the multiplier or the like is determined in accordance with the worst case. Further, there is a problem that power consumption increases as the hardware for computation becomes larger. In addition, since the second method described above does not change the hardware scale for the calculation, the hardware scale can be reduced as compared with the first method, but the calculation in accordance with the worst case is possible. In order to obtain accuracy, the number of computations is increased and double precision computation is performed, which causes a problem that power consumption increases. In both the first and second methods, the calculation accuracy of the digital filter is fixed to the calculation accuracy that can withstand use in the worst case. However, in the case of a digital filter in which the user can freely rewrite the filter coefficient, the digital filter may be used even under conditions that are not the worst case (for example, the peak frequency f0 is increased). Even in such a case, the digital filter designed by the first method or the second method operates with the calculation accuracy determined in consideration of the worst case, that is, the calculation accuracy higher than the originally required calculation accuracy. Therefore, there is a problem in that power is wasted due to calculation with excessive calculation accuracy.

この発明は、以上のような事情に鑑みてなされたものであり、フィルタ処理の実行条件に見合った演算精度で演算を行うことができ、無駄な電力消費が低減されたデジタルフィルタを提供することを目的としている。   The present invention has been made in view of the circumstances as described above, and provides a digital filter that can perform computations with computation accuracy commensurate with the execution conditions of filter processing and that reduces wasteful power consumption. It is an object.

この発明は、フィルタ処理の処理対象信号に乗算するフィルタ係数または前記フィルタ処理の処理過程において発生する信号に乗算するフィルタ係数を記憶する係数記憶手段と、前記係数記憶手段に記憶されたフィルタ係数の書き換えを行う係数書き換え制御手段と、前記係数記憶手段に記憶されたフィルタ係数を用いたフィルタ処理を処理対象信号に施すための演算を行う演算手段と、前記演算手段による演算の制御を行う手段であり、前記フィルタ処理の実行条件を示すパラメータに基づいて、前記演算手段の使用態様を変えることにより前記演算手段による演算の演算精度の切り換え制御を行うフィルタ処理制御手段とを具備することを特徴とするデジタルフィルタを提供する。
かかる発明によれば、フィルタ処理の実行条件に基づいて、演算手段による演算の演算精度の切り換えが行われるので、様々な実行条件でフィルタ処理を行う場合に、実行条件に合った適切な演算精度でフィルタ処理のための演算が行われ、無駄な電力消費が回避される。
The present invention relates to a coefficient storage means for storing a filter coefficient to be multiplied by a signal to be processed for filtering or a filter coefficient to be multiplied to a signal generated in the processing process of the filter processing, and Coefficient rewriting control means for performing rewriting, arithmetic means for performing an operation for applying a filter process using the filter coefficient stored in the coefficient storage means to the signal to be processed, and means for controlling the calculation by the arithmetic means And filtering processing control means for performing switching control of calculation accuracy of calculation by the calculation means by changing a use mode of the calculation means based on a parameter indicating an execution condition of the filter processing. Provide a digital filter.
According to this invention, since the calculation accuracy of the calculation by the calculation means is switched based on the execution condition of the filter process, when performing the filter process under various execution conditions, the appropriate calculation accuracy that matches the execution condition Thus, computation for filtering is performed, and unnecessary power consumption is avoided.

以下、図面を参照し、この発明の実施の形態を説明する。
<第1実施形態>
図1はこの発明の第1実施形態であるデジタルフィルタの構成を示すブロック図である。このデジタルフィルタは、前掲図10の3バンドイコライザとしてのフィルタ処理を入力オーディオサンプルx(n)に施し、この結果得られるオーディオサンプルy(n)を出力するようにプログラムされたDSPであり、データパス部100と、係数記憶部200と、インタフェース300と、制御部400とを有している。
Embodiments of the present invention will be described below with reference to the drawings.
<First Embodiment>
FIG. 1 is a block diagram showing the configuration of a digital filter according to the first embodiment of the present invention. This digital filter is a DSP programmed to perform the filtering process as the 3-band equalizer of FIG. 10 on the input audio sample x (n) and output the audio sample y (n) obtained as a result. A pass unit 100, a coefficient storage unit 200, an interface 300, and a control unit 400 are included.

係数記憶部200は、前掲図10の3バンドイコライザとしてのフィルタ処理に用いるフィルタ係数cEQxy(x=0〜2、y=0〜4)を記憶する手段であり、例えばEEPROMなどの書き換え可能な不揮発性メモリにより構成されている。   The coefficient storage unit 200 is a means for storing a filter coefficient cEQxy (x = 0 to 2, y = 0 to 4) used for the filter processing as the three-band equalizer shown in FIG. 10, and is a rewritable nonvolatile memory such as an EEPROM. It is composed of a memory.

データパス部100は、前掲図10の3バンドイコライザとしてのフィルタ処理のための演算を行う装置であり、乗算器111、加算器112およびレジスタ113からなる演算器110と、ワークRAM120と、乗算器111に与える入力情報の選択を行うセレクタ131および132を有している。   The data path unit 100 is a device that performs an operation for filter processing as the three-band equalizer shown in FIG. 10, and includes an arithmetic unit 110 including a multiplier 111, an adder 112, and a register 113, a work RAM 120, and a multiplier. And selectors 131 and 132 for selecting input information to be given to 111.

ここで、ワークRAM120は、前掲図10の遅延処理901〜912等に用いられる記憶装置であり、前掲図10の3バンドイコライザの各ノードの信号値dEQxyを示す2Nビット(Nは複数)のデータを記憶する。乗算器111は、前掲図10の乗算処理921〜936等を行う装置であり、2個のNビットの入力データの乗算を行って2Nビットのデータを出力する。セレクタ131は、係数記憶部200内のフィルタ係数cEQxy(x=0〜2、y=0〜4)のうち制御部400から指示されたものを選択して乗算器111に供給する。セレクタ132は、制御部400からの指示に従って、ワークRAM120から読み出される信号値dEQxyまたは入力オーディオサンプルx(n)を選択して乗算器111に供給する。ここで、セレクタ132は、ワークRAM120から読み出される信号値dEQxyを乗算器111に供給する際には、制御部400からの指示に従い、2Nビットの信号値dEQxyのうち上位Nビットまたは下位Nビットを選択して乗算器111に供給する。乗算器111から出力される2Nビットのデータは、加算器112に供給される過程において符号拡張され、符号ビットの後に整数部Mビットが追加された2N+Mビットのデータとされる。加算器112およびレジスタ113は、この2N+Mビットのデータの累算を行い、前掲式(1)〜(3)または前掲式(13)〜(15)の信号値dEQ10、dEQ20およびdEQ30を算出する累算器として機能する。以上のデータパス部100内の各部の処理は、制御部400から供給される所定周波数のクロックφに同期して行われる。   Here, the work RAM 120 is a storage device used for the delay processes 901 to 912 and the like shown in FIG. 10, and is data of 2N bits (N is a plurality) indicating the signal value dEQxy of each node of the 3-band equalizer shown in FIG. Remember. The multiplier 111 is a device that performs the multiplication processes 921 to 936 and the like shown in FIG. 10, and multiplies two pieces of N-bit input data to output 2N-bit data. The selector 131 selects a filter coefficient cEQxy (x = 0 to 2, y = 0 to 4) in the coefficient storage unit 200 that is instructed by the control unit 400 and supplies the selected one to the multiplier 111. The selector 132 selects the signal value dEQxy read from the work RAM 120 or the input audio sample x (n) according to an instruction from the control unit 400 and supplies the selected signal value dEQxy to the multiplier 111. Here, when the selector 132 supplies the signal value dEQxy read from the work RAM 120 to the multiplier 111, the selector 132 outputs the upper N bits or the lower N bits of the 2N-bit signal value dEQxy according to an instruction from the control unit 400. This is selected and supplied to the multiplier 111. The 2N-bit data output from the multiplier 111 is sign-extended in the process of being supplied to the adder 112, and becomes 2N + M-bit data in which an integer part M bits are added after the sign bit. The adder 112 and the register 113 accumulate the 2N + M-bit data, and calculate the signal values dEQ10, dEQ20, and dEQ30 of the above equations (1) to (3) or the above equations (13) to (15). Functions as an arithmetic unit. The above processing of each unit in the data path unit 100 is performed in synchronization with a clock φ having a predetermined frequency supplied from the control unit 400.

インタフェース300は、デジタルフィルタの外部の装置との間で信号の授受を行う装置である。デジタルフィルタは、このインタフェース300により、外部から入力オーディオサンプルx(n)を取得し、3バンドイコライザとしてのフィルタ処理により得られる出力オーディオサンプルy(n)を外部へ出力する。また、係数記憶部200内のフィルタ係数の書き換え時、インタフェース300は、パーソナルコンピュータ等の外部装置に接続され、書き換え用のフィルタ係数やフィルタ係数の書き換えコマンドを外部装置から受け取る役割を果たす。   The interface 300 is a device that exchanges signals with devices external to the digital filter. The digital filter obtains an input audio sample x (n) from the outside by using this interface 300, and outputs an output audio sample y (n) obtained by the filter processing as a 3-band equalizer to the outside. In addition, when the filter coefficient in the coefficient storage unit 200 is rewritten, the interface 300 is connected to an external device such as a personal computer and plays a role of receiving a rewrite filter coefficient and a filter coefficient rewrite command from the external device.

制御部400は、このデジタルフィルタ全体の制御を行う手段である。好ましい態様において、制御部400は、CPUと、このCPUにより実行されるプログラムを記憶するROMと、作業用のRAMとにより構成されている。制御部400は、係数書き換え制御部401とフィルタ処理制御部402とを有している。これらの実体は制御部400のCPUが実行するプログラムである。   The control unit 400 is means for controlling the entire digital filter. In a preferred embodiment, the control unit 400 includes a CPU, a ROM that stores a program executed by the CPU, and a working RAM. The control unit 400 includes a coefficient rewrite control unit 401 and a filter processing control unit 402. These entities are programs executed by the CPU of the control unit 400.

係数書き換え制御部401は、パーソナルコンピュータ等の外部装置がインタフェース300に接続された状態において、フィルタ係数とフィルタ係数の書き換えコマンドを外部装置からインタフェース300を介して受け取ったとき、受け取ったフィルタ係数により係数記憶部200内のフィルタ係数の書き換えを行う手段である。   When an external device such as a personal computer is connected to the interface 300 when the coefficient rewrite control unit 401 receives a filter coefficient and a filter coefficient rewrite command from the external device via the interface 300, the coefficient rewrite control unit 401 uses the received filter coefficient to generate a coefficient. This is means for rewriting the filter coefficient in the storage unit 200.

フィルタ処理制御部402は、データパス部100によって行われる3バンドイコライザとしてのフィルタ処理の制御を行う手段である。本実施形態の特徴は、このフィルタ処理制御部402によって行われるフィルタ処理の制御の態様にある。従来の技術の下では、フィルタ処理の種々の実行条件の中のワーストケースの実行条件に合わせてデジタルフィルタの演算処理の演算精度が決定され、デジタルフィルタは、如何なる実行条件でフィルタ処理を実行する場合でも、この決定された演算精度でフィルタ処理のための演算を行った。これに対し、本実施形態におけるフィルタ処理制御部402は、3バンドイコライザを構成するイコライザEQx(x=0〜2)の各々について、イコライザEQxの実行条件がワーストケースであるか非ワーストケースであるかを判定し、この判定結果に従い、当該イコライザEQxとしてのフィルタ処理の演算精度を決定し、そのような演算精度でフィルタ処理が行われるようにデータパス部100の制御を行う。すなわち、実行条件が非ワーストケースである場合には、データパス部100の演算器110に単精度演算を行わせ、実行条件がワーストケースである場合には、データパス部100の演算器110に倍精度演算を行わせるのである。さらに詳述すると、次の通りである。   The filter processing control unit 402 is a unit that controls filter processing as a three-band equalizer performed by the data path unit 100. The feature of this embodiment is in the mode of control of filter processing performed by the filter processing control unit 402. Under the conventional technique, the calculation accuracy of the digital filter calculation process is determined in accordance with the worst-case execution condition among various execution conditions of the filter process, and the digital filter executes the filter process under any execution condition. Even in this case, the calculation for the filter processing was performed with the determined calculation accuracy. On the other hand, the filter processing control unit 402 according to the present embodiment has the worst-case or non-worst-case execution conditions for the equalizer EQx for each of the equalizers EQx (x = 0 to 2) constituting the three-band equalizer. In accordance with the determination result, the calculation accuracy of the filter processing as the equalizer EQx is determined, and the data path unit 100 is controlled so that the filter processing is performed with such calculation accuracy. That is, when the execution condition is a non-worst case, the arithmetic unit 110 of the data path unit 100 performs a single precision operation, and when the execution condition is the worst case, the arithmetic unit 110 of the data path unit 100 Double precision calculation is performed. Further details are as follows.

まず、前掲図10の3バンドイコライザを構成する各イコライザEQx(x=0〜2)は、ピーク周波数f0が低いほど、不具合(要求仕様不充足、リミットサイクルの発生等)を生じさせずにフィルタ処理を行うのに必要な演算精度が高くなる。すなわち、個々のイコライザEQxに関して、実行条件が非ワーストケースかワーストケースかはピーク周波数f0により決まり、ピーク周波数f0がある閾値以上であれば単精度演算でも不具合は生じないが(非ワーストケース)、ピーク周波数f0が同閾値を下回る場合には倍精度演算を行わないと不具合が発生し易くなる(ワーストケース)。そして、本実施形態において、単精度演算によるフィルタ処理を行っても不具合が生じないピーク周波数f0の範囲である単精度演算ゾーンと、倍精度演算を行わないと不具合が生じるピーク周波数f0の範囲である倍精度演算ゾーンとの境界は、500Hz付近にある。   First, each equalizer EQx (x = 0 to 2) constituting the 3-band equalizer shown in FIG. 10 is filtered without causing a malfunction (a requirement specification is not satisfied, a limit cycle is generated, etc.) as the peak frequency f0 is lower. The calculation accuracy required for processing is increased. That is, for each equalizer EQx, whether the execution condition is the non-worst case or the worst case is determined by the peak frequency f0. If the peak frequency f0 is equal to or greater than a certain threshold value, no problem occurs even in single precision calculation (non-worst case). When the peak frequency f0 is lower than the threshold value, a problem is likely to occur unless the double precision calculation is performed (worst case). And in this embodiment, in the range of the peak frequency f0 which is the range of the peak frequency f0 which does not produce a malfunction even if the filtering process by the single precision computation is performed, and the peak frequency f0 where the malfunction occurs if the double precision computation is not performed. The boundary with a certain double precision calculation zone is in the vicinity of 500 Hz.

本実施形態では、非ワーストケース/ワーストケースの判定に役立つピーク周波数f0がデジタルフィルタに直接与えられることはないが、このピーク周波数f0を用いて演算されたフィルタ係数cEQxy(x=0〜2、y=0〜4)がデジタルフィルタに与えられる。そして、このフィルタ係数cEQxy(x=0〜2、y=0〜4)の中にはピーク周波数f0に大きく依存するものがある。図2は、3バンドイコライザの第xバンドの処理を行うIIRフィルタにおいて、ピーク中心周波数f0を変化させたときのフィルタ係数cEQxy(y=0〜4)の変化の様子を示すものである。なお、この図には、フィルタ係数cEQxy(y=0〜4)とともに、単精度演算ゾーンと倍精度演算ゾーンが示されている。   In the present embodiment, the peak frequency f0 useful for the determination of the non-worst case / worst case is not directly given to the digital filter, but the filter coefficient cEQxy (x = 0 to 2, calculated using this peak frequency f0). y = 0 to 4) is given to the digital filter. Some of the filter coefficients cEQxy (x = 0 to 2, y = 0 to 4) greatly depend on the peak frequency f0. FIG. 2 shows how the filter coefficient cEQxy (y = 0 to 4) changes when the peak center frequency f0 is changed in the IIR filter that performs processing of the x-th band of the 3-band equalizer. In this figure, the single precision calculation zone and the double precision calculation zone are shown together with the filter coefficient cEQxy (y = 0 to 4).

図2に示すように、フィルタ係数cEQx1およびcEQx3はピーク周波数f0に大きく依存し、フィルタ係数cEQx1はピーク周波数f0が低くなる程、−2.0に近くなり、フィルタ係数cEQx3はピーク周波数f0が低くなる程、2.0に近くなる。従って、適切な閾値を設け、例えばフィルタ係数cEQ1が同閾値を下回ったら倍精度演算を行い、閾値以上であれば単精度演算を行うようにすれば、倍精度演算ゾーンと単精度演算ゾーンとで適切な演算精度を選択することができることが分かる。そこで、本実施形態では、フィルタ処理制御部402がフィルタ係数cEQx1を閾値−1.99と比較し、cEQx1<−1.99であれば倍精度演算、cEQx1≧−1.99であれば単精度演算をフィルタ処理のための演算精度として選択するようにしている。   As shown in FIG. 2, the filter coefficients cEQx1 and cEQx3 greatly depend on the peak frequency f0, and the filter coefficient cEQx1 becomes closer to −2.0 as the peak frequency f0 becomes lower, and the filter coefficient cEQx3 has a lower peak frequency f0. Indeed, it is close to 2.0. Therefore, if an appropriate threshold value is provided, for example, if the filter coefficient cEQ1 falls below the threshold value, a double precision calculation is performed, and if the filter coefficient cEQ1 is equal to or greater than the threshold value, a single precision calculation is performed. It can be seen that an appropriate calculation accuracy can be selected. Therefore, in the present embodiment, the filter processing control unit 402 compares the filter coefficient cEQx1 with the threshold value −1.99, and if cEQx1 <−1.99, double precision calculation, and cEQx1 ≧ −1.99, single precision. The calculation is selected as the calculation accuracy for the filtering process.

図3は、この場合に用いる閾値−1.99の妥当性を示すものであり、ピーク周波数f0が1000Hz以下の範囲において、キューQとゲインGの各種の組み合わせについてフィルタ係数cEQx1を演算した場合に、フィルタ係数cEQx1が−1.99を下回る回数を示したものである。図3に示すように、ピーク周波数f0が650Hzよりも高い領域では、キューQとゲインGをどのような組み合わせにしても、フィルタ係数cEQx1が−1.99を下回ることはない。そして、フィルタ係数cEQx1が−1.99を下回り始めるのは、ピークf0が650Hz以下になったときである。従って、上述のようにフィルタ係数cEQx1が−1.99を下回った場合に倍精度演算を行うようにすれば、ピーク周波数f0が500Hz以下の場合に必ず倍精度演算が行われることが保証される。   FIG. 3 shows the validity of the threshold value -1.99 used in this case, and when the filter coefficient cEQx1 is calculated for various combinations of the queue Q and the gain G in the range where the peak frequency f0 is 1000 Hz or less. The number of times that the filter coefficient cEQx1 falls below -1.99. As shown in FIG. 3, in the region where the peak frequency f0 is higher than 650 Hz, the filter coefficient cEQx1 never falls below −1.99 regardless of the combination of the cue Q and the gain G. The filter coefficient cEQx1 starts to fall below -1.99 when the peak f0 becomes 650 Hz or less. Therefore, if the double precision calculation is performed when the filter coefficient cEQx1 falls below -1.99 as described above, it is guaranteed that the double precision calculation is always performed when the peak frequency f0 is 500 Hz or less. .

以上説明した機能の他、フィルタ処理制御部402は、1サンプリング周期内において実行すべき全てのフィルタ処理が終了した場合に、次のサンプリング周期が始まるまでの期間、データパス部100に供給するクロックφを停止させ、無駄な電力消費を回避する機能を有している。
以上が本実施形態によるデジタルフィルタの構成の詳細である。
In addition to the functions described above, the filter processing control unit 402 is a clock that is supplied to the data path unit 100 during a period until the next sampling cycle starts when all filter processing to be executed within one sampling cycle is completed. It has a function to stop φ and avoid unnecessary power consumption.
The above is the details of the configuration of the digital filter according to the present embodiment.

次に本実施形態の動作を説明する。図4は、本実施形態におけるフィルタ処理制御部402の動作を示す状態遷移図である。本実施形態において、フィルタ処理制御部402は、各サンプリング周期において、イコライザEQx(x=0〜2)としてのフィルタ処理をデータパス部100に実行させ、1個のオーディオサンプルy(n)を出力させる。   Next, the operation of this embodiment will be described. FIG. 4 is a state transition diagram showing the operation of the filter processing control unit 402 in the present embodiment. In this embodiment, the filter processing control unit 402 causes the data path unit 100 to perform filter processing as an equalizer EQx (x = 0 to 2) in each sampling period, and outputs one audio sample y (n). Let

DSP演算アイドルステートDSPIDLEは、1サンプリング周期内において実行すべき全ての処理が終了し、次のサンプリング周期が始まるまで待機しているステートである。フィルタ処理制御部402は、DSP演算アイドルステートDSPIDLEでは、データパス部100に対するクロックφの供給を停止する。このDSP演算アイドルステートDSPIDLEにおいて、サンプリング周期の開始を示すFSフラグがアサートされると、フィルタ処理制御部402は、係数記憶部200内のフィルタ係数cEQ01を参照し、cEQ01≧−1.99である場合にはステートを単精度演算ステートEQ0に遷移させ、cEQ01<−1.99である場合にはステートを倍精度演算ステートBIEQ0に遷移させる。そして、データパス部100に対するクロックφの供給を開始する。   The DSP operation idle state DSPIDLE is a state in which all processes to be executed in one sampling period are completed and the next sampling period starts. The filter processing control unit 402 stops the supply of the clock φ to the data path unit 100 in the DSP calculation idle state DSPIDLE. In the DSP calculation idle state DSPIDLE, when the FS flag indicating the start of the sampling period is asserted, the filter processing control unit 402 refers to the filter coefficient cEQ01 in the coefficient storage unit 200, and cEQ01 ≧ −1.99. In this case, the state is transited to the single-precision arithmetic state EQ0, and when cEQ01 <−1.99, the state is transited to the double-precision arithmetic state BIEQ0. Then, the supply of the clock φ to the data path unit 100 is started.

単精度演算ステートEQ0において、フィルタ処理制御部402は、前掲式(1)の単精度演算をデータパス部100に実行させ、この結果得られるイコライザEQ0の出力信号値dEQ10をワークRAM120内の第1の演算結果格納エリアに格納させる。また、倍精度演算ステートBIEQ0では、前掲式(13)の倍精度演算をデータパス部100に実行させ、この結果得られるイコライザEQ0の出力信号値dEQ10をワークRAM120内の第1の演算結果格納エリアに格納させる。   In the single-precision calculation state EQ0, the filter processing control unit 402 causes the data path unit 100 to execute the single-precision calculation of the above equation (1), and the output signal value dEQ10 of the equalizer EQ0 obtained as a result is the first in the work RAM 120. Are stored in the calculation result storage area. In the double precision operation state BIEQ0, the data path unit 100 is caused to execute the double precision operation of the above equation (13), and the output signal value dEQ10 of the equalizer EQ0 obtained as a result is stored in the first calculation result storage area in the work RAM 120. To store.

単精度演算ステートEQ0または倍精度演算ステートBIEQ0が終了すると、フィルタ処理制御部402は、係数記憶部200内のフィルタ係数cEQ11を参照し、cEQ11≧−1.99である場合にはステートを単精度演算ステートEQ1に遷移させる。そして、前掲式(2)の単精度演算によりイコライザEQ1の出力信号値dEQ20をデータパス部100に算出させ、出力信号値dEQ20をワークRAM120内の第2の演算結果格納エリアに格納させる。一方、cEQ11<−1.99である場合にはステートを倍精度演算ステートBIEQ1に遷移させる。そして、前掲式(14)の倍精度演算によりイコライザEQ1の出力信号値dEQ20を算出させ、出力信号値dEQ20をワークRAM120内の第2の演算結果格納エリアに格納させる。   When the single-precision operation state EQ0 or the double-precision operation state BIEQ0 ends, the filter processing control unit 402 refers to the filter coefficient cEQ11 in the coefficient storage unit 200, and when cEQ11 ≧ −1.99, the state is single-precision. Transition to operation state EQ1. Then, the output signal value dEQ20 of the equalizer EQ1 is calculated by the data path unit 100 by the single precision calculation of the above equation (2), and the output signal value dEQ20 is stored in the second calculation result storage area in the work RAM 120. On the other hand, when cEQ11 <−1.99, the state is shifted to the double precision operation state BIEQ1. Then, the output signal value dEQ20 of the equalizer EQ1 is calculated by the double precision calculation of the above equation (14), and the output signal value dEQ20 is stored in the second calculation result storage area in the work RAM 120.

単精度演算ステートEQ1または倍精度演算ステートBIEQ1が終了すると、フィルタ処理制御部402は、係数記憶部200内のフィルタ係数cEQ21を参照し、cEQ21≧−1.99である場合にはステートを単精度演算ステートEQ2に遷移させる。そして、前掲式(3)の単精度演算によりイコライザEQ2の出力信号値dEQ30をデータパス部100に算出させ、出力信号値dEQ30をワークRAM120内の第3の演算結果格納エリアに格納させる。一方、cEQ21<−1.99である場合にはステートを倍精度演算ステートBIEQ2に遷移させる。そして、前掲式(15)の倍精度演算によりイコライザEQ2の信号値dEQ30を算出させ、出力信号値dEQ30をワークRAM120内の第3の演算結果格納エリアに格納させる。   When the single-precision calculation state EQ1 or the double-precision calculation state BIEQ1 ends, the filter processing control unit 402 refers to the filter coefficient cEQ21 in the coefficient storage unit 200, and if cEQ21 ≧ −1.99, the state is single-precision. Transition to operation state EQ2. Then, the output signal value dEQ30 of the equalizer EQ2 is calculated by the data path unit 100 by the single precision calculation of the above equation (3), and the output signal value dEQ30 is stored in the third calculation result storage area in the work RAM 120. On the other hand, if cEQ21 <-1.99, the state is shifted to the double-precision operation state BIEQ2. Then, the signal value dEQ30 of the equalizer EQ2 is calculated by the double precision calculation of the above equation (15), and the output signal value dEQ30 is stored in the third calculation result storage area in the work RAM 120.

単精度演算ステートEQ2または倍精度演算ステートBIEQ2が終了すると、フィルタ処理制御部402は、ステートをフェードアウト/フェードイン演算ステートFADEに遷移させる。そして、前掲図10の乗算処理936をデータパス部100に実行させ、オーディオサンプルy(n)をデジタルフィルタの外部に出力させる。また、前掲図10の遅延処理901〜912を実行させるべく、ワークRAM120内において例えば信号値dEQ01を信号値dEQ02を格納するためのエリアに移動し、信号値dEQ00を信号値dEQ01を格納するためのエリアに移動し、……、という具合に各信号値dEQxyの格納エリアの変更を行う。また、ワークRAM120内において第1〜第3の演算結果格納エリアに格納された信号値dEQ10、dEQ20およびdEQ30をそれぞれの信号値のために設けられたエリアに格納する。そして、セレクタ132に入力オーディオサンプルx(n)を選択させ、ワークRAM120内の信号値dEQ00用のエリアに格納させる。次のサンプリング周期では、このように内容の更新が行われた各格納エリアの信号値dEQxyが前掲式(1)〜(3)または前掲式(13)〜(15)の演算に用いられる。このフェードアウト/フェードイン演算ステートFADEが終了した場合、フィルタ処理制御部402は、ステートをDSP演算アイドルステートDSPIDLEに遷移させる。   When the single-precision arithmetic state EQ2 or the double-precision arithmetic state BIEQ2 ends, the filter processing control unit 402 changes the state to the fade-out / fade-in arithmetic state FADE. Then, the data path unit 100 executes the multiplication process 936 shown in FIG. 10 to output the audio sample y (n) to the outside of the digital filter. Further, in order to execute the delay processes 901 to 912 of FIG. 10, for example, the signal value dEQ01 is moved to an area for storing the signal value dEQ02 in the work RAM 120, and the signal value dEQ00 is stored to store the signal value dEQ01. Move to the area, and change the storage area of each signal value dEQxy, and so on. Further, the signal values dEQ10, dEQ20, and dEQ30 stored in the first to third calculation result storage areas in the work RAM 120 are stored in the areas provided for the respective signal values. Then, the input audio sample x (n) is selected by the selector 132 and stored in the area for the signal value dEQ00 in the work RAM 120. In the next sampling period, the signal value dEQxy of each storage area in which the content is updated in this way is used for the calculations of the above formulas (1) to (3) or the above formulas (13) to (15). When the fade-out / fade-in operation state FADE is completed, the filter processing control unit 402 changes the state to the DSP operation idle state DSPIDLE.

さて、本実施形態では、デジタルフィルタがフィルタ処理を実行している期間においても、インタフェース300を介して係数記憶部200内のフィルタ係数の更新が行われ、それによりイコライザEQx(x=0〜2)のいずれかのフィルタ処理について単精度演算/倍精度演算の切り換えが発生する場合がある。この場合、フィルタ処理制御部402は、フェードアウト/フェードイン演算ステートFADEにおいて、フェードアウト処理をデータパス部100に実行させる。このフェードアウト処理は、所定数のサンプリング周期を利用して、乗算処理936においてイコライザEQ2の出力信号値dEQ30に乗じる乗算係数FADEを1から徐々に減少させて0に近づける処理である。   In the present embodiment, the filter coefficient in the coefficient storage unit 200 is updated through the interface 300 even during the period in which the digital filter is executing the filter process, whereby the equalizer EQx (x = 0 to 2). ), Switching between single-precision arithmetic / double-precision arithmetic may occur. In this case, the filter processing control unit 402 causes the data path unit 100 to execute a fade-out process in the fade-out / fade-in calculation state FADE. This fade-out process is a process of gradually decreasing the multiplication coefficient FADE by which the output signal value dEQ30 of the equalizer EQ2 is multiplied in the multiplication process 936 from 1 to approach 0 by using a predetermined number of sampling periods.

このフェードアウト処理が完了し、乗算係数FADEが0になると、その直後のサンプリング周期においてステートがDSP演算アイドルステートDSPIDLEに遷移したときに、フィルタ処理制御部402は、ステートをワークRAM初期化ステートMEMCLRに遷移させる。このワークRAM初期化ステートMEMCLRにおいて、フィルタ処理制御部402は、データパス部100のワークRAM120に記憶された前掲図10の3バンドイコライザの各ノードの信号値dEQxyを初期化する。この初期化が終了すると、その直後のサンプリング周期においてステートがフェードアウト/フェードイン演算ステートFADEになったとき、フィルタ処理制御部402は、フェードイン処理をデータパス部100に実行させる。このフェードイン処理は、所定数のサンプリング周期を利用して、乗算処理936においてイコライザEQ2の出力信号値dEQ30に乗じる乗算係数FADEを0から徐々に増加させて1に近づける処理である。   When the fade-out processing is completed and the multiplication coefficient FADE becomes 0, the filter processing control unit 402 changes the state to the work RAM initialization state MEMCLR when the state transits to the DSP operation idle state DSPIDLE in the immediately following sampling period. Transition. In this work RAM initialization state MEMCLR, the filter control unit 402 initializes the signal value dEQxy of each node of the 3-band equalizer shown in FIG. 10 stored in the work RAM 120 of the data path unit 100. When this initialization is completed, the filter processing control unit 402 causes the data path unit 100 to execute the fade-in process when the state becomes the fade-out / fade-in calculation state FADE in the immediately following sampling cycle. This fade-in process is a process of gradually increasing the multiplication coefficient FADE multiplied by the output signal value dEQ30 of the equalizer EQ2 in the multiplication process 936 from 0 to approach 1 by using a predetermined number of sampling periods.

このように単精度演算/倍精度演算の切り換えが発生するときには、フェードアウト処理を行ってからワークRAM120内の信号値を初期化し、フェードイン処理を経て、3バンドイコライザとしてのフィルタ処理を再開するようにしているので、出力オーディオサンプルy(n)に演算精度の切り換えに伴うノイズが発生するのを防止することができる。   When switching between single-precision arithmetic / double-precision arithmetic occurs in this way, the signal value in the work RAM 120 is initialized after the fade-out process is performed, and the filter process as the three-band equalizer is restarted after the fade-in process. Therefore, it is possible to prevent the output audio sample y (n) from generating noise due to the switching of the calculation accuracy.

図5および図6は本実施形態の具体的動作例を示すタイムチャートである。図5に示す例では、イコライザEQx(x=0〜2)の実行条件が全てワーストケースであり、フィルタ係数cEQx1(x=0〜2)がいずれも−1.99未満であるため、1サンプリング周期の間に、倍精度演算ステートBIEQ0、BIEQ1、BIEQ2、フェードアウト/フェードイン演算ステートFADEおよびDSP演算アイドルステートDSPIDLEが発生する。これに対し、図6に示す例では、イコライザEQx(x=0〜2)の実行条件が全て非ワーストケースであり、フィルタ係数cEQx1(x=0〜2)がいずれも−1.99以上であるため、1サンプリング周期の間に、単精度演算ステートEQ0、EQ1、EQ2、フェードアウト/フェードイン演算ステートFADEおよびDSP演算アイドルステートDSPIDLEが発生する。ここで、前掲式(1)〜(3)および前掲式(13)〜(15)にも示されているように、単精度演算ステートEQx(x=0〜2)において行われる乗算処理の回数は、倍精度演算ステートBIEQx(x=0〜2)において行われる乗算処理の回数の1/2である。従って、単精度演算ステートEQx(x=0〜2)の継続時間は、倍精度演算ステートBIEQx(x=0〜2)の継続時間の約1/2となる。このため、図示のように、イコライザEQx(x=0〜2)の実行条件が非ワーストケースである場合(図6)は、ワーストケースである場合(図5)に比べて、データパス部100にクロックφが供給される期間が短くなり、消費電力が低減される。   5 and 6 are time charts showing a specific operation example of the present embodiment. In the example illustrated in FIG. 5, the execution conditions of the equalizer EQx (x = 0 to 2) are all the worst case, and the filter coefficients cEQx1 (x = 0 to 2) are all less than −1.99, so that one sampling is performed. During the period, double precision operation states BIEQ0, BIEQ1, BIEQ2, fade-out / fade-in operation state FADE, and DSP operation idle state DSPIDLE are generated. On the other hand, in the example shown in FIG. 6, the execution conditions of the equalizer EQx (x = 0 to 2) are all non-worst cases, and the filter coefficients cEQx1 (x = 0 to 2) are all −1.99 or more. Therefore, during one sampling period, single-precision calculation states EQ0, EQ1, EQ2, a fade-out / fade-in calculation state FADE, and a DSP calculation idle state DSPIDLE are generated. Here, as also shown in the above equations (1) to (3) and the above equations (13) to (15), the number of multiplication processes performed in the single precision operation state EQx (x = 0 to 2). Is ½ of the number of multiplications performed in the double precision operation state BIEQx (x = 0 to 2). Therefore, the duration of the single-precision computation state EQx (x = 0 to 2) is about ½ of the duration of the double-precision computation state BIEQx (x = 0 to 2). Therefore, as shown in the figure, when the execution condition of the equalizer EQx (x = 0 to 2) is a non-worst case (FIG. 6), the data path unit 100 is compared to the worst case (FIG. 5). The period during which the clock φ is supplied is shortened and power consumption is reduced.

次に図7を参照し、フィルタ処理制御部402による制御の下で行われるフィルタ係数cEQと信号値dEQとの乗加算処理の態様について説明する。図7において、cEQは図10に示す3バンドイコライザの乗算処理921〜936に用いられるフィルタ係数cEQxy(x=0〜2、y=0〜4)、dEQは同乗算処理921〜936に用いられる信号値dEQxy(x=0〜2、y=0〜4)を表わしている。   Next, with reference to FIG. 7, a mode of multiplication and addition processing of the filter coefficient cEQ and the signal value dEQ performed under the control of the filter processing control unit 402 will be described. 7, cEQ is a filter coefficient cEQxy (x = 0 to 2, y = 0 to 4) used in the multiplication processes 921 to 936 of the 3-band equalizer shown in FIG. 10, and dEQ is used in the multiplication processes 921 to 936. The signal value dEQxy (x = 0 to 2, y = 0 to 4) is represented.

フィルタ処理制御部402は、単精度演算ステートEQx(x=0〜2)では、図7に示された“上位計算”の処理のみをデータパス部100に実行させる。例えば単精度演算ステートEQ0において前掲式(1)の信号値dEQ10をデータパス部100に算出させる場合、フィルタ処理制御部402は、レジスタ113に初期値0を書き込む。次にフィルタ処理制御部402は、係数記憶部200内のフィルタ係数cEX00およびワークRAM120内の信号値dEQ00の上位Nビットをセレクタ131および132を各々介して乗算器111に供給させ、両者の乗算処理を行わせる。これにより乗算器111は、乗算結果cEQ00×dEQ00を示す2Nビットのデータを出力する。フィルタ処理制御部402は、この2Nビットのデータを符号拡張して2N+Mビットのデータとし、加算器112とレジスタ113にその累算を行わせる。   The filter processing control unit 402 causes the data path unit 100 to execute only the “upper calculation” process shown in FIG. 7 in the single precision operation state EQx (x = 0 to 2). For example, in the case of causing the data path unit 100 to calculate the signal value dEQ10 of the above equation (1) in the single precision operation state EQ0, the filter processing control unit 402 writes the initial value 0 in the register 113. Next, the filter processing control unit 402 causes the multiplier 111 to supply the filter coefficient cEX00 in the coefficient storage unit 200 and the upper N bits of the signal value dEQ00 in the work RAM 120 to the multiplier 111 via the selectors 131 and 132, respectively. To do. Thereby, the multiplier 111 outputs 2N-bit data indicating the multiplication result cEQ00 × dEQ00. The filter processing control unit 402 sign-extends the 2N-bit data to 2N + M-bit data, and causes the adder 112 and the register 113 to perform accumulation.

次にフィルタ処理制御部402は、係数記憶部200内のフィルタ係数cEX01およびワークRAM120内の信号値dEQ01の上位Nビットをセレクタ131および132を各々介して乗算器111に供給させ、両者の乗算処理を行わせ、この乗算結果cEQ01×dEQ01の累算を加算器112とレジスタ113に行わせる。フィルタ処理制御部402は、以下同様の手順により、前掲式(1)中の各乗算処理cEQ02×dEQ02、cEQ03×dEQ10およびcEQ04×dEQ11とその累算をデータパス部100に行わせる。この結果、前掲式(1)の信号値dEQ10を示す2N+Mビットのデータがレジスタ113内に得られる。フィルタ処理制御部402は、この2N+Mビットのデータの上位Nビットとオール0である下位Nビットとからなるデータを信号値dEQ10としてワークRAM120内の第1の演算結果格納エリアに格納させる。以上、単精度演算ステートEQ0における乗加算処理の態様を説明したが、単精度演算ステートEQ1およびEQ2においても、同様の態様で前掲式(2)および(3)の演算処理が実行される。
以上が非ワーストケースにおいて実行されるフィルタ処理の演算の態様である。
Next, the filter processing control unit 402 causes the multiplier 111 to supply the filter coefficient cEX01 in the coefficient storage unit 200 and the upper N bits of the signal value dEQ01 in the work RAM 120 to the multiplier 111 via the selectors 131 and 132, respectively. And the adder 112 and the register 113 are caused to accumulate the multiplication result cEQ01 × dEQ01. The filter processing control unit 402 causes the data path unit 100 to perform each of the multiplication processes cEQ02 × dEQ02, cEQ03 × dEQ10, and cEQ04 × dEQ11 in Equation (1) and the accumulation in the same procedure. As a result, 2N + M-bit data indicating the signal value dEQ10 of the above equation (1) is obtained in the register 113. The filter processing control unit 402 stores data consisting of the upper N bits of the 2N + M bit data and the lower N bits which are all 0s in the first operation result storage area in the work RAM 120 as the signal value dEQ10. Although the aspect of the multiplication and addition process in the single precision arithmetic state EQ0 has been described above, the arithmetic processes of the above formulas (2) and (3) are executed in the same manner also in the single precision arithmetic states EQ1 and EQ2.
The above is the aspect of the calculation of the filter processing executed in the non-worst case.

一方、フィルタ処理制御部402は、倍精度演算ステートBIEQx(x=0〜2)では、信号値dEQを上位Nビットと下位Nビット(いずれも符号ビットを含む)に分け、同一の乗算器111に、係数cEQと信号値dEQの下位ビットとの乗算処理(図7における“下位計算”)と、係数cEQと信号値dEQの上位ビットとの乗算処理(図7における“上位計算”)を順次実行させ、乗算器111のビット幅Nに対応した演算精度の倍の演算精度で乗算処理を行う。倍精度演算ステートBIEQ0の場合を例にその動作を説明すると次の通りである。   On the other hand, in the double precision operation state BIEQx (x = 0 to 2), the filter processing control unit 402 divides the signal value dEQ into upper N bits and lower N bits (both including a sign bit), and the same multiplier 111. Next, the multiplication process of the coefficient cEQ and the lower bit of the signal value dEQ (“lower calculation” in FIG. 7) and the multiplication process of the coefficient cEQ and the higher bit of the signal value dEQ (“upper calculation” in FIG. 7) are sequentially performed. And the multiplication process is performed with an operation accuracy that is double the operation accuracy corresponding to the bit width N of the multiplier 111. The operation of the double precision operation state BIEQ0 will be described as an example as follows.

まず、フィルタ処理制御部402は、レジスタ113に初期値0を書き込む。次にフィルタ処理制御部402は、係数記憶部200内のNビットのフィルタ係数cEX00をセレクタ131を介して乗算器111に供給させる。また、フィルタ処理制御部402は、ワークRAM120内の2Nビットの信号値dEQ00の下位Nビットのデータをセレクタ132を介して乗算器111に供給させる。そして、乗算器111にフィルタ係数cEX00と信号値dEQ00の下位Nビットとの乗算処理を行わせる。これにより乗算器111は、乗算結果を示す2Nビットのデータを出力する。次にフィルタ処理制御部402は、この乗算結果の符号拡張を行わせて2N+Mビットの信号値を発生させ、この2N+Mビットの信号値を加算器112およびレジスタ113からなる累算器に与え、その累算を行わせる。この結果、レジスタ113にフィルタ係数cEX00と信号値dEQ00の下位Nビットとの乗算結果を示す2N+Mビットのデータが格納される。そして、“上位計算”の実行前に、このレジスタ113内のデータをN−1ビットだけ下位ビット側にシフトし、元の1/2N−1倍のデータとする。 First, the filter processing control unit 402 writes an initial value 0 in the register 113. Next, the filter processing control unit 402 causes the multiplier 111 to supply the N-bit filter coefficient cEX00 in the coefficient storage unit 200 via the selector 131. Further, the filter processing control unit 402 causes the multiplier 111 to supply the lower N bits of the 2N bit signal value dEQ00 in the work RAM 120 via the selector 132. Then, the multiplier 111 is caused to perform multiplication processing of the filter coefficient cEX00 and the lower N bits of the signal value dEQ00. Thereby, the multiplier 111 outputs 2N-bit data indicating the multiplication result. Next, the filter processing control unit 402 performs sign extension of the multiplication result to generate a 2N + M-bit signal value, and provides the 2N + M-bit signal value to the accumulator including the adder 112 and the register 113. Let the accumulation occur. As a result, 2N + M bits of data indicating the multiplication result of the filter coefficient cEX00 and the lower N bits of the signal value dEQ00 are stored in the register 113. Before executing “upper calculation”, the data in the register 113 is shifted to the lower bit side by N−1 bits to obtain the original 1/2 N−1 times data.

次に、フィルタ処理制御部402は、以下のように“上位計算”をデータパス部100に実行させる。まず、フィルタ処理制御部402は、係数記憶部200内のNビットのフィルタ係数cEX00をセレクタ131を介して乗算器111に供給させる。また、フィルタ処理制御部402は、ワークRAM120内の2Nビットの信号値dEQ00の上位Nビットのデータをセレクタ132を介して乗算器111に供給させる。そして、乗算器111にフィルタ係数cEX00と信号値dEQ00の上位Nビットとの乗算処理を行わせる。これにより乗算器111は、乗算結果を示す2Nビットのデータを出力する。次にフィルタ処理制御部402は、この乗算結果の符号拡張を行わせて2N+Mビットの信号値を発生させ、この2N+Mビットの信号値を加算器112およびレジスタ113からなる累算器に与え、その累算を行わせる。この結果、レジスタ113内に、フィルタ係数cEX00と信号値dEQ00の下位Nビットとの乗算結果と、フィルタ係数cEX00と信号値dEQ00の上位Nビットとの乗算結果とを加算したデータ、すなわち、倍精度演算によるフィルタ係数cEX00と信号値dEQ00との乗算結果が得られる。以下同様の態様により、前掲式(13)に示される各乗算処理とそれらの累算処理を行わせる。そして、これによりレジスタ113内に得られるイコライザEQ0の出力信号値dEQ10をワークRAM120内の第1の演算結果格納エリアに格納させる。
以上、倍精度演算ステートBIEQ0における乗加算処理の態様を説明したが、倍精度演算ステートBIEQ1およびBIEQ2においても、同様の態様で前掲式(14)および(15)の演算処理が実行される。
以上がワーストケースにおいて実行されるフィルタ処理の演算の態様である。
Next, the filter processing control unit 402 causes the data path unit 100 to execute “upper calculation” as follows. First, the filter processing control unit 402 causes the multiplier 111 to supply the N-bit filter coefficient cEX00 in the coefficient storage unit 200 via the selector 131. Further, the filter processing control unit 402 causes the multiplier 111 to supply the upper N bits of the 2N bit signal value dEQ00 in the work RAM 120 via the selector 132. Then, the multiplier 111 is caused to multiply the filter coefficient cEX00 by the upper N bits of the signal value dEQ00. Thereby, the multiplier 111 outputs 2N-bit data indicating the multiplication result. Next, the filter processing control unit 402 performs sign extension of the multiplication result to generate a 2N + M-bit signal value, and provides the 2N + M-bit signal value to the accumulator including the adder 112 and the register 113. Let the accumulation occur. As a result, data obtained by adding the multiplication result of the filter coefficient cEX00 and the lower N bits of the signal value dEQ00 and the multiplication result of the filter coefficient cEX00 and the upper N bits of the signal value dEQ00 in the register 113, that is, double precision A multiplication result of the filter coefficient cEX00 and the signal value dEQ00 by calculation is obtained. In the same manner, the multiplication processes shown in the above equation (13) and their accumulation processes are performed. Then, the output signal value dEQ10 of the equalizer EQ0 obtained in the register 113 is stored in the first calculation result storage area in the work RAM 120.
Although the aspect of the multiplication and addition process in the double precision arithmetic state BIEQ0 has been described above, the arithmetic processes of the above formulas (14) and (15) are executed in the same manner in the double precision arithmetic states BIEQ1 and BIEQ2.
The above is the aspect of the filter processing operation executed in the worst case.

以上説明したように、本実施形態によれば、フィルタ係数に基づいて、デジタルフィルタの実行条件が高い演算精度を要するワーストケースであるかそうでない非ワーストケースであるかが判定され、共通の演算器110を用いて、ワーストケースであれば倍精度演算により、非ワーストケースであれば消費電力の少ない単精度演算によりフィルタ処理が実行される。従って、ハードウェア規模を大きくすることなく、かつ、無駄な消費電力を発生させることなく、ワーストケースでのフィルタ処理および非ワーストケースでのフィルタ処理の両方を実行することができる。また、本実施形態では、3バンドイコライザとしてのフィルタ処理がそれより小規模なイコライザEQx(x=0〜2)としての各フィルタ処理からなる場合に、小規模なフィルタ処理の各々について個別的に実行条件がワーストケースか非ワーストケースかを判定し、演算精度を選択するようにしているので、極力多くのフィルタ処理を単精度演算により行うことができ、きめ細かな節電が可能であるという利点がある。   As described above, according to the present embodiment, based on the filter coefficient, it is determined whether the execution condition of the digital filter is a worst case that requires high calculation accuracy or a non-worst case that does not, and a common calculation is performed. Using the device 110, the filtering process is executed by a double precision calculation in the worst case and by a single precision calculation with low power consumption in the non-worst case. Therefore, both the worst case filtering process and the non-worst case filtering process can be executed without increasing the hardware scale and generating unnecessary power consumption. Further, in the present embodiment, when the filter processing as the three-band equalizer includes each filter processing as a smaller equalizer EQx (x = 0 to 2), each of the small-scale filter processing is individually performed. Since the execution condition is determined to be the worst case or non-worst case, and the calculation accuracy is selected, it is possible to perform as much filter processing as possible by single-precision calculation, and it has the advantage that fine power saving is possible. is there.

<第2実施形態>
図8はこの発明の第2実施形態によるデジタルフィルタにおけるフィルタ係数cEQと信号値dEQとの乗加算処理の態様を示す図である。上記第1実施形態では、フィルタ係数cEQをNビット、信号値dEQを2Nビットとし、フィルタ処理を倍精度演算により行う場合には、信号値dEQを上位Nビットと下位Nビットに分け、係数cEQと後者との乗算処理および係数cEQと前者との乗算処理を順次実行し、乗算結果の累算を行った。これに対し、本実施形態では、フィルタ係数cEQを2Nビット、信号値dEQをNビットとし、信号値dEQとの乗算に使用するフィルタ係数cEQのビット数を切り換えることにより、単精度演算/倍精度演算の切り換えを行う。
<Second Embodiment>
FIG. 8 is a diagram showing a mode of multiplication and addition processing of the filter coefficient cEQ and the signal value dEQ in the digital filter according to the second embodiment of the present invention. In the first embodiment, when the filter coefficient cEQ is N bits, the signal value dEQ is 2N bits, and the filter process is performed by double precision calculation, the signal value dEQ is divided into upper N bits and lower N bits, and the coefficient cEQ The multiplication process of the latter and the coefficient cEQ and the former are sequentially executed, and the multiplication results are accumulated. On the other hand, in the present embodiment, the filter coefficient cEQ is 2N bits, the signal value dEQ is N bits, and the number of bits of the filter coefficient cEQ used for multiplication with the signal value dEQ is switched, so that single precision calculation / double precision is achieved. Switch computations.

フィルタ処理を単精度演算により行う場合には、図8に示す“上位計算”のみを実行する。すなわち、フィルタ係数cEQの上位Nビットと信号値dEQとの乗算を乗算器111により行い、その乗算結果を符号拡張し、加算器112およびレジスタ113からなる累算器により累算する。   When the filter process is performed by single precision calculation, only the “upper calculation” shown in FIG. 8 is executed. That is, the multiplication of the upper N bits of the filter coefficient cEQ and the signal value dEQ is performed by the multiplier 111, the multiplication result is sign-extended, and the result is accumulated by the accumulator including the adder 112 and the register 113.

以上の処理を前掲式(1)におけるフィルタ係数cEQxyと信号値dEQxyとの各組み合わせについて実行すると、信号値dEQ10を示す2N+Mビットのデータがレジスタ113内に得られる。フィルタ処理制御部402は、このデータの上位Nビットを信号値dEQ10としてワークRAM120内の第1の演算結果格納エリアに格納させる。前掲式(2)および(3)に示す信号値dEQ20およびdEQ30の算出の動作も基本的に同様である。   When the above processing is executed for each combination of the filter coefficient cEQxy and the signal value dEQxy in Equation (1), 2N + M-bit data indicating the signal value dEQ10 is obtained in the register 113. The filter processing control unit 402 stores the upper N bits of this data in the first calculation result storage area in the work RAM 120 as the signal value dEQ10. The operation of calculating the signal values dEQ20 and dEQ30 shown in the above equations (2) and (3) is basically the same.

一方、フィルタ処理を倍精度演算により行う場合には、図8に示す“下位計算”および“上位計算”を順次実行する。まず、フィルタ係数cEQの下位Nビットと信号値dEQとの乗算を乗算器111により行い、その乗算結果を符号拡張し、加算器112およびレジスタ113からなる累算器により累算する。そして、“上位計算”に先立ち、レジスタ113内のデータをN−1ビットだけ下位ビット側にシフトし、元の1/2N−1のデータとする。次に、フィルタ係数cEQの上位Nビットと信号値dEQとの乗算を乗算器111により行い、その乗算結果を符号拡張し、加算器112およびレジスタ113からなる累算器により累算する。 On the other hand, when the filter processing is performed by double precision calculation, “lower calculation” and “upper calculation” shown in FIG. 8 are sequentially executed. First, the multiplication of the lower N bits of the filter coefficient cEQ and the signal value dEQ is performed by the multiplier 111, the multiplication result is sign-extended, and the result is accumulated by an accumulator including an adder 112 and a register 113. Prior to “upper calculation”, the data in the register 113 is shifted to the lower bit side by N−1 bits to obtain the original 1/2 N−1 data. Next, the multiplication of the upper N bits of the filter coefficient cEQ and the signal value dEQ is performed by the multiplier 111, the multiplication result is sign-extended, and the result is accumulated by the accumulator including the adder 112 and the register 113.

以上の処理を前掲式(1)におけるフィルタ係数cEQxyと信号値dEQxyとの各組み合わせについて実行すると、信号値dEQ10を示す2N+Mビットのデータがレジスタ113内に得られる。フィルタ処理制御部402は、このデータの上位Nビットを信号値dEQ10としてワークRAM120内の第1の演算結果格納エリアに格納させる。前掲式(2)および(3)に示す信号値dEQ20およびdEQ30の算出の動作も基本的に同様である。   When the above processing is executed for each combination of the filter coefficient cEQxy and the signal value dEQxy in Equation (1), 2N + M-bit data indicating the signal value dEQ10 is obtained in the register 113. The filter processing control unit 402 stores the upper N bits of this data in the first calculation result storage area in the work RAM 120 as the signal value dEQ10. The operation of calculating the signal values dEQ20 and dEQ30 shown in the above equations (2) and (3) is basically the same.

本実施形態においても、フィルタ処理の実行条件が非ワーストケースであるかワーストケースであるかにより単精度演算/倍精度演算の切り換えが行われるので、ハードウェアを大規模にすることなく、非ワーストケースおよびワーストケースでのフィルタ処理を実行可能であり、かつ、非ワーストケースにおいて無駄な電力消費を回避することができる。   Also in the present embodiment, since switching between single-precision arithmetic / double-precision arithmetic is performed depending on whether the execution condition of the filter processing is a non-worst case or a worst case, the non-worst case is achieved without increasing the hardware scale. Filter processing can be performed in cases and worst cases, and wasteful power consumption can be avoided in non-worst cases.

<第3実施形態>
図9はこの発明の第3実施形態であるデジタルフィルタにおけるフィルタ処理制御部402(図1参照)の動作を示す状態遷移図である。上記第1実施形態では、イコライザEQx(x=0〜2)の各々について、フィルタ処理の実行条件が非ワーストケースかワーストケースかを判定し、各イコライザ毎に演算精度の選択を行った。これに対し、本実施形態では、イコライザEQx(x=0〜x)の全処理に関して、一括して演算精度の切り換えを行う。
<Third Embodiment>
FIG. 9 is a state transition diagram showing the operation of the filter processing control unit 402 (see FIG. 1) in the digital filter according to the third embodiment of the present invention. In the first embodiment, for each of the equalizers EQx (x = 0 to 2), it is determined whether the execution condition of the filter processing is a non-worst case or the worst case, and the calculation accuracy is selected for each equalizer. On the other hand, in the present embodiment, the calculation accuracy is collectively switched for all the processes of the equalizer EQx (x = 0 to x).

さらに詳述すると、フィルタ処理制御部402は、サンプリング周期の開始時、係数記憶部200内のフィルタ係数cEQx1(x=0〜2)を参照する。そして、フィルタ係数cEQx1(x=0〜2)の全てが−1.99以上である場合には、以後、ステートを単精度演算ステートEQ0、EQ1、EQ2と順次遷移させ、単精度演算によりイコライザEQx(x=0〜2)のフィルタ処理を実行させる。一方、フィルタ係数cEQx1(x=0〜2)の少なくとも1つが−1.99未満である場合には、以後、ステートを倍精度演算ステートBIEQ0、BIEQ1、BIEQ2と順次遷移させ、倍精度演算によりイコライザEQx(x=0〜2)のフィルタ処理を実行させる。   More specifically, the filter processing control unit 402 refers to the filter coefficient cEQx1 (x = 0 to 2) in the coefficient storage unit 200 at the start of the sampling period. When all of the filter coefficients cEQx1 (x = 0 to 2) are equal to or greater than -1.99, the state is subsequently shifted to single-precision calculation states EQ0, EQ1, and EQ2 and the equalizer EQx is obtained by single-precision calculation. The filter processing (x = 0 to 2) is executed. On the other hand, if at least one of the filter coefficients cEQx1 (x = 0 to 2) is less than −1.99, the state is subsequently changed to the double-precision operation states BIEQ0, BIEQ1, and BIEQ2, and the equalizer is obtained by the double-precision operation. The filter process of EQx (x = 0 to 2) is executed.

本実施形態においても、ハードウェアを大規模にすることなく、非ワーストケースおよびワーストケースでのフィルタ処理を実行可能であり、かつ、非ワーストケースにおいて無駄な電力消費を回避することができる。また、本実施形態は、上記第1実施形態のようにイコライザEQx(x=0〜x)の各々についての個別的な演算精度の切り換えを行うものではないので、きめ細かな節電を行うことはできないが、第1実施形態と比べて制御が簡単であるという利点がある。   Also in the present embodiment, the non-worst case and the worst case filter processing can be executed without increasing the hardware scale, and wasteful power consumption can be avoided in the non-worst case. Further, unlike the first embodiment, the present embodiment does not switch individual calculation accuracy for each of the equalizers EQx (x = 0 to x), and thus cannot perform fine power saving. However, there is an advantage that the control is simple compared with the first embodiment.

<他の実施形態>
以上、この発明の各実施形態について説明したが、この発明にはこれ以外にも他の実施形態があり得る。例えば次の通りである。
<Other embodiments>
As mentioned above, although each embodiment of this invention was described, this invention can have other embodiment besides this. For example:

(1)上記実施形態では、フィルタ処理の実行条件を非ワーストケースとワーストケースの2段階に分け、実行条件がいずれに属するかにより単精度演算または倍精度演算を選択するようにした。しかし、フィルタ処理の実行条件を3段階以上に分け、実行条件が厳しくなるに従い、2倍精度演算、3倍精度演算、……という具合に、演算精度を高めるようにしてもよい。 (1) In the above-described embodiment, the execution condition of the filter processing is divided into two stages, the non-worst case and the worst case, and the single precision operation or the double precision operation is selected depending on which execution condition belongs to. However, the execution conditions of the filter processing may be divided into three or more stages, and the calculation accuracy may be increased as the execution conditions become stricter, such as double precision calculation, triple precision calculation, and so on.

(2)上記実施形態では、フィルタ処理の実行条件を示すパラメータとしてフィルタ係数を用いたが、デジタルフィルタがフィルタ処理のピーク周波数f0、ゲインG、キューQ等を外部から取得可能である場合には、それらのパラメータに基づいてフィルタ処理の実行条件(非ワーストケース/ワーストケースの別)を判定し、演算精度を選択するようにしてもよい。 (2) In the above embodiment, the filter coefficient is used as a parameter indicating the execution condition of the filter processing. However, when the digital filter can obtain the peak frequency f0, gain G, queue Q, etc. of the filter processing from the outside. Based on these parameters, the execution condition of the filter process (non-worst case / worst case) may be determined, and the calculation accuracy may be selected.

(3)デジタルフィルタに外部からの操作により設定可能な自動モードとマニュアルモードとを設け、マニュアルモードでは、例えばインタフェース300を経由したコマンドの入力等に応じて、イコライザEQx(x=0〜2)の各々のための演算精度の切り換え制御を行い、自動モードでは、上記第1実施形態のようにフィルタ処理の実行条件を示すパラメータ(上記第1実施形態ではフィルタ係数)に基づいて演算精度の切り換え制御を行うようにしてもよい。 (3) The digital filter is provided with an automatic mode and a manual mode that can be set by an external operation, and in the manual mode, for example, an equalizer EQx (x = 0 to 2) according to a command input via the interface 300 In the automatic mode, the calculation accuracy is switched based on a parameter (filter coefficient in the first embodiment) indicating the execution condition of the filter processing as in the first embodiment. Control may be performed.

この発明の第1実施形態であるデジタルフィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the digital filter which is 1st Embodiment of this invention. 同実施形態が取り扱うイコライザのピーク周波数とフィルタ係数との関係を示す図である。It is a figure which shows the relationship between the peak frequency of the equalizer handled by the embodiment, and a filter coefficient. 同実施形態においてフィルタ処理の実行条件が非ワーストケースであるかワーストケースであるかを判断するためのフィルタ係数の閾値の妥当性を示す図である。It is a figure which shows the validity of the threshold value of the filter coefficient for determining whether the execution condition of a filter process is a non-worst case or a worst case in the same embodiment. 同実施形態におけるフィルタ処理制御部の動作を示す状態遷移図である。It is a state transition diagram showing the operation of the filter processing control unit in the same embodiment. 同実施形態の動作例を示すタイムチャートである。It is a time chart which shows the operation example of the embodiment. 同実施形態の他の動作例を示すタイムチャートである。It is a time chart which shows the other operation example of the embodiment. 同実施形態におけるフィルタ係数と信号値との乗加算処理の態様を示す図である。It is a figure which shows the aspect of the multiplication addition process of the filter coefficient and signal value in the embodiment. この発明の第2実施形態によるデジタルフィルタにおいて行われるフィルタ係数と信号値との乗加算処理の態様を示す図である。It is a figure which shows the aspect of the multiplication addition process of the filter coefficient and signal value which are performed in the digital filter by 2nd Embodiment of this invention. この発明の第3実施形態によるデジタルフィルタのフィルタ処理制御部の動作を示す状態遷移図である。It is a state transition diagram which shows operation | movement of the filter process control part of the digital filter by 3rd Embodiment of this invention. 3バイドイコライザとして動作するデジタルフィルタの機能構成を示すブロック図である。It is a block diagram which shows the function structure of the digital filter which operate | moves as a 3-bid equalizer. 同3バンドイコライザにおける1つのイコライザのフィルタ特性を模式的に示した図である。It is the figure which showed typically the filter characteristic of one equalizer in the same 3 band equalizer.

符号の説明Explanation of symbols

100……データパス部、200……係数記憶部、300……インタフェース、400……制御部、401……係数書き換え制御部、402……フィルタ処理制御部、110……演算器、111……乗算器、112……加算器、113……レジスタ、131,132……セレクタ。 DESCRIPTION OF SYMBOLS 100 ... Data path part, 200 ... Coefficient memory | storage part, 300 ... Interface, 400 ... Control part, 401 ... Coefficient rewrite control part, 402 ... Filter process control part, 110 ... Calculator, 111 ... Multiplier 112... Adder 113. Register 131, 132.

Claims (6)

フィルタ処理の処理対象信号に乗算するフィルタ係数または前記フィルタ処理の処理過程において発生する信号に乗算するフィルタ係数を記憶する係数記憶手段と、
前記係数記憶手段に記憶されたフィルタ係数の書き換えを行う係数書き換え制御手段と、
前記係数記憶手段に記憶されたフィルタ係数を用いたフィルタ処理を処理対象信号に施すための演算を行う演算手段と、
前記演算手段による演算の制御を行う手段であり、前記フィルタ処理の実行条件を示すパラメータに基づいて、前記演算手段の使用態様を変えることにより前記演算手段による演算の演算精度の切り換え制御を行うフィルタ処理制御手段と
を具備することを特徴とするデジタルフィルタ。
Coefficient storage means for storing a filter coefficient to be multiplied by a signal to be processed for filter processing or a filter coefficient to be multiplied to a signal generated in the process of the filter processing;
Coefficient rewrite control means for rewriting the filter coefficient stored in the coefficient storage means;
A calculation means for performing a calculation for applying a filter process using the filter coefficient stored in the coefficient storage means to the signal to be processed;
A filter for controlling the calculation by the calculation means, and for controlling the calculation accuracy of the calculation by the calculation means by changing a usage mode of the calculation means based on a parameter indicating an execution condition of the filter processing. And a processing control means.
前記制御手段は、前記フィルタ処理の実行条件を示すパラメータとして、前記係数記憶手段に記憶されたフィルタ係数を用いて、前記演算精度の切り換え制御を行うことを特徴とする請求項1に記載のデジタルフィルタ。   2. The digital according to claim 1, wherein the control unit performs switching control of the calculation accuracy using a filter coefficient stored in the coefficient storage unit as a parameter indicating an execution condition of the filter process. filter. 前記フィルタ処理制御手段は、前記パラメータが示すフィルタ処理の実行条件が最も高い演算精度を必要とするワーストケースである場合に、前記演算手段に倍精度演算を行わせ、前記パラメータが示すフィルタ処理の実行条件が非ワーストケースである場合に、前記演算手段に単精度演算を行わせることを特徴とする請求項1または2に記載のデジタルフィルタ。   The filter processing control unit causes the calculation unit to perform double precision calculation when the execution condition of the filter processing indicated by the parameter is the worst case that requires the highest calculation accuracy, and performs the filter processing indicated by the parameter. 3. The digital filter according to claim 1, wherein when the execution condition is a non-worst case, the arithmetic unit performs single-precision arithmetic. 前記フィルタ処理はそれよりも小規模な複数のフィルタ処理により構成されており、前記フィルタ処理制御手段は、小規模なフィルタ処理単位で、各々が必要とする演算精度が確保されるように、個別的に演算精度の切り換え制御を行うことを特徴とする請求項1〜3のいずれか1の請求項に記載のデジタルフィルタ。   The filter processing is composed of a plurality of smaller filter processes, and the filter processing control unit is individually configured so as to ensure the calculation accuracy required for each small filter processing unit. The digital filter according to any one of claims 1 to 3, wherein control for switching calculation accuracy is performed. 前記フィルタ処理はそれよりも小規模な複数のフィルタ処理により構成されており、前記フィルタ処理制御手段は、前記複数の小規模なフィルタ処理が必要とする演算精度のうち最も高い演算精度が確保されるように、前記複数の小規模なフィルタ処理について一括して演算精度の切り換え制御を行うことを特徴とする請求項1〜3のいずれか1の請求項に記載のデジタルフィルタ。   The filter processing includes a plurality of smaller filter processes, and the filter processing control means ensures the highest calculation accuracy among the calculation accuracy required by the plurality of small filter processes. 4. The digital filter according to claim 1, wherein calculation accuracy switching control is collectively performed for the plurality of small-scale filter processes. 5. 外部からの操作により設定可能なマニュアルモードと自動モードを有し、前記マニュアルモードでは、外部からの操作に応じて前記演算精度の切り換え制御を行い、前記自動モードでは、前記フィルタ処理の実行条件を示すパラメータに基づいて前記演算処理の精度の切り換え制御を行うことを特徴とする請求項1〜5のいずれか1の請求項に記載のデジタルフィルタ。   There are a manual mode and an automatic mode that can be set by an external operation. In the manual mode, the calculation accuracy is switched according to an external operation. In the automatic mode, the execution condition of the filter process is set. 6. The digital filter according to claim 1, wherein switching control of accuracy of the arithmetic processing is performed based on a parameter indicated.
JP2006266139A 2006-09-28 2006-09-28 Digital filter Pending JP2008085923A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2006266139A JP2008085923A (en) 2006-09-28 2006-09-28 Digital filter
KR1020070096785A KR100907961B1 (en) 2006-09-28 2007-09-21 Digital filter
CN2007101515518A CN101154937B (en) 2006-09-28 2007-09-26 Digital filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006266139A JP2008085923A (en) 2006-09-28 2006-09-28 Digital filter

Publications (1)

Publication Number Publication Date
JP2008085923A true JP2008085923A (en) 2008-04-10

Family

ID=39256425

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006266139A Pending JP2008085923A (en) 2006-09-28 2006-09-28 Digital filter

Country Status (3)

Country Link
JP (1) JP2008085923A (en)
KR (1) KR100907961B1 (en)
CN (1) CN101154937B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013016908A (en) * 2011-06-30 2013-01-24 Rohm Co Ltd Sine wave generator, digital signal processor, and audio output device
US10853721B2 (en) 2017-01-25 2020-12-01 Kabushiki Kaisha Toshiba Multiplier accumulator, network unit, and network apparatus

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103959192B (en) * 2011-12-21 2017-11-21 英特尔公司 For estimating the mathematical circuit surmounted function
US9606796B2 (en) * 2013-10-30 2017-03-28 Texas Instruments Incorporated Computer and methods for solving math functions
KR101584917B1 (en) 2014-10-14 2016-01-14 세종대학교산학협력단 Multi-stage filter apparatus and Method for filtering Using the same
CN105068640B (en) * 2015-08-13 2018-06-26 浪潮(北京)电子信息产业有限公司 It is a kind of improve high-performance calculation energy consumption than method and system
RU2716902C1 (en) * 2019-07-22 2020-03-17 Федеральное государственное бюджетное образовательное учреждение высшего образования "Омский государственный технический университет" (ОмГТУ) Multistage biquad filter
CN112600533B (en) * 2020-12-09 2023-10-13 中国科学院新疆天文台 Filter bank for radio astronomical observation
CN115102524B (en) * 2022-07-07 2023-08-08 武汉市聚芯微电子有限责任公司 Filter

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02260814A (en) * 1989-03-31 1990-10-23 Fujitsu Ten Ltd Filter coefficient setting method for digital filter
JPH04195585A (en) * 1990-11-28 1992-07-15 Nippon Steel Corp Digital signal processing circuit
JPH1084239A (en) * 1996-09-10 1998-03-31 Alpine Electron Inc Digital graphic equalizer
JPH10256857A (en) * 1997-03-11 1998-09-25 Toshiba Corp Sound quality correction device
JPH1127182A (en) * 1997-06-30 1999-01-29 Nec Corp Adaptive equalization filter for communication

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004260755A (en) 2003-02-27 2004-09-16 Toyota Motor Corp Digital filter and digital signal processing method
JP2004289417A (en) 2003-03-20 2004-10-14 Matsushita Electric Ind Co Ltd Digital filter
JP2006148664A (en) 2004-11-22 2006-06-08 Matsushita Electric Ind Co Ltd Sound image fixing apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02260814A (en) * 1989-03-31 1990-10-23 Fujitsu Ten Ltd Filter coefficient setting method for digital filter
JPH04195585A (en) * 1990-11-28 1992-07-15 Nippon Steel Corp Digital signal processing circuit
JPH1084239A (en) * 1996-09-10 1998-03-31 Alpine Electron Inc Digital graphic equalizer
JPH10256857A (en) * 1997-03-11 1998-09-25 Toshiba Corp Sound quality correction device
JPH1127182A (en) * 1997-06-30 1999-01-29 Nec Corp Adaptive equalization filter for communication

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013016908A (en) * 2011-06-30 2013-01-24 Rohm Co Ltd Sine wave generator, digital signal processor, and audio output device
US10853721B2 (en) 2017-01-25 2020-12-01 Kabushiki Kaisha Toshiba Multiplier accumulator, network unit, and network apparatus

Also Published As

Publication number Publication date
KR100907961B1 (en) 2009-07-16
CN101154937A (en) 2008-04-02
CN101154937B (en) 2010-11-03
KR20080029825A (en) 2008-04-03

Similar Documents

Publication Publication Date Title
JP2008085923A (en) Digital filter
JP2007166535A5 (en)
JP2003108368A (en) Parallel operation processor, its computing control method and system
JPH11163680A (en) Filter structure and method
KR100744216B1 (en) Device and method for calculating a multiplication involving a shifting of the multiplicand
JPH082014B2 (en) Multi-stage digital filter
JP2007280082A (en) Round-off operation method and its arithmetic unit
JPWO2008018197A1 (en) Digital filter, synthesizing apparatus thereof, synthesizing program, and synthesizing program recording medium
KR100675993B1 (en) Arithmetic unit with, and method of selectively delaying a multiplication result
JP4464380B2 (en) Digital filter
Caffarena et al. Architectural synthesis of fixed-point dsp datapaths using fpgas
JP3880807B2 (en) Digital filter and processing method thereof
JP4745032B2 (en) Filter device
KR101315891B1 (en) Recursive half-band filter, and method for fitering using the filter
RU2716902C1 (en) Multistage biquad filter
KR100396189B1 (en) Digital signal processing apparatus and method for controlling the same
JPS63153636A (en) Information processor
JP2014160393A (en) Microprocessor and arithmetic processing method
JP2009282852A (en) Digital signal processor
JP3523104B2 (en) Fixed-point multiplier / adder
JP5003070B2 (en) Digital signal processor
JP3503141B2 (en) Digital processing unit
JP2008061053A (en) Signal processing apparatus
JP2010011493A (en) Digital filter
JP2011023927A (en) Digital filter and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080930

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100125

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20101124