JPH0695627B2 - Low frequency digital filter - Google Patents
Low frequency digital filterInfo
- Publication number
- JPH0695627B2 JPH0695627B2 JP23752689A JP23752689A JPH0695627B2 JP H0695627 B2 JPH0695627 B2 JP H0695627B2 JP 23752689 A JP23752689 A JP 23752689A JP 23752689 A JP23752689 A JP 23752689A JP H0695627 B2 JPH0695627 B2 JP H0695627B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- output
- input
- address
- filter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 description 29
- 238000004364 calculation method Methods 0.000 description 12
- 238000005070 sampling Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 101000579490 Solanum lycopersicum Suberization-associated anionic peroxidase 1 Proteins 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000000034 method Methods 0.000 description 6
- 101001073211 Solanum lycopersicum Suberization-associated anionic peroxidase 2 Proteins 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 102100021283 1-aminocyclopropane-1-carboxylate synthase-like protein 1 Human genes 0.000 description 2
- 101710130550 Class E basic helix-loop-helix protein 40 Proteins 0.000 description 2
- 102100025314 Deleted in esophageal cancer 1 Human genes 0.000 description 2
- 101000675558 Homo sapiens 1-aminocyclopropane-1-carboxylate synthase-like protein 1 Proteins 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Complex Calculations (AREA)
Description
【発明の詳細な説明】 (イ)産業上の利用分野 本発明は、時系列で入力されるデータを所定のアルゴリ
ズムに基いて処理し、時系列データとして出力する低周
波帯域デジタルフィルタに関する。TECHNICAL FIELD The present invention relates to a low frequency band digital filter that processes data input in time series based on a predetermined algorithm and outputs the processed data as time series data.
(ロ)従来の技術 一般に、音声や画像等のように我々の周囲に存在する原
始情報源は、アナログ信号であることが多い。このアナ
ログ信号をデジタル的な手法によって処理するシステム
がデジタル信号処理装置(デジタル・シグナル・プロセ
ッシング・システム:DSPシステム)である。(B) Conventional Technology In general, primitive information sources existing around us, such as voices and images, are often analog signals. A system that processes this analog signal by a digital method is a digital signal processing device (digital signal processing system: DSP system).
近年、デジタル回路のLSI化が急速に進み、ワンチップ
上にDSPシステムが容易に実現できるようになり、更
に、アナログ信号処理に比べて高精度処理が可能、パラ
メータの設定により任意の特性が安定して均一に得られ
る、無調整化が可能となる等の特徴を有するため、DSP
システムが急速に実用化されるようになった。また、DS
Pシステムの応用範囲は、音声信号処理、通信信号処
理、計測信号処理、画像信号処理、地震波信号処理、水
中音響信号処理等に広がり利用されている。In recent years, digital circuits are rapidly becoming LSIs, and DSP systems can be easily realized on a single chip. Furthermore, high-accuracy processing is possible compared to analog signal processing, and arbitrary characteristics are stabilized by setting parameters. Since it has the characteristics that it can be uniformly obtained and adjustment can be made, DSP
The system came into practical use rapidly. Also, DS
The application range of the P system is broadly used for voice signal processing, communication signal processing, measurement signal processing, image signal processing, seismic wave signal processing, underwater acoustic signal processing, and the like.
また、オーディオ分野に於いてもCD(コンパクト・ディ
スク)プレーヤやDAT(デジタル・オーディオ・テー
プ)プレーヤの如く、オーディオ信号のデジタル処理化
が進むに伴って、オーディオ信号をデジタル処理するDS
Pシステムが実用化されている。Also in the audio field, a DS (digital compact disc) player or a DAT (digital audio tape) player, which processes audio signals digitally as digital processing of audio signals progresses.
P system has been put to practical use.
従来のDSPシステムは、デジタルフィルタを容易に形成
できるように第7図に示すアーキテクチャを有してい
る。A conventional DSP system has an architecture shown in FIG. 7 so that a digital filter can be easily formed.
第7図に於いて、データバス(1)には、入出力回路
(I/O)(2)、データRAM(2)乗算器(3)、演算回
路(ALU)(4)、アキュームレータ(ACC)(5)等が
接続され、データRAM(2)の出力とデータROM(6)の
出力が乗算器(3)に接続され、乗算器(3)の乗算結
果出力がALU(4)の一方の入力に印加されている。こ
れらの各回路は、プログラムROM(7)から順次読み出
される命令を解読するデコータ(8)からその命令に応
じて出力されるマイクロコード信号によって制御され
る。In FIG. 7, the data bus (1) has an input / output circuit (I / O) (2), a data RAM (2) a multiplier (3), an arithmetic circuit (ALU) (4), and an accumulator (ACC). ) (5) etc. are connected, the output of the data RAM (2) and the output of the data ROM (6) are connected to the multiplier (3), and the multiplication result output of the multiplier (3) is one of the ALU (4). Applied to the input of. Each of these circuits is controlled by a microcode signal output from a decoder (8) that decodes the instructions sequentially read from the program ROM (7) in response to the instructions.
ところで、オーディオの信号処理に於いて、グラフィッ
クイコライザを実現する場合、第8図に示される2次の
直接型IIRフィルタを複数段縦続接続することによって
得られる。第8図のIIR型フィルタは、 Yi=C1Xi+C2Xi-1+C3Xi-2+C4Xi-1+C5Xi-2……(1)
式 (C1,C2,C3,C4,C5はフィルタ特性を決定する定数) の積和演算を行うものであり、(29)で示されるZ-1は
単位時間(ここではサンプリング周期)の遅延素子であ
り、(30)は定数C1〜C5の乗算素子、(31)は加算素子
である。By the way, in the case of implementing a graphic equalizer in audio signal processing, it can be obtained by cascading a plurality of second-order direct type IIR filters shown in FIG. The IIR type filter of FIG. 8 has Y i = C 1 X i + C 2 X i-1 + C 3 X i-2 + C 4 X i-1 + C 5 X i-2 (1)
Equation (C 1 , C 2 , C 3 , C 4 , and C 5 are constants that determine the filter characteristics) is used to calculate the sum of products, and Z -1 shown in (29) is the unit time (in this case, sampling (30) is a multiplication element having constants C 1 to C 5 , and (31) is an addition element.
このデジタルフィルタをDSPシステムで実現する場合に
は、フィルタ内の節点の計算順序を決定して、プログラ
ムを作成し、そのプログラムをプログラムROM(7)に
格納すると共にデータROM(6)内に計算式の定数を格
納しておく。そして、プログラムを実行することによ
り、積和演算が為され、演算結果はデータRAM(2)に
順次記憶される。When this digital filter is realized by a DSP system, the calculation order of the nodes in the filter is determined, a program is created, and the program is stored in the program ROM (7) and calculated in the data ROM (6). Stores the constant of the expression. Then, by executing the program, the product-sum operation is performed, and the operation result is sequentially stored in the data RAM (2).
(ハ)発明が解決しようとする問題点 グラフィックイコライザ機能は、中心周波数の異なるデ
ジタルフィルタを多段縦続接続したものとして実現で
き、各々の段に於いて、(1)式の積和演算を行ってい
る。(C) Problems to be solved by the invention The graphic equalizer function can be realized by connecting digital filters having different center frequencies in cascade, and at each stage, the product-sum operation of the equation (1) is performed. There is.
しかしながら、中心周波数が200Hz程度の低周波帯域の
デジタルフィルタの場合、積和演算を行う定数の少数点
以下の有効桁が長くなり、限られたビット数、例えば16
ビットで積和演算を行うと演算精度が劣化し、フィルタ
特性が悪化して、低域でのオーディオ信号が歪む等の欠
点があった。However, in the case of a low-frequency band digital filter with a center frequency of about 200 Hz, the effective digits below the decimal point of the constant that performs the product-sum operation become long, and the limited number of bits, such as 16
When the sum-of-products calculation is performed with bits, there are drawbacks such as deterioration of calculation accuracy, deterioration of filter characteristics, and distortion of audio signals in the low frequency range.
また、低周波帯域での演算精度を上げるためには、定数
のビット数及び乗算器のビット数を増す必要があり、そ
のため、定数を記憶するメモリや乗算器が大きくなり、
集積回路化する際の障害となる不都合がある。Further, in order to improve the calculation accuracy in the low frequency band, it is necessary to increase the number of bits of the constant and the number of bits of the multiplier. Therefore, the memory and the multiplier for storing the constant become large,
There is an inconvenience that becomes an obstacle when integrated into an integrated circuit.
(ニ)問題点を解決するための手段 本発明は、上述した点に鑑みて創作されたものであり、
低周波帯域デジタルフィルタの複数のフィルタ定数を各
々、α+δ・β(αは定数に最も近い整数、βは整数α
とフィルタ定数の差を各フィルタ定数に共通の数値δ≪
1で割った値)の形に分解し、各々の係数α、β、δを
用いてフィルタ出力を得る低周波帯域デジタルフィルタ
において、所定の時間単位毎に入力されるデジタルデー
タを前記時間単位で遅延する複数の第1の遅延手段と、
前記入力されたデジタルデータ及び前記第1の遅延手段
の各遅延出力に各々対応する前記係数βを乗算する第1
の乗算手段と、フィルタ出力のデジタルデータを前記時
間単位で遅延する複数の第2の遅延手段と、該第2の乗
算手段の各遅延出力に各々対応する前記係数βを乗算す
る第2の乗算手段と、前記第1の乗算手段の各出力と前
記第2の乗算出力の各出力を加算する第1の加算手段
と、該第1の加算手段の加算結果に前記係数δを乗算す
る第3の乗算手段と、前記入力されたデジタルデータか
らフィルタ出力のデジタルデータを減算する減算手段
と、該減算手段の出力を前記時間単位で遅延する複数の
第3の遅延手段と、該第3の遅延手段の所定出力に対応
する前記係数αを乗算する第4の乗算手段と、前記入力
されたデジタルデータ、前記第3の乗算手段の乗算結
果、前記第4の乗算手段の乗算結果、及び、前記第3の
遅延回路から出力されたデジタルデータを加算し、該加
算結果をフィルタ出力とする第2の加算手段とによって
低周波帯域デジタルフィルタを構成したことを特徴とす
る。(D) Means for Solving the Problems The present invention was created in view of the above points,
Each of the filter constants of the low frequency band digital filter is α + δ · β (α is an integer closest to the constant, β is an integer α
And the filter constant difference is the numerical value common to each filter constant δ <<
In a low frequency band digital filter that obtains a filter output by using each coefficient α, β, δ, the digital data input every predetermined time unit is A plurality of first delaying means for delaying;
A first multiplication of the input digital data and each delay output of the first delay means by the corresponding coefficient β.
Second multiplying means for delaying the digital data of the filter output by the time unit, and second multiplying means for multiplying each delay output of the second multiplying means by the corresponding coefficient β. Means, first adding means for adding each output of the first multiplying means and each output of the second multiplying output, and third adding means for multiplying the addition result of the first adding means by the coefficient δ. Multiplying means, subtracting means for subtracting digital data of a filter output from the input digital data, a plurality of third delaying means for delaying the output of the subtracting means by the time unit, and the third delaying means. Fourth multiplication means for multiplying the coefficient α corresponding to a predetermined output of the means, the input digital data, the multiplication result of the third multiplication means, the multiplication result of the fourth multiplication means, and the The data output from the third delay circuit Adding Tal data, characterized by being configured a low frequency band digital filter by a second adding means for the filter outputs the addition result.
(ホ)作用 上述の手段によれば、デジタルフィルタを実現する
(1)式の定数C1,C2,C3……を低周波帯域の場合に
は、α+β・δ〔αは定数にもっとも近い整数、βは整
数αと定数の差を各定数を共通の定数δ(δ<<1)で
割った値〕の形に分割し、入力されたデータに対して各
々の定数βの積和演算を行った後、定数δを乗算し、該
乗算結果に各々の定数αと入力されたデータの積和演算
の結果を加減算することができる。(E) Action According to the above-mentioned means, the constants C 1 , C 2 , C 3 of equation (1) for realizing the digital filter are α + β · δ [α is a constant in the low frequency band. Near integer, β is divided into the form of difference between integer α and constant and each constant is divided by common constant δ (δ << 1)], and sum of products of each constant β with respect to input data After performing the calculation, the constant δ can be multiplied, and the result of the product-sum calculation of each constant α and the input data can be added to or subtracted from the multiplication result.
これにより、各々の定数の少数点以下は、β・δの如
く、有効数字βと1以下の非常に小さい共通定数δの積
として表わされるため、βは限定された少ないビット
数、例えば16ビットで表わされ、データとの積和演算を
精度良く行うことができる。そして、βの積和演算の結
果にβを乗算することで小数点以下の部分の演算結果が
求められる。一方、整数部分αとデータの積和演算を行
って、両方を加算することにより、全体としての演算結
果を得ることができ、低周波帯域での演算を16ビットの
データ長で十分精度良く行え得る。As a result, since the decimal point of each constant is expressed as a product of the significant digit β and a very small common constant δ of 1 or less, such as β · δ, β is a limited small number of bits, for example, 16 bits. The product-sum operation with the data can be performed accurately. Then, by multiplying the result of the product-sum calculation of β by β, the calculation result of the part below the decimal point is obtained. On the other hand, by multiplying and summing the integer part α and data and adding both, the overall calculation result can be obtained, and the calculation in the low frequency band can be performed with a 16-bit data length with sufficient accuracy. obtain.
(ヘ)実施例 第1図は本発明の実施例を示す低周波帯域デジタルフィ
ルタの回路図である。図において、(29)で示されるZ
-1は単位時間(ここではサンプリング周期)の遅延素子
であり、サンプリング信号によって動作するラッチ回路
やメモリによって構成することができる。(30)は定数
の乗算素子、(31)は加算素子であり、乗算回路及び加
算回路によって構成される。(F) Embodiment FIG. 1 is a circuit diagram of a low frequency band digital filter showing an embodiment of the present invention. In the figure, Z indicated by (29)
-1 is a delay element of unit time (here, sampling period), which can be configured by a latch circuit or a memory operated by a sampling signal. (30) is a constant multiplication element, and (31) is an addition element, which is composed of a multiplication circuit and an addition circuit.
第8図に示された従来のデジタルフィルタの場合、中心
周波数が200Hz程度の低周波帯域になると、定数C1〜C5
の有効桁数は、16ビットで表わすことができなくなる。
そこで、本発明に於ては、各定数をα+β・δという形
に変換する。即ち、αは、定数の最も近い整数であり、
βは整数αと元の定数Cとの差を1より小さい数δで割
った商である。中心周波数を200Hzとすると定数C1〜C5
は、 C1=1+a・δ C2=−2+b・δ C3=1+c・δ C4=2+d・δ C5=−1+e・δ となる。ここでδは1/2n(nは整数)とする。これらを
(1)式に代入すると Yi=Xi−2Xi-1+Xi-2+2Yi-1−Yi-2+δ(aXi+bXi-1+cXi-2+dYi-1+eYi-2) =Xi−2(Xi-1−Yi-1)+Xi-2−Yi-2+δ(aXi+bXi-1+cXi-2+dYi-1+e
Yi-2) となる。In the case of the conventional digital filter shown in FIG. 8, when the center frequency is in the low frequency band of about 200 Hz, the constants C 1 to C 5
The number of significant digits of can not be represented by 16 bits.
Therefore, in the present invention, each constant is converted into the form α + β · δ. That is, α is the nearest integer constant,
β is a quotient obtained by dividing the difference between the integer α and the original constant C by a number δ smaller than 1. If the center frequency is 200Hz, the constants C 1 to C 5
Is C 1 = 1 + a · δ C 2 = −2 + b · δ C 3 = 1 + c · δ C 4 = 2 + d · δ C 5 = −1 + e · δ. Here, δ is 1/2 n (n is an integer). Substituting these into the equation (1), Y i = X i −2X i-1 + X i-2 + 2Y i-1 −Y i-2 + δ (aX i + bX i-1 + cX i-2 + dY i-1 + eY i -2 ) = X i- 2 (X i-1 -Y i-1 ) + X i-2 -Y i-2 + δ (aX i + bX i-1 + cX i-2 + dY i-1 + e
Y i-2 ).
第1図はこの積和演算を実現する回路である。即ち、aX
i+bXi-1+cXi-2+dYi-1+eYi-2の演算結果を求めてδ
を乗算し、該乗算結果に入力データXiと、2サンプリン
グ前のデータXi-2−Yi-2を加算し、更に、その結果か
ら、1サンプリング前のデータXi-1−Yi-1に2を乗算し
たものを引いて、出力データYiを算出する。従って、16
ビットで十分有効桁が表わされる定数a,b,c,d,eを用い
て積和演算を行うので小数点以下の演算精度が向上す
る。FIG. 1 shows a circuit that realizes the product-sum calculation. That is, aX
i + bX i-1 + cX i-2 + dY i-1 + eY i-2
And the input data X i and the data X i-2 −Y i-2 two samplings before are added to the multiplication result, and from the result, the data X i−1 −Y i one sampling before is added. The output data Y i is calculated by subtracting -1 multiplied by 2. Therefore, 16
Since the sum-of-products operation is performed using the constants a, b, c, d, and e, in which the significant digits are sufficiently represented by bits, the operation precision below the decimal point is improved.
第2図は、グラフィックイコライザを実現する回路であ
る。即ち、第1図及び第8図に示されたフィルタを縦続
接続したものであり、1段目では、入力データがXi、定
数がA,B,C,D,E,出力がYiであり、2段目では、入力デー
タがYi、定数がa,b,c,d,e,δ,2,出力データがZiとな
る。FIG. 2 shows a circuit that realizes the graphic equalizer. That is, the filters shown in FIG. 1 and FIG. 8 are connected in cascade. In the first stage, the input data is X i , the constants are A, B, C, D, E, and the output is Y i . Yes, in the second stage, the input data is Y i , the constants are a, b, c, d, e, δ, 2, and the output data is Z i .
第1図及び第2図に示されたデジタルフィルタは、DSP
を用いてプログラムソフトで実現することも可能であ
る。The digital filter shown in FIG. 1 and FIG.
It is also possible to realize with program software using.
第3図は、デジタルフィルタ実現する場合に好都合なオ
ーディオ用DSPのブロック図であり、一対のデジタル処
理回路(9)(10)と、該デジタル処理回路(9)(1
0)のデータバス(BUS1)(BUS2)(11)に接続された
データ入出力回路(12)と、同様にデータバス(11)に
接続されたインターフェイス回路(13)と、これらデジ
タル処理回路(9)(10)、データ入出力回路(12)、
及びインターフェイス回路(13)の動作を制御する制御
回路(14)とから構成される。FIG. 3 is a block diagram of an audio DSP which is convenient for realizing a digital filter, and includes a pair of digital processing circuits (9) (10) and the digital processing circuits (9) (1).
Data input / output circuit (12) connected to the data bus (BUS1) (BUS2) (11) of (0), an interface circuit (13) similarly connected to the data bus (11), and these digital processing circuits (12). 9) (10), data input / output circuit (12),
And a control circuit (14) for controlling the operation of the interface circuit (13).
データバス(11)は、各々8ビット×3の24ビット構成
である。データ入出力回路(12)は、入力端子INに外部
から印加された16ビットの左チャンネルと右チャンネル
のサンプリングデータ(例えば、CDプレーヤの場合はサ
ンプリング周波数が44.1KHzのデータ)をシリアルに入
力し、左チャンネルのデータはデータバス(11)のBUS1
に、右チャンネルのデータはデータバス(11)のBUS2に
送出し、更に、データバスBUS1に送出された処理済の左
チャンネルのデータとデータバスBUS2に送出された処理
済の右チャンネルのデータを受け取り、出力端子OUTか
ら交互にシリアル出力するものである。インターフェイ
ス回路(13)は、DSPシステムとマイクロコンピュータ
(不図示)の間のデータ送受を行うものであり、マイク
ロコンピュータから印加されたデジタルフィルタの定数
等をデータバス(11)に各々送出し、また、データバス
(11)に送出されたシステムステイタスデータ等を受け
取りマイクロコンピュータに送出するものである。デー
タ処理回路(9)は左チャンネルのデータ処理用で、デ
ータ処理回路(10)は右チャンネルのデータ処理用であ
り、各々全く同じ構成から成る。即ち、データ処理回路
(9)(10)は、データバス(11)、データRAM(1
5)、定数RAM(16)、定数ROM(17)、アドレスポイン
タ(18)(19)(20)、乗算器(MUL)(21)、ALU(2
2)、アキュームレータ(ACC)(23)、テンポラリーレ
ジスタ(TMP1,TMP2,……)(24)を有している。データ
RAM(15)は、データ入出力回路(12)から送出された
処理前のデータ及び演算処理後のデータを記憶する24ビ
ット×128の容量を持つ第1のRAMであり、データバス
(11)及び乗算器(21)の入力に接続される。定数RAM
(16)は、インターフェイス回路(13)から送出される
デジタルフィルタの係数等の定数を記憶する16ビット×
256の容量を持つ第2のRAMであり、データバス(11)及
び乗算器(21)の他方の入力に接続される。アドレスポ
インタ(18)は、8ビットで構成されデータRAM(15)
のアドレス指定を行うものであり、制御回路(14)から
出力されるマイクロコードINC1及びDEC1で制御され、保
持しているアドレスデータをインクリメント(+1)及
びデクリメント(−1)する機能を備えると共に、プロ
グラムによって任意の値が設定できるレジスタと、設定
された値とアドレスデータを比較する回路を内蔵し、ア
ドレスデータをインクリメントした結果が設定値を越え
ると「0」になり、デクリメントの結果が「0」未満に
しなると設定値になる機能、即ち、「0」と設定値の間
を循環する機能を有している。この循環アドレス指定機
能を使用してデジタルフィルタの積和演算を簡単化して
いる。また、アドレスポインタ(19)は、定数RAM(1
6)のアドレスを指定する10ビットのポインタであり、
制御回路(14)から出力されるマイクロコードINC2で制
御され、アドレスデータをインクリメントする機能と、
制御回路(14)から出力されるマイクロコードCLEAR2に
よって「0」にクリアされる機能を有している。更に、
アドレスポインタ(20)は、定数ROM(17)のアドレス
を指定する8ビットのポインタであり、制御回路(14)
から出力されるマイクロコードDEC3によってアドレスデ
ータをデクリメントする機能を有している。The data bus (11) has a 24-bit structure of 8 bits × 3. The data input / output circuit (12) serially inputs 16-bit left-channel and right-channel sampling data (for example, in the case of a CD player, the sampling frequency is 44.1 kHz) to the input terminal IN serially. , Left channel data is BUS1 of data bus (11)
The data of the right channel is sent to BUS2 of the data bus (11), and the processed left channel data sent to the data bus BUS1 and the processed right channel data sent to the data bus BUS2 are sent. It receives and alternately outputs serially from the output terminal OUT. The interface circuit (13) sends and receives data between the DSP system and a microcomputer (not shown), and sends constants of the digital filter applied from the microcomputer to the data bus (11). , Receives the system status data and the like sent to the data bus (11) and sends them to the microcomputer. The data processing circuit (9) is for left channel data processing, and the data processing circuit (10) is for right channel data processing. That is, the data processing circuits (9) (10) are connected to the data bus (11) and the data RAM (1
5), constant RAM (16), constant ROM (17), address pointers (18) (19) (20), multiplier (MUL) (21), ALU (2
2), accumulator (ACC) (23), and temporary registers (TMP1, TMP2, ...) (24). data
The RAM (15) is a first RAM having a capacity of 24 bits × 128 for storing the data before processing and the data after arithmetic processing sent from the data input / output circuit (12), and the data bus (11) And the input of the multiplier (21). Constant RAM
(16) is a 16-bit memory for storing constants such as digital filter coefficients sent from the interface circuit (13) ×
A second RAM having a capacity of 256, which is connected to the data bus (11) and the other input of the multiplier (21). The address pointer (18) consists of 8 bits and is a data RAM (15)
Addressing is performed, which is controlled by microcodes INC1 and DEC1 output from the control circuit (14) and has a function of incrementing (+1) and decrementing (-1) the held address data, It has a register that can set an arbitrary value by a program and a circuit that compares the set value with the address data. When the result of incrementing the address data exceeds the set value, it becomes "0", and the decrement result becomes "0". When it is less than ", it has a function of setting value, that is, a function of circulating between" 0 "and the setting value. This circular addressing function is used to simplify the product-sum operation of digital filters. In addition, the address pointer (19) is a constant RAM (1
6) is a 10-bit pointer that specifies the address of
Controlled by the microcode INC2 output from the control circuit (14), the function to increment the address data,
It has the function of being cleared to "0" by the microcode CLEAR2 output from the control circuit (14). Furthermore,
The address pointer (20) is an 8-bit pointer that specifies the address of the constant ROM (17), and the control circuit (14)
It has the function of decrementing the address data by the microcode DEC3 output from.
乗算器(21)は、24ビット×16ビットの乗算をするもの
であり、A入力は24ビット、B入力は16ビットで、その
乗算結果は1サイクル後に確定するものである。更に、
乗算器(21)のA入力とB入力には、入力選択回路MPXA
とMPXBが設けられ、入力選択回路MPXAは、制御回路(1
4)からのマイクロコードA−BUSによりデータバス(1
1)を選択し、マイクロコードA−DRAMによりデータRAM
(15)を選択してA入力に印加し、入力選択回路MPXB
は、マイクロコードB−BUSによりデータバス(11)を
選択し、マイクロコードB−CRAMにより定数RAM(16)
を選択し、マイクロコードB−CROMにより定数ROM(1
7)を選択してB入力に印加する。乗算結果は32ビット
で出力される。The multiplier (21) performs multiplication of 24 bits × 16 bits, the A input is 24 bits and the B input is 16 bits, and the multiplication result is determined after one cycle. Furthermore,
The input selection circuit MPXA is used for the A and B inputs of the multiplier (21).
And MPXB are provided, and the input selection circuit MPXA is a control circuit (1
Data bus (1 by microcode A-BUS from 4)
Select 1) and use microcode A-DRAM to data RAM
(15) is selected and applied to the A input, and the input selection circuit MPXB
Selects the data bus (11) with the microcode B-BUS and the constant RAM (16) with the microcode B-CRAM.
And select the constant ROM (1
Select 7) and apply to the B input. The multiplication result is output in 32 bits.
ALU(22)は32ビットの演算回路であり、一方に入力さ
れた32ビットの乗算結果と他方に入力された32ビットの
ACC(23)のデータをマイクロコードAddによって加算処
理して、その結果をACC(23)に転送する。ACC(23)の
32ビットのうち、上位24ビットはデータバス(11)と接
続され、下位8ビットは補助バス(25)によってテンポ
ラリーレジスタ(24)の下位8ビットと接続されてい
る。テンポラリーレジスタ(24)は、32ビットのレジス
タTMP1,TMP2……TMP8で構成され、32ビットのデータを
最大8個保持するレジスタであり、各々の上位24ビット
はデータバス(11)と接続される。データバス(11)と
補助バス(25)によって、テンポラリーレジスタ(24)
とACC(23)間で32ビットデータの転送が行われる。The ALU (22) is a 32-bit arithmetic circuit, and the 32-bit multiplication result input to one side and the 32-bit arithmetic result input to the other side.
The data of ACC (23) is added by microcode Add and the result is transferred to ACC (23). ACC (23)
Of the 32 bits, the upper 24 bits are connected to the data bus (11) and the lower 8 bits are connected to the lower 8 bits of the temporary register (24) by the auxiliary bus (25). The temporary register (24) is composed of 32-bit registers TMP1, TMP2 ... TMP8, and holds up to eight 32-bit data. The upper 24 bits of each are connected to the data bus (11). . Temporary register (24) with data bus (11) and auxiliary bus (25)
32-bit data is transferred between ACC and ACC (23).
制御回路(14)は、プログラムを記憶するプログラムRO
M(26)と、プログラムROM(26)のアドレスを指定する
プログラムカウンタ(PC)(27)と、読み出された命令
を解読するインストラクションデコーダ(I−DEC)(2
8)とを有する。プログラムROM(26)は、32ビット×51
2の容量を有し、デジタルフィルタを実現するためのプ
ログラム、及び、その他必要なプログラムが格納され
る。インストラクションデコーダ(28)は、命令を解読
してマイクロコードを出力するものであり、アドレスポ
インタ(18)(19)(20)を制御するINC1,INC2,DEC1,C
LEAR2,DEC3や、入力選択回路MPXA,MPXBを制御するA−B
US,A−DRAM,B−BUS,B−CRAM,B−CROM,あるいはALU(2
2)を制御するADD,THR等を出力する。このマイクロコー
ドは、各々データ処理回路(9)(10)の各部の共通す
る回路に印加されるため、一つの命令の実行によってデ
ータ処理回路(9)(10)を同時に同一の制御が行われ
る。The control circuit (14) is a program RO that stores the program.
M (26), a program counter (PC) (27) that specifies the address of the program ROM (26), and an instruction decoder (I-DEC) (2) that decodes the read instruction.
8) and Program ROM (26) is 32 bits x 51
It has a capacity of 2 and stores a program for realizing a digital filter and other necessary programs. The instruction decoder (28) decodes an instruction and outputs a microcode, and controls the address pointers (18) (19) (20) INC1, INC2, DEC1, C.
AB for controlling LEAR2, DEC3 and input selection circuits MPXA, MPXB
US, A-DRAM, B-BUS, B-CRAM, B-CROM, or ALU (2
2) Output ADD, THR, etc. that control Since this microcode is applied to a common circuit of each part of the data processing circuits (9) and (10), the same control is simultaneously performed on the data processing circuits (9) and (10) by executing one instruction. .
第3図に示されたDSPシステムに於いて、デジタルフィ
ルタを構成するために必要な命令の例を第4図に示す。
第4図に於いて、MUL命令は乗算命令であり、乗算器(2
1)の入力A及び入力Bに入力される対象を選択し、乗
算を行わせるものである。AP命令は、アドレスポインタ
(18)(19)(20)のインクリメント、デクリメントあ
るいはクリアを行うものである。ALU命令はALU(22)の
制御命令であり、ALUADDは、入力された2つのデータを
ALU(22)で加算し、加算結果をACC(23)に保持させ、
ALUSUBは一方の入力のデータから他方の入力のデータを
減算し、減算結果をACC(23)に保持させ、ALUTHRは、
乗算器(21)からの乗算結果をそのままACC(23)に保
持させる命令である。RAM1D,TMP1D,TMP2D,TMP3Dはスト
ア命令であり、データバス(11)のデータをデータRAM
(15)、テンポラリーレジスタ(24)に記憶させる。AC
LS,TMP1S,TMP2S,TMP3Sは転送命令であり、ACC(23)、
テンポラリーレジスタ(24)のデータをデータバス(1
1)及び補助バス(25)に送出する命令である。In the DSP system shown in FIG. 3, an example of the instructions necessary to configure the digital filter is shown in FIG.
In FIG. 4, the MUL instruction is a multiply instruction, and the multiplier (2
The object to be input to the input A and the input B of 1) is selected and multiplication is performed. The AP instruction increments, decrements or clears the address pointers (18) (19) (20). The ALU command is a control command for ALU (22), and ALUADD stores the two input data.
Add with ALU (22), hold the addition result in ACC (23),
ALUSUB subtracts the data of one input from the data of the other input, and the subtraction result is held in ACC (23).
This is an instruction to hold the multiplication result from the multiplier (21) in the ACC (23) as it is. RAM1D, TMP1D, TMP2D, TMP3D are store instructions, and the data on the data bus (11) is data RAM
(15), it is stored in the temporary register (24). AC
LS, TMP1S, TMP2S, TMP3S are transfer instructions, and ACC (23),
Data of temporary register (24) is transferred to data bus (1
1) and an instruction to send to the auxiliary bus (25).
次に、第3図に示されたDSPシステムを用いて、第2に
示されるようなグラフィックイコライザを実現する方法
を説明する。Next, a method for realizing the graphic equalizer as shown in the second by using the DSP system shown in FIG. 3 will be described.
第5図は、第2図のデジタルフィルタを実現するプログ
ラムを示す図であり、第6図は、データRAM(15)、定
数RAM(16)、及びテンポラリーレジスタ(24)に記憶
されるデータの割付け図である。第5図のプログラムに
より定数の乗算は、C,B,A,E,D,c,b,a,e,dの順で行うた
めに定数RAM(16)のアドレス「0」から「9」までに
は、同一順序で定数が格納される。一方、データRAM(1
5)には、xi,yi,ziのデータが3アドレスおきに書き
込まれるが、サンプリング周期、即ち、1つの入力デー
タxi+1に対する演算処理毎に、1アドレスずらして
xi+1,yi+1,zi+1を書き込むことにより、遅延素子(2
9)による遅延データを作成している。よって、第2図
に示されたデジタルフィルタの場合には、アドレスポイ
ンタ(18)は「0」〜「7」の循環アドレス指定、及
び、アドレスポインタ(19)は「0」〜「9」の循環ア
ドレス指定となるように予めプログラムによって設定し
ておく。FIG. 5 is a diagram showing a program for realizing the digital filter of FIG. 2, and FIG. 6 shows data stored in the data RAM (15), the constant RAM (16), and the temporary register (24). FIG. Since the multiplication of constants is performed in the order of C, B, A, E, D, c, b, a, e, d by the program of FIG. 5, the constant RAM (16) addresses "0" to "9" Up to, constants are stored in the same order. On the other hand, data RAM (1
In 5), the data of x i , y i , and z i are written every 3 addresses, but the sampling cycle, that is, one address is shifted for each calculation process for one input data x i + 1 .
By writing x i + 1 , y i + 1 , and z i + 1 , the delay element (2
We are creating delay data according to 9). Therefore, in the case of the digital filter shown in FIG. 2, the address pointer (18) is circular addressing of "0" to "7", and the address pointer (19) is "0" to "9". It is set in advance by a program so that the cyclic address is designated.
ここで、入力データxiに対して第5図のプログラムのス
テップ「0」を実行する時点に於いて、データRAM(1
5)の内容が第6図(イ)の如くであり、アドレスポイ
ンタ(18)(19)が共にアドレス「0」であるとき、ス
テップ「0」が実行されると、乗算器(21)の入力A及
びBには、データRAM(15)のアドレス「0」に記憶さ
れている。データxi-2(2サンプル前の入力データ)と
定数RAM(16)のアドレス「0」に記憶されている係数
Cが印加されるが、その乗算結果は、次のステップで確
定し出力される。また、ステップ「0」の最後に、命令
AP1INC,AP2INCにより、アドレスポインタ(18)(19)
が共にインクリメントされ、その内容が「1」となる。Here, when the step "0" of the program of FIG. 5 is executed for the input data x i , the data RAM (1
When the content of 5) is as shown in FIG. 6 (a), and when the address pointers (18) and (19) are both addresses "0", when step "0" is executed, the multiplier (21) The inputs A and B are stored at the address "0" of the data RAM (15). The data x i-2 (input data two samples before) and the coefficient C stored at the address “0” of the constant RAM (16) are applied, but the multiplication result is determined and output in the next step. It Also, at the end of step "0",
Address pointer (18) (19) by AP1INC and AP2INC
Are incremented together, and the content becomes "1".
ステップ「1」が実行されると、ステップ「0」と同様
にデータRAM(15)と定数RAM(16)が乗算器(21)の入
力として選択され、各々、アドレス「1」に記憶された
データxi-1と定数Bが乗算器(21)に印加される。ま
た、前回のステップ「0」で乗算された結果は、命令AL
UTHRにより、ALU(22)を素通りしてACC(23)に最初の
乗算結果C・xi-2がストアされる。ステップ「1」の最
後に、命令AP1INC,AP2INCにより、アドレスポインタ(1
8)(19)がインクリメントされ、その内容はアドレス
「2」となる。When the step "1" is executed, the data RAM (15) and the constant RAM (16) are selected as the input of the multiplier (21) as in the step "0", and stored in the address "1" respectively. The data x i-1 and the constant B are applied to the multiplier (21). In addition, the result of multiplication at the previous step "0" is the instruction AL.
The UTHR stores the first multiplication result C · x i−2 in ACC (23) by passing it through ALU (22). At the end of step "1", the address pointer (1
8) (19) is incremented and the content becomes address "2".
次に、ステップ「2」が実行されると、命令MULA−BUS,
B−CRAMにより、乗算器(21)の入力Aにはデータバス
(11)、入力Bには定数RAM(16)が選択される。一
方、命令TMP1Sにより、テンポラリーレジスタTMP1の内
容がデータバス(11)に送出され、命令RAM1Dにより、
データバス(11)に送出されたデータが、アドレスポイ
ンタ(18)で指定されるデータRAM(15)のアドレス
「2」にストアされる。このとき、テンポラリーレジス
タTMP1には、サンプリング周期毎にデータ入力回路(1
2)に外部から印加された入力データxiが予めストアさ
れている。従って、入力データxiは、乗算器(21)によ
って定数RAM(16)から読み出された定数Aと乗算され
ると共に、データRAM(15)のアドレス「2」にストア
される。一方、命令ALUADDにより、ACC(23)にストア
されているC・xi-2とステップ「1」の乗算結果B・x
i-1の加算が行われ、その結果B・xi-1+C・xi-2がACC
(23)にストアされる。ステップ「2」の最後に、アド
レスポインタ(18)(19)がインクリメントされ、その
内容はアドレス「3」となる。Next, when step "2" is executed, the command MULA-BUS,
The B-CRAM selects the data bus (11) for the input A and the constant RAM (16) for the input B of the multiplier (21). On the other hand, the instruction TMP1S sends the contents of the temporary register TMP1 to the data bus (11), and the instruction RAM1D
The data sent to the data bus (11) is stored in the address "2" of the data RAM (15) designated by the address pointer (18). At this time, the temporary register TMP1 has a data input circuit (1
Input data x i applied from the outside is stored in advance in 2). Therefore, the input data x i is multiplied by the constant A read from the constant RAM (16) by the multiplier (21) and is stored in the address “2” of the data RAM (15). On the other hand, by the command ALUADD, the multiplication result B · x of C · x i−2 stored in ACC (23) and step “1”
i-1 is added, and as a result, B · x i-1 + C · x i-2 is ACC
Stored in (23). At the end of step "2", the address pointers (18) and (19) are incremented, and the content becomes the address "3".
ステップ「3」が実行されると、乗算器(21)の入力A
及びBには、データRAM(15)と定数RAM(16)のアドレ
ス「3」にストアされているデータyi-2と定数Eが印加
され、命令ALUADDにより、ステップ「2」の乗算結果A
・xiとACC(23)の内容B・xi-1+C・xi-2がALU(22)
に於いて加算され、加算結果A・xi+B・xi-1+C・x
i-2がACC(23)にストアされる。ステップ「3」の最後
にアドレスポインタ(18)(19)がインクリメントさ
れ、アドレス「4」となる。When step "3" is executed, the input A of the multiplier (21) is input.
The data y i-2 and the constant E stored in the address “3” of the data RAM (15) and the constant RAM (16) are applied to B and B, and the multiplication result A of the step “2” is given by the instruction ALUADD.
・ Contents of x i and ACC (23) B ・ x i-1 + C ・ x i-2 is ALU (22)
The result of addition is A · x i + B · x i-1 + C · x
i-2 is stored in ACC (23). At the end of step "3", the address pointers (18) and (19) are incremented to become the address "4".
ステップ「4」が実行されると、乗算器(21)の入力A
及びBには、データRAM(15)の定数RAM(16)のアドレ
ス「4」にストアされているデータyi-1と定数Dが印加
され、命令ALUADDにより、ステップ「3」の乗算結果E
・yi-2とACC(23)の内容A・xi-1+B・xi-1+C・x
i-2がALU(22)に於いて加算され、加算結果A・xi+B
・xi-1+C・xi-2+E・yi-2がACC(23)にストアされ
る。ステップ「4」の最後に、命令AP1DEC,AP2INCによ
り、アドレスポインタ(18)はデクリメントされて、ア
ドレス「3」となり、アドレスポインタ(19)はインク
リメントされてアドレス「5」となる。When step "4" is executed, the input A of the multiplier (21)
The data y i-1 stored at the address “4” of the constant RAM (16) of the data RAM (15) and the constant D are applied to B and B, and the multiplication result E of step “3” is given by the instruction ALUADD.
・ The contents of y i-2 and ACC (23) A ・ x i-1 + B ・ x i-1 + C ・ x
i-2 is added in ALU (22), and the addition result is A · x i + B
-X i-1 + C * x i-2 + E * y i-2 is stored in ACC (23). At the end of step “4”, the address pointer (18) is decremented to the address “3” by the instructions AP1DEC and AP2INC, and the address pointer (19) is incremented to the address “5”.
ステップ「5」が実行されると、乗算器(21)の入力A
及びBには、データRAM(15)のアドレス「3」にスト
アされたデータyi-2と定数RAM(16)のアドレス「5」
にストアされた定数cが印加される。即ち、乗算器(2
1)は、このステップ「5」から第2図に示されたデジ
タルフィルタの2段目の乗算を行う。一方、命令ALUADD
により、ステップ「4」の乗算結果D・yi-1とACC(2
3)の内容A・xi+B・xi-1+C・xi-2+E・yi-2がALU
(22)に於いて加算され、加算結果A・xi+B・xi-1+
C・xi-2+D・yi-1+E・yi-2がACC(23)にストアさ
れる。このときACC(23)の内容は、1段目のデジタル
フィルタの出力yiとなる。ステップ「5」の最後にアド
レスポインタ(18)はインクリメントされてアドレス
「4」となり、アドレスポインタ(19)はインクリメン
トされてアドレス「6」となる。When step “5” is executed, the input A of the multiplier (21) is input.
In and B, the data y i-2 stored at the address “3” of the data RAM (15) and the address “5” of the constant RAM (16).
The constant c stored in is applied. That is, the multiplier (2
In step 1), the multiplication of the second stage of the digital filter shown in FIG. 2 is performed from step "5". Meanwhile, the instruction ALUADD
Results in multiplication result of step “4” D · y i-1 and ACC (2
3) Content A ・ x i + B ・ x i-1 + C ・ x i-2 + E ・ y i-2 is ALU
It is added in (22), and the addition result is A · x i + B · x i-1 +
C · x i-2 + D · y i-1 + E · y i-2 are stored in ACC (23). At this time, the content of ACC (23) becomes the output y i of the first-stage digital filter. At the end of step "5", the address pointer (18) is incremented to the address "4", and the address pointer (19) is incremented to the address "6".
ステップ「6」が実行されると、乗算器(21)の入力A
及びBには、データRAM(15)のアドレス「4」にスト
アされたデータyi-1と定数RAM(16)のアドレス「6」
にストアされた定数bが印加される。また、命令ACCに
より、ACC(23)にストアされたデータyiがデータバス
(11)に送出され、命令TMP1Dにより、データバス(1
1)に送出されたデータyiがテンポラリーレジスタTMP1
にストアされる。一方、命令ALUTHRにより、ステップ
「5」の乗算結果c・yi-2は、ALU(22)を素通りしてA
CC(23)にストアされる。ステップ「6」の最後にアド
レスポインタ(18)(19)はインクリメントされて、ア
ドレス「5」とアドレス「7」になる。When step "6" is executed, the input A of the multiplier (21) is input.
In and B, the data y i-1 stored in the address “4” of the data RAM (15) and the address “6” of the constant RAM (16) are stored.
The constant b stored in is applied. Further, the instruction ACC sends the data y i stored in the ACC (23) to the data bus (11), and the instruction TMP1D sends it to the data bus (1
1) Data y i sent to 1) is temporary register TMP1
Will be stored in. On the other hand, the instruction ALUTHR causes the multiplication result c · y i-2 of step “5” to pass directly through ALU (22) to A.
Stored in CC (23). At the end of step "6", the address pointers (18) and (19) are incremented to the addresses "5" and "7".
ステップ「7」が実行されると、命令MULA−BUS,B−CRA
Mにより、乗算器(21)の入力A及びBには、データバ
ス(11)に送出されたデータと定数RAM(16)のアドレ
ス「7」にストアされた定数aが印加される。また、命
令TMP1S及びRAM1Dにより、テンポラリーレジスタTMP1に
ストアされたデータyiは、データバス(11)に送出され
て乗算器(21)の入力Aに印加されると共に、アドレス
ポインタ(18)で指定されたデータRAM(15)のアドレ
ス「5」にストアされる。一方、命令ALUADDによりステ
ップ「6」の乗算結果b・yi-1とACC(23)のc・yi-2
がALU(22)に於いて加算され、その結果b・yi-1+c
・yi-2がACC(23)にストアされる。ステップ「7」の
最後に、アドレスポインタ(18)(19)はインクリメン
トされてアドレス「6」とアドレス「8」になる。When step "7" is executed, the commands MULA-BUS, B-CRA
By M, the data sent to the data bus (11) and the constant a stored at the address "7" of the constant RAM (16) are applied to the inputs A and B of the multiplier (21). The data y i stored in the temporary register TMP1 by the instructions TMP1S and RAM1D is sent to the data bus (11) and applied to the input A of the multiplier (21) and designated by the address pointer (18). The data is stored in the address "5" of the data RAM (15). On the other hand, by the instruction ALUADD, the multiplication result b · y i-1 of step “6” and c · y i-2 of ACC (23).
Are added in ALU (22), and the result is b · y i-1 + c
・ Y i-2 is stored in ACC (23). At the end of step "7", the address pointers (18) and (19) are incremented to address "6" and address "8".
ステップ「8」が実行されると、乗算器(21)の入力A
及びBには、データRAM(15)のアドレス「6」にスト
アされたデータzi-2と定数RAM(16)のアドレス「8」
にストアされた定数eが印加され、一方ALU(22)に於
いてステップ「7」の乗算結果a・yiとACC(23)にス
トアされたデータb・yi-1+c・yi-2が加算され、その
結果a・yi+b・yi-1+c・yi-2がACC(23)にストア
される。ステップ「8」の最後にアドレスポインタ(1
8)(19)はインクリメントされて、アドレス「7」と
アドレス「9」になる。When step “8” is executed, the input A of the multiplier (21) is input.
In and B, the data z i-2 stored in the address “6” of the data RAM (15) and the address “8” of the constant RAM (16) are stored.
Stored in the the constant e is applied, whereas the multiplication result a · y i and ACC (23) b · Data is stored in y the ALU (22) in at step "7" i-1 + c · y i- 2 is added, and as a result, a · y i + b · y i-1 + c · y i-2 is stored in ACC (23). At the end of step "8", the address pointer (1
8) (19) is incremented to become address "7" and address "9".
ステップ「9」が実行されると、乗算器(21)の入力A
及びBには、データRAM(15)のアドレス「7」にスト
アされたデータzi-1と定数RAM(16)のアドレス「9」
にストアされた定数dが印加され、一方ALU(22)に於
いて、ステップ「8」の乗算結果e・zi-2とACC(23)
にストアされたデータa・yi+b・yi-1+c・yi-2が加
算され、加算結果a・yi+b・yi-1+c・yi-2+e・z
i-2がACC(22)にストアされる。ステップ「9」の最後
にアドレスポインタ(18)(19)はインクリメントされ
ると、アドレスポインタ(18)(19)は共にアドレス
「0」となる。When step "9" is executed, the input A of the multiplier (21) is input.
In and B, the data z i-1 stored at the address “7” of the data RAM (15) and the address “9” of the constant RAM (16) are stored.
Is applied to the constant d, while in ALU (22), the multiplication result of step "8" e · z i-2 and ACC (23)
The data a.yi + b.yi -1 + c.yi -2 stored in is added and the addition result a.yi + b.yi -1 + c.yi -2 + e.z
i-2 is stored in ACC (22). When the address pointers (18) and (19) are incremented at the end of step "9", both the address pointers (18) and (19) become the address "0".
ステップ「10」が実行されると乗算は行われず、ステッ
プ「9」の乗算結果d・zi-1とACC(23)にストアされ
たデータa・yi+b・yi-1+c・yi-2+e・zi-2がALU
(22)に於いて加算され、その加算結果a・yi+b・y
i-1+c・yi-2+d・zi-1+e・zi-2がACC(23)にスト
アされる。When step “10” is executed, multiplication is not performed, and the multiplication result d · z i−1 of step “9” and the data a · y i + b · y i-1 + c · y stored in ACC (23) are obtained. i-2 + e · z i-2 is ALU
It is added in (22), and the addition result is a ・ y i + b ・ y
i-1 + c · y i-2 + d · z i-1 + e · z i-2 is stored in ACC (23).
ステップ「11」が実行されるとACC(23)にストアされ
たデータがnビット右方向にシフトされる。シフトされ
た結果は、δ(a・yi+b・yi-1+c・yi-2+d・zi-1
+e・zi-2となる。即ち、δは1/2nと設定されているた
め、右方向にnビットシフトすることが1/2nを乗算した
ことになる。ステップ「12」が実行されると、命令TMP3
Sにより、テンポラリーレジスタTMP3に保持されている
データyi-2−zi-2がデータバス(11)に送出され、ALU
(22)に於いて、ACC(23)のデータと加算され、その
加算結果、yi-2−zi-2+δ(a・yi+b・yi-1+c・y
i-2+d・zi-1+d・zi-2)がACC(23)に保持される。When step "11" is executed, the data stored in ACC (23) is shifted to the right by n bits. The shifted result is δ (a · y i + b · y i-1 + c · y i-2 + d · z i-1
+ E · z i-2 . That is, since δ is set to 1/2 n , shifting to the right by n bits is equivalent to multiplication by 1/2 n . When step "12" is executed, the instruction TMP3
By S, the data y i-2 −z i-2 held in the temporary register TMP3 is sent to the data bus (11) and the ALU
In (22), it is added to the data of ACC (23), and the addition result is y i-2 −z i −2 + δ (a · y i + b · y i-1 + c · y)
i-2 + d · z i-1 + d · z i-2 ) is held in ACC (23).
ステップ「13」が実行されると、命令TMP2Sによりテン
ポラリーレジスタTMP2のデータyi-1−zi-2がデータバス
(11)に送出されると共に、次のサンプリングデータの
処理の遅延データを得るために命令TMP3Dにより、デー
タyi-1−zi-1がテンポラリーレジスタTMP3に書き込まれ
る。一方、命令ALUSUBにより、ALU(22)に於いて、ACC
(23)に保持されたデータからデータバス(11)に送出
されたデータyi-1−zi-1が引算され、その結果がACC(2
3)に保持される。When step "13" is executed, the instruction TMP2S sends the data y i-1 -z i-2 of the temporary register TMP2 to the data bus (11) and obtains the delay data for the processing of the next sampling data. Therefore, the instruction y TMP3D writes the data y i-1 −z i−1 to the temporary register TMP3. On the other hand, by the command ALUSUB, ACC in ALU (22)
The data y i-1 −z i-1 sent to the data bus (11) is subtracted from the data held in (23), and the result is ACC (2
Held in 3).
ステップ「14」が実行されると、ステップ「13」と同
様、データバス(11)にデータyi-1−zi-1が送出され、
ALU(22)に於いて、ACC(23)に保持されたデータから
yi-1−zi-1が引算され、その結果がACC(23)に書き込
まれる。このときのACC(23)のデータは−2(yi-1−z
i-1)+(yi-2−zi-2)+δ(a・yi+b・yi-1+c・y
i-2+d・zi-1+e・zi-2)である。When step "14" is executed, the data y i-1 -z i-1 is sent to the data bus (11) as in step "13".
From the data held in ACC (23) at ALU (22)
y i-1 −z i-1 is subtracted, and the result is written in ACC (23). The data of ACC (23) at this time is -2 (y i-1 -z
i-1 ) + (y i-2 −z i-2 ) + δ (a ・ y i + b ・ y i-1 + c ・ y
i-2 + d · z i-1 + e · z i-2 ).
ステップ「15」が実行されると、命令TMP1Sにより、テ
ンポラリーレジスタTMP1のデータxiがデータバス(11)
に送出され、ALU(23)に於いて、ACC(23)のデータと
加算され、加算結果がACC(23)に書き込まれる。この
ときのACC(23)にデータは、yi-2(yi-1−zi-1)+(y
i-2−zi-2)+δ(a・yi+b・yi-1+c・yi-2+d・z
i-1+e・zi-2)、即ち、デジタルフィルタの出力デー
タziとなる。When step "15" is executed, the instruction TMP1S causes the data x i of the temporary register TMP1 to be transferred to the data bus (11).
To the ACC (23) and the addition result is written to the ACC (23). The data in ACC (23) at this time is y i-2 (y i-1 −z i-1 ) + (y
i-2 −z i-2 ) + δ (a ・ y i + b ・ y i-1 + c ・ y i-2 + d ・ z
i−1 + e · z i−2 ), that is, the output data z i of the digital filter.
ステップ「16」が実行されると、命令ACCSによりACC(2
3)にストアされたデータziがデータバス(11)に送出
され、命令RAM1Dにより、アドレスポインタ(18)で指
定されたデータRAM(15)のアドレス「0」にストアさ
れる。When step "16" is executed, the instruction ACCS causes ACC (2
The data z i stored in 3) is sent to the data bus (11) and is stored in the address “0” of the data RAM (15) designated by the address pointer (18) by the instruction RAM1D.
ステップ「17」が実行されると、命令TMP1Sにより、テ
ンポラリーレジスタTMP1のデータyiがデータバス(11)
に送出され、命令ALUSUBにより、データyiからACC(2
3)にストアされたデータziがALU(22)で引算され、yi
−ziがACC(23)にストアされる。When step “17” is executed, the instruction TMP1S transfers the data y i of the temporary register TMP1 to the data bus (11).
Dispatched by instruction ALUSUB, from the data y i ACC (2
The data z i stored in 3) is subtracted by ALU (22) and y i
−z i is stored in ACC (23).
ステップ「18」が実行されると、命令ACCSにより、ACC
(23)にストアされたデータyi−ziがデータバス(11)
に送出され、命令TMP2Dにより、データバス(11)のデ
ータyi−ziがテンポラリーレジスタTMP2にストアされ、
次にサンプリングデータの処理のための遅延データとな
る。ステップ「18」の最後に命令AP1INCにより、アドレ
スポインタ(18)がインクリメントされてアドレス
「1」となる。従って、次のサンプリングデータxi+1の
処理開始時には、アドレスポインタ(18)でアドレスさ
れるデータRAM(15)は、アドレス「1」からアクセス
されることになり、前回のスタートアドレスより1アド
レス先にずれる。When step "18" is executed, the instruction ACCS causes ACC
The data y i −z i stored in (23) is stored in the data bus (11).
And the instruction TMP2D stores the data y i −z i of the data bus (11) in the temporary register TMP2,
Next, it becomes delay data for processing the sampling data. At the end of step "18", the instruction AP1INC increments the address pointer (18) to the address "1". Therefore, when the processing of the next sampling data x i + 1 is started, the data RAM (15) addressed by the address pointer (18) is accessed from the address “1”, which is one address after the previous start address. It shifts earlier.
以上のステップ「0」〜「18」のプログラムをサンプリ
ング周期毎に実行することにより、入力データxi,
xi+1,xi+2……に対するフィルタ処理が行われ、データ
RAM(15)の内容が第7図(イ)(ロ)(ハ)(ニ)…
…の如く変化し、フィルタ出力zi,zi+1,zi+2,……が
得られる。By executing the programs of the above steps “0” to “18” at each sampling cycle, the input data x i ,
Filtering is applied to x i + 1 , x i + 2 ...
The contents of RAM (15) are shown in Fig. 7 (a) (b) (c) (d) ...
.., and filter outputs z i , z i + 1 , z i + 2 ,.
このように、第8図に示されたデジタルフィルタと第1
図に示された低周波帯域デジタルフィルタの積和演算が
連続して行え得ると共に、定数の小数点以下の有効数次
を16ビットで表わされるようにして乗算するので乗算精
度が向上する。In this way, the digital filter shown in FIG.
The product-sum operation of the low-frequency band digital filter shown in the figure can be continuously performed, and since the effective number below the decimal point of the constant is multiplied by being represented by 16 bits, the multiplication precision is improved.
(ト)発明の効果 上述の如く本発明によれば、低周波帯域デジタルフィル
タにおいて、乗算のビット数を増加することなく乗算精
度を高くすることができるため、低周波帯域でのフィル
タ特性を良好に確保することができる。更に、他の低周
波帯域のフィルタ処理と連続して行うことがでる。特
に、DSPシステムによってグラフィックイコライザを実
現する場合、プログラムステップ数を短縮することがで
き、他の処理を行う余裕が生じ、DSPシステム全体のス
ループットの向上にも貢献するものである。(G) Effect of the Invention As described above, according to the present invention, in the low frequency band digital filter, since the multiplication accuracy can be increased without increasing the number of multiplication bits, the filter characteristic in the low frequency band is good. Can be secured. Further, it can be continuously performed with other low frequency band filtering. In particular, when a graphic equalizer is realized by a DSP system, the number of program steps can be shortened, there is room for other processing, and this also contributes to improvement in the throughput of the entire DSP system.
第1図は本発明の実施例を示す回路図、第2図は他の実
施例を示す回路図、第3図は第1図及び第2図に示され
たデジタルフィルタを実現するために好都合なDSPのブ
ロック図、第4図は第3図のDSP装置に用いられる命令
の例を示す図、第5図は第2図のグラフィックイコライ
ザを実現するプログラムを示す図、第6図は、データRA
M、定数RAM、及び、テンポラリーレジスタのデータ割付
け図、第7図は一般的なDSP装置のブロック図、第8図
は従来のデジタルフィルタの回路図である。 (9)(10)……デジタル処理回路、(12)……データ
入出力回路、(13)……インターフェイス回路、(14)
……制御回路、(11)……データバス、(15)……デー
タRAM、(16)……定数RAM、(17)……定数ROM、(1
8)(19)(20)……アドレスポインタ、(21)……乗
算器、(22)……ALU、(23)……アキュームレータ(A
CC)、(24)……テンポラリーレジスタ、(25)……補
助バス、(26)……プログラムROM、(27)プログラム
カウンタ、(28)……インストラクションデコーダ、
(29)……遅延素子、(30)……乗算素子、(31)……
加算素子。FIG. 1 is a circuit diagram showing an embodiment of the present invention, FIG. 2 is a circuit diagram showing another embodiment, and FIG. 3 is a convenient view for realizing the digital filter shown in FIGS. 1 and 2. 4 is a block diagram of a DSP, FIG. 4 is a diagram showing an example of instructions used in the DSP device of FIG. 3, FIG. 5 is a diagram showing a program for realizing the graphic equalizer of FIG. 2, and FIG. RA
FIG. 7 is a block diagram of a general DSP device, FIG. 8 is a circuit diagram of a conventional digital filter, and FIG. 7 is a data allocation diagram of M, a constant RAM, and a temporary register. (9) (10) …… Digital processing circuit, (12) …… Data input / output circuit, (13) …… Interface circuit, (14)
...... Control circuit, (11) …… Data bus, (15) …… Data RAM, (16) …… Constant RAM, (17) …… Constant ROM, (1
8) (19) (20) …… Address pointer, (21) …… Multiplier, (22) …… ALU, (23) …… Accumulator (A
CC), (24) …… temporary register, (25) …… auxiliary bus, (26) …… program ROM, (27) program counter, (28) …… instruction decoder,
(29) …… Delay element, (30) …… Multiplier element, (31) ……
Addition element.
Claims (1)
ルタ定数を各々、α+δ・β(αは定数に最も近い整
数、βは整数αとフィルタ定数の差を各フィルタ定数に
共通の数値δ≪1で割った値)の形に分解し、各々の係
数α、β、δを用いてフィルタ出力を得る低周波帯域デ
ジタルフィルタにおいて、 所定の時間単位毎に入力されるデジタルデータを前記時
間単位で遅延する複数の第1の遅延手段と、 前記入力されたデジタルデータ及び前記第1の遅延手段
の各遅延出力に各々対応する前記係数βを乗算する第1
の乗算手段と、 フィルタ出力のデジタルデータを前記時間単位で遅延す
る複数の第2の遅延手段と、 該第2の乗算手段の各遅延出力に各々対応する前記係数
βを乗算する第2の乗算手段と、 前記第1の乗算手段の各出力と前記第2の乗算出力の各
出力を加算する第1の加算手段と、 該第1の加算手段の加算結果に前記係数δを乗算する第
3の乗算手段と、 前記入力されたデジタルデータからフィルタ出力のデジ
タルデータを減算する減算手段と、 該減算手段の出力を前記時間単位で遅延する複数の第3
の遅延手段と、 該第3の遅延手段の所定出力に対応する前記係数αを乗
算する第4の乗算手段と、 前記入力されたデジタルデータ、前記第3の乗算手段の
乗算結果、前記第4の乗算手段の乗算結果、及び、前記
第3の遅延回路から出力されたデジタルデータを加算
し、該加算結果をフィルタ出力とする第2の加算手段
と、 からなる低周波帯域デジタルフィルタ。1. A plurality of filter constants of a low frequency band digital filter are respectively α + δβ (α is an integer closest to the constant, β is an integer α and the difference between the filter constants is a numerical value δ << 1 common to each filter constant. Divided by the value), and in the low-frequency band digital filter that obtains the filter output using each coefficient α, β, δ, delay the digital data input every predetermined time unit in the time unit. A plurality of first delay means, and a first multiplication means for multiplying the input digital data and each delay output of the first delay means by the corresponding coefficient β.
Means, a plurality of second delay means for delaying the digital data of the filter output by the time unit, and a second multiplication for multiplying each delay output of the second multiplying means by the corresponding coefficient β. Means, first adding means for adding each output of the first multiplying means and each output of the second multiplying output, and third means for multiplying the addition result of the first adding means by the coefficient δ. Multiplying means, subtracting means for subtracting digital data of a filter output from the input digital data, and a plurality of third delaying means for delaying the output of the subtracting means by the time unit.
Delay means, fourth multiplying means for multiplying the coefficient α corresponding to the predetermined output of the third delay means, the input digital data, the multiplication result of the third multiplying means, and the fourth A low-frequency band digital filter comprising: a second addition unit that adds the multiplication result of the multiplication unit and the digital data output from the third delay circuit and outputs the addition result as a filter output.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP23752689A JPH0695627B2 (en) | 1989-09-13 | 1989-09-13 | Low frequency digital filter |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP23752689A JPH0695627B2 (en) | 1989-09-13 | 1989-09-13 | Low frequency digital filter |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62179301A Division JP2630778B2 (en) | 1987-07-17 | 1987-07-17 | Method of configuring low frequency band digital filter |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH02140010A JPH02140010A (en) | 1990-05-29 |
| JPH0695627B2 true JPH0695627B2 (en) | 1994-11-24 |
Family
ID=17016638
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP23752689A Expired - Fee Related JPH0695627B2 (en) | 1989-09-13 | 1989-09-13 | Low frequency digital filter |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0695627B2 (en) |
-
1989
- 1989-09-13 JP JP23752689A patent/JPH0695627B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH02140010A (en) | 1990-05-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5216718A (en) | Method and apparatus for processing audio signals | |
| JPH0562495A (en) | Sampling frequency converter | |
| EP0405915B1 (en) | Audio signal data processing system | |
| US6032081A (en) | Dematrixing processor for MPEG-2 multichannel audio decoder | |
| JP2630778B2 (en) | Method of configuring low frequency band digital filter | |
| JPH0695627B2 (en) | Low frequency digital filter | |
| KR0147758B1 (en) | Synthesis filter of mpeg-2 audio decoder | |
| KR0134042B1 (en) | Digital Signal Processing Device and Signal Processing Method | |
| JP2943112B2 (en) | Digital signal processor | |
| JP3091574B2 (en) | Data conversion circuit and data conversion method | |
| JPH07101835B2 (en) | Digital signal processor | |
| JP2647991B2 (en) | Audio signal processing device having directionality enhancement | |
| JP2589199B2 (en) | Nonlinear conversion method of digital data and signal processing device using the same | |
| JP3022186B2 (en) | Digital signal processor | |
| JPH0410009A (en) | Nonlinear converting method for digital data and signal processor using said converting method | |
| JPH0719246B2 (en) | Digital signal processor | |
| JP2686234B2 (en) | Digital signal processing device and signal processing method | |
| JP2766191B2 (en) | Digital signal processing device and signal processing method | |
| JP3055564B2 (en) | Digital filter filter coefficient setting method | |
| JPH05252119A (en) | Sampling frequency converter | |
| JPH0553578A (en) | Effect addition device | |
| JPH02137514A (en) | Digital signal processor | |
| JPH04192910A (en) | Digital signal processor | |
| Tomarakos et al. | Using The Low-Cost, High Performance ADSP-21065L Digital Signal Processor For Digital Audio Applications | |
| JPH0748636B2 (en) | Arithmetic unit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |