JP5229993B2 - 1-chip electronic musical tone generator - Google Patents
1-chip electronic musical tone generator Download PDFInfo
- Publication number
- JP5229993B2 JP5229993B2 JP2008068446A JP2008068446A JP5229993B2 JP 5229993 B2 JP5229993 B2 JP 5229993B2 JP 2008068446 A JP2008068446 A JP 2008068446A JP 2008068446 A JP2008068446 A JP 2008068446A JP 5229993 B2 JP5229993 B2 JP 5229993B2
- Authority
- JP
- Japan
- Prior art keywords
- waveform data
- musical
- cache
- musical sound
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Electrophonic Musical Instruments (AREA)
Description
本発明は、1チップ電子楽音発生器に関する。 The present invention relates to a one-chip electronic musical tone generator.
従来の電子学音発生器では、音源に使用されるCPUなどの制御手段が、決まったタイムスロットに、音源制御用のプログラムが記憶された記憶装置にアクセスし、必要なプログラムの読み込みを行っていた(下記特許文献1参照)。
しかし、上記従来技術の構成では、CPUなどの制御手段によるタイムスロットの使用が、トーンジェネレータなどの楽音発生手段によって使用されるべきタイムスロットを圧迫し、同時発音数が少なくなると言う不具合を生じていた。 However, in the configuration of the above prior art, the use of the time slot by the control means such as the CPU squeezes the time slot to be used by the tone generation means such as the tone generator, resulting in a problem that the number of simultaneous sounds is reduced. It was.
本発明は、以上のような問題に鑑み創案されたもので、楽音発生手段による楽音波形データの読み出しを中断させて、CPUなどの制御手段が記憶手段へアクセスすることができるようにしつつ、時分割で行われる複数の楽音発生には影響がないようにする1チップ電子楽音発生器を提供せんとするものである。 The present invention has been devised in view of the above problems, and interrupts reading of musical sound waveform data by the musical sound generating means so that a control means such as a CPU can access the storage means while It is an object of the present invention to provide a one-chip electronic musical tone generator that does not affect the generation of a plurality of musical tones performed by division.
本発明に係る1チップ電子楽音発生器の構成は、
楽音を発生するための楽音波形データが記憶された第1の記憶手段から、楽音波形データを読み出し、第2の記憶手段に記憶された楽音を発生するためのプログラムに基づき生成されたパラメータに応じて、楽音波形データを加工して時分割で複数の楽音を発生するための楽音発生手段と、
上記第1の記憶手段及び第2の記憶手段に対し、外部バスを介してこれらの記憶手段に時分割でアクセスすると共に、キャッシュミスヒット信号の受信により、上記楽音発生手段による楽音波形データの読み出しを中断させ、且つ読み出しの中断された楽音波形データを欠損値として送出するバスコントローラと、
読み出された上記プログラムに応じて動作し、上記楽音を生成するためのパラメータを作成して上記楽音発生手段に供給する制御手段と、
上記バスコントローラと制御手段との間に介在して、少なくともプログラムのキャッシュを行うキャッシュ手段と、
上記キャッシュ手段のキャッシュミスヒットを検知し、キャッシュミスヒットが検知された際に、上記バスコントローラにキャッシュミスヒット信号を送信すると共に、バスコントローラによる楽音波形データ読み出しが中断された際に、上記制御手段による第2の記憶手段へのアクセスを許可して、同時に読み出されたプログラムを上記キャッシュ手段に記憶させるメモリ管理手段と、
該バスコントローラにより楽音波形データの読み出しが中断された場合に、該中断発生前及び発生後に読み出される楽音波形データの値によって、上記欠損値との間を修復補間する補間手段と
を有し、
上記補間手段は、上記修復補間処理を、読み出される楽音波形データが読み出される一定の量毎に付加されたチェック用データを用いて行う
ことを基本的特徴としている。
The configuration of the one-chip electronic musical tone generator according to the present invention is as follows:
According to the parameter generated based on the program for generating the musical sound, which is read out from the first storage means storing the musical sound waveform data for generating the musical sound, and stored in the second storage means. A musical sound generating means for processing musical sound waveform data to generate a plurality of musical sounds in a time-sharing manner;
The first storage means and the second storage means are accessed in a time-sharing manner via an external bus, and the musical sound waveform data is read out by the musical sound generation means by receiving a cache miss signal. A bus controller that interrupts the reading and sends out the interrupted musical tone waveform data as a missing value;
Control means that operates in accordance with the read program, generates a parameter for generating the musical sound, and supplies the parameter to the musical sound generating means;
Cache means for interposing at least a program interposed between the bus controller and the control means,
When a cache miss hit is detected by the cache means, a cache miss signal is transmitted to the bus controller when a cache miss hit is detected, and when the musical tone waveform data reading by the bus controller is interrupted, the control is performed. Memory management means for permitting access to the second storage means by the means and storing the simultaneously read program in the cache means;
If the bus controller by the musical tone waveform data read is interrupted, the value of the musical tone waveform data read out after the interruption occurs before and generating, possess an interpolation means for repairing interpolating between the missing values,
The interpolation means is basically characterized in that the repair interpolation process is performed using check data added for each fixed amount of read musical sound waveform data .
上記構成によれば、メモリ管理手段により、キャッシュ手段のキャッシュミスヒットが検知されると、バスコントローラにより、上記楽音発生手段による楽音波形データ読み出しが中断せしめられて、上記制御手段による第2の記憶手段へのアクセスが許可され、同時に読み出されたプログラムが上記キャッシュ手段に記憶せしめられる。また、該バスコントローラにより、読み出しの中断された楽音波形データが、欠損値として上記補間手段に送出される。他方、この楽音波形データの読み出しが中断された場合に、上記補間手段により、該中断発生前及び発生後に読み出される楽音波形データの値によって、上記欠損値との間が修復補間されることになる。 According to the above configuration, when the memory management means detects a cache miss hit of the cache means, the bus controller interrupts reading of the musical sound waveform data by the musical sound generating means, and the second storage by the control means. Access to the means is permitted and the program read at the same time is stored in the cache means. Further, the musical tone waveform data whose reading has been interrupted is sent to the interpolation means as a missing value by the bus controller. On the other hand, when the reading of the musical sound waveform data is interrupted, the interpolation means restores and interpolates between the missing values by the value of the musical sound waveform data read before and after the interruption. .
すなわち、キャッシュ手段のキャッシュミスヒットの時には、楽音波形データの読み出しを中断させて、制御手段によるプログラムの読み出しを優先させ、その中断の際に生じる楽音波形データの欠損は、上記補間手段により、読み出される楽音波形データが読み出される一定の量毎に付加されたチェック用データを用いて修復補間処理で補うことになる。そのため、楽音発生手段による楽音波形データの読み出しをバスコントローラが中断させて、CPUなどの制御手段が記憶手段へアクセスすることができるようにしつつ、時分割で行われる複数の楽音発生には影響がないようにすることが可能となる。 That is, when a cache miss in the cache means, by interrupting the reading of the musical tone waveform data, the reading of the program is given priority by the control means, loss of tone waveform data generated at the time of the interruption, Ri by the said interpolation means The read tone waveform data is supplemented by the repair interpolation process using the check data added every fixed amount to be read . Therefore, the reading of the musical sound waveform data by the musical sound generating means is interrupted by the bus controller so that the control means such as the CPU can access the storage means, while the generation of a plurality of musical sounds performed in a time division manner is affected. It becomes possible not to be.
上記補間手段による修復補間処理は、上記楽音波形データが読み出される一定の量毎に上記第1の記憶手段に挿入記憶されたチェック用データを用いて行われると、中断が行われたことが直ぐに分かると共に、また修復補間処理が正しく簡単にできるようになる。そのようなチェック用データとしては、後述するようなパリティデータやその正しさをチェックできるその他の真否チェック用データが適している。 Repair interpolation processing by the interpolation means, when performed using the inserts stored check data to the first storage means every predetermined amount of the musical tone waveform data are read out, immediately that the interruption has been made As well, it is possible to correct and simplify the repair interpolation process. As such check data, parity data as will be described later and other authenticity check data capable of checking its correctness are suitable.
上記本発明の1チップ電子楽音発生器によれば、キャッシュミスヒット時に、楽音発生手段による楽音波形データの読み出しをバスコントローラが中断させて、CPUなどの制御手段が記憶手段へアクセスすることができるようにしつつ、その中断で欠損した分の楽音波形データは読み出される楽音波形データが読み出される一定の量毎に付加されたチェック用データを用いて修復補間処理で補われるため、時分割で行われる複数の楽音発生には影響がでないようにすることが可能になるという優れた効果を奏し得る。 According to the above-described one-chip electronic musical tone generator of the present invention, at the time of a cache miss, reading of musical tone waveform data by the musical tone generating means is interrupted by the bus controller so that a control means such as a CPU can access the storage means. On the other hand, the musical sound waveform data lost due to the interruption is supplemented by the repair interpolation process using the check data added for each read amount of the musical sound waveform data to be read, and thus is performed in a time-sharing manner. It is possible to achieve an excellent effect that it is possible to prevent the generation of a plurality of musical sounds.
以下、本発明の実施の形態を、次の図示する例と共に説明する。 Hereinafter, embodiments of the present invention will be described together with the following illustrated examples.
図1は、本発明の一実施例に係る1チップ電子楽音発生器と周辺回路を含む電子学音発生装置の構成を示す回路図である。 FIG. 1 is a circuit diagram showing a configuration of an electronic sound generator including a one-chip electronic musical tone generator and peripheral circuits according to an embodiment of the present invention.
同図に示すように、本発明の電子学音発生器は、キャッシュ付きコアCPUを内蔵した1チップLSIで構成されており、その外部には、外部バスを介して、ROM及びRAM、さらに外部機器へのインターフェースI/Fが接続されている。 As shown in the figure, the electronic sound generator of the present invention is composed of a one-chip LSI with a built-in cached core CPU. An interface I / F to the device is connected.
すなわち、LSI−CHIPで示される本実施例の1チップ電子楽音発生器は、CPU、トーンジェネレータ(TG)、メモリマネージングユニット(MMU)、データキャッシュ(C1)が、内部バス100を介してつながっている。
That is, the one-chip electronic musical tone generator of this embodiment indicated by LSI-CHIP is connected to the CPU, tone generator (TG), memory managing unit (MMU), and data cache (C1) via the
またプログラムキャッシュ(C0)が、上記メモリマネージングユニット(MMU)に対して入出力が2系統、すなわちデュアル接続されていて、該メモリマネージングユニット(MMU)によって、一方の入出力が、内部バス100を介して、CPUへ、また他方の入出力がバスコントローラ(BC)、外部バス200を介してROMやRAMの外部記憶装置に接続されている。従って、プログラムキャッシュ(C0)は、CPUとこれらの外部記憶装置の間で、楽音発生用のプログラムのキャッシュを行う構成である。
The program cache (C0) has two inputs / outputs, ie, dual connection, to the memory managing unit (MMU), and one input / output is connected to the internal bus by the memory managing unit (MMU). The other input / output is connected to an external storage device such as a ROM or a RAM via a bus controller (BC) and an
上記CPUは、LSI−CHIP内においてマイクロコンピュータコアで構成されており、楽音発生用のプログラムに応じて、楽音を生成するためのパラメータを作成し、トーンジェネレータ(TG)に供給している。また、後述するように、キャッシュミスヒットにより、楽音波形データの読み出しが中断され、該CPUがバスコントローラ(BC)、外部バス200を介してROMやRAMの外部記憶装置にプログラムの読み出しに行く際、後述するトーンジェネレータ(TG)に楽音波形データの欠損部の補間処理を指令する。
The CPU is composed of a microcomputer core in the LSI-CHIP, creates parameters for generating musical sounds in accordance with a program for generating musical sounds, and supplies them to a tone generator (TG). As will be described later, reading of musical sound waveform data is interrupted due to a cache miss, and the CPU goes to the ROM or RAM external storage device via the bus controller (BC) and
他方、トーンジェネレータ(TG)は、例えばサンプル時間1/50000secとして16音の楽音波形データを時分割で発生する音源構成であり、デコーダ・バッファ(D/B)、上記バスコントローラ(BC)、外部バス200を介して、同じくROMやRAMの外部記憶装置に接続されている。ここでは、これらの外部記憶装置に記憶されている楽音波形データが読み出されて、CPUから供給されたパラメータに基づいて、楽音が発生せしめられ、外部に出力される。またトーンジェネレータ(TG)のパラメータレジスタは、内部バス100を介してCPUに接続されている。従って該レジスタは、CPUからはRAMとしてアクセスされる。さらに、該トーンジェネレータ(TG)は、後述する補間部15を構成しており、楽音波形データの読み出しが中断された場合に、上記CPUの指令に基づき、欠損データフラグをチェックし、楽音波形データの必要な補間処理を行う。
On the other hand, the tone generator (TG) has a sound source configuration for generating 16 sound tone waveform data in a time-division manner with a sample time of 1/50000 sec, for example, a decoder buffer (D / B), the bus controller (BC), an external Similarly, it is connected to an external storage device such as a ROM or a RAM via a
上記デコーダ・バッファ(D/B)は、上記外部記憶装置とトーンジェネレータ(TG)との間に介在し、外部記憶装置から1チャンネル当たり例えば8ワードの楽音波形データの読み出しを行ってバッファリングしており、しかもその波形データがADPCMのように圧縮されている場合は、通常のPCMへのデーコード処理がなされ、一つ一つ読み出されて伸張せしめられ、補間処理が行われ、PCM形式にデコードされる。すなわち、読み出された楽音波形データに対して、補間処理(上記トーンジェネレータで行われる補間処理とは異なる)が行われる。そしてトーンジェネレータ(TG)の波形読み出しに応じて該デコーダ・バッファ(D/B)により補間された楽音波形データは、トーンジェネレータ(TG)に送られる。その際、トーンジェネレータ(TG)から出力されるACC信号は、該トーンジェネレータ(TG)のチャンネルが発音中でない[後述する図14の振幅エンベロープ(EG−2)1112又は音量Loudness(LD)1114がゼロ]ことを示している。またこのデコーダ・バッファ(D/B)から、バスコントローラ(BC)に出されるREQ信号は、該デコーダ・バッファ(D/B)がバッファデータ入替を要求していることを示す。 The decoder buffer (D / B) is interposed between the external storage device and the tone generator (TG), and reads out, for example, 8 words of musical sound waveform data per channel from the external storage device for buffering. In addition, when the waveform data is compressed like ADPCM, the data processing to the normal PCM is performed, read and expanded one by one, the interpolation processing is performed, and the PCM format To be decoded. That is, interpolation processing (different from the interpolation processing performed by the tone generator) is performed on the read musical sound waveform data. The tone waveform data interpolated by the decoder buffer (D / B) in accordance with the waveform reading of the tone generator (TG) is sent to the tone generator (TG). At that time, the ACC signal output from the tone generator (TG) is not generated by the channel of the tone generator (TG) [the amplitude envelope (EG-2) 1112 or the volume Loudness (LD) 1114 in FIG. Zero]. The REQ signal output from the decoder / buffer (D / B) to the bus controller (BC) indicates that the decoder / buffer (D / B) is requesting buffer data replacement.
他方、メモリマネージングユニット(MMU)は、上記CPUがアクセスするバスを内部バス100と外部バス200で切り替える構成であり、内部バス100に切り替えられた場合、CPUがプログラムキャッシュ(C0)にアクセスするようになり、また外部バス200に切り替えられた場合、CPUが外部バス200を介して外部記憶装置にアクセスするようになる。その際、該メモリマネージングユニット(MMU)を介して、外部記憶装置から読み出される楽音発生用のプログラムは、プログラムキャッシュ(C0)にも記憶される。
On the other hand, the memory managing unit (MMU) is configured to switch the bus accessed by the CPU between the
このメモリマネージングユニット(MMU)からバスコントローラ(BC)に出されるCTR信号は、CPUがキャッシュのミスヒットを行ったことを示す信号(本発明に規定されたキャッシュミスヒット信号)であり、またメモリマネージングユニット(MMU)からCPUに出力されるW0信号は、後述するバスコントローラ(BC)を介して外部バス200がデコーダ・バッファ(D/B)によって使用中である時[該バスコントローラ(BC)からメモリマネージングユニット(MMU)にWAIT信号が出される時]、外部バス200を介してCPUが外部記憶装置をアクセスすることに対してウェイトをかけるための信号である。
The CTR signal issued from the memory managing unit (MMU) to the bus controller (BC) is a signal indicating that the CPU has made a cache miss (cache miss signal defined in the present invention), and The W0 signal output from the memory managing unit (MMU) to the CPU is output when the
さらにバスコントローラ(BC)は、外部バス200への接続を、プログラムキャッシュ(C0)、メモリマネージングユニット(MMU)、及びデコーダ・バッファ(D/B)のいずれかに切り替える切り替え制御構成である。
Further, the bus controller (BC) has a switching control configuration for switching the connection to the
バスコントローラ(BC)からメモリマネージングユニット(MMU)に出されるWAIT信号は、外部バス200がデコーダ・バッファ(D/B)によって使用中であることを示す信号であり、その信号が出されると、メモリマネージングユニット(MMU)からCPUにW0信号が出力され、外部バス200を介して外部記憶装置をアクセスすることにつき、CPUにウェイトがかけられることになる。
The WAIT signal issued from the bus controller (BC) to the memory managing unit (MMU) is a signal indicating that the
上記ROMは、CPU用のプログラムとトーンジェネレータ(TG)用の楽音波形データを記憶する外部記憶装置である。 The ROM is an external storage device that stores a program for CPU and musical tone waveform data for tone generator (TG).
上記RAMは、CPU用のプログラムとパラメータやフラグなどのデータを一時的に記憶しておく外部記憶装置である。 The RAM is an external storage device that temporarily stores a CPU program and data such as parameters and flags.
上記インターフェース(I/F)は、電子楽器の鍵盤やパネルなどをCPUがアクセスするためのインターフェースである。 The interface (I / F) is an interface for the CPU to access the keyboard or panel of the electronic musical instrument.
本発明構成は、図2に示すように、前図の各部によって構成される、以下の機能ブロックで構成されている。すなわち、本実施例構成は、楽音を発生するための楽音波形データが記憶された第1の記憶部210から、楽音波形データを読み出し、第2の記憶部211に記憶された楽音を発生するためのプログラムに基づき生成されたパラメータに応じて、楽音波形データを加工して時分割で複数の楽音を発生するための楽音発生部10と、上記第1の記憶部210及び第2の記憶部211に対し、外部バス200を介してこれらの記憶部に時分割でアクセスすると共に、キャッシュミスヒット信号(図中CTR信号)の受信により、上記楽音発生部10による楽音波形データの読み出しを中断させ、且つ読み出しの中断された楽音波形データを欠損値として送出するバスコントローラ11と、読み出された上記プログラムに応じて動作し、上記楽音を生成するためのパラメータを作成して上記楽音発生部10に供給する制御部12と、上記バスコントローラ11と制御部12との間に介在して、少なくともプログラムのキャッシュを行うキャッシュ部13と、上記キャッシュ部13のキャッシュミスヒットを検知し、キャッシュミスヒットが検知された際に、上記バスコントローラ11にキャッシュミスヒット信号(同CTR信号)を送信すると共に、バスコントローラ11による楽音波形データ読み出しが中断された際に、上記制御部12による第2の記憶部211へのアクセスを許可して、同時に読み出されたプログラムを上記キャッシュ部13に記憶させるメモリ管理部14と、該バスコントローラ11により楽音波形データの読み出しが中断された場合に、該中断発生前及び発生後に読み出される楽音波形データの値によって、上記欠損値との間を補間する補間部15との構成を有している。
As shown in FIG. 2, the configuration of the present invention is configured by the following functional blocks configured by the respective units in the previous diagram. That is, in the configuration of this embodiment, the musical sound waveform data is read from the
上記第1の記憶部210は楽音波形データを記憶する上記ROMで構成され、上記第2の記憶部211はCPU用のプログラムを記憶する上記ROM及びRAMで構成されている。
The
上記楽音発生部10は、トーンジェネレータ(TG)で構成され、同じく補間部15も、トーンジェネレータ(TG)で構成されている。
The
上記バスコントローラ11は上記バスコントローラ(BC)で構成される。またこのバスコントローラ11と上記楽音発生部10及び補間部15との間には、上記デコーダ・バッファ16が介在しており、上記デコーダ・バッファ(D/B)で構成される。
The
上記制御部12はCPUで構成され、上記キャッシュ部13は上記プログラムキャッシュ(C0)で構成される。
The control unit 12 is composed of a CPU, and the
上記メモリ管理部14はメモリマネージングユニット(MMU)で構成される。
The
そして、上記楽音発生部10、上記制御部12及び上記メモリ管理部14は、内部バス100を介して、接続され、データなどのやりとりができる。
The
尚図中17は、図1の(C1)に相当するデータキャッシュ部である。 In the figure, reference numeral 17 denotes a data cache unit corresponding to (C1) in FIG.
上記電子学音発生装置では、上記インターフェース(I/F)側から押鍵データなどが受信されると、メモリ管理部14によって、上記制御部12に対し、第2の記憶部211から、CPU用のプログラムが読み出される。その際に、そのプログラムの一部(使用頻度の高いものが望ましい)乃至全部が、ページロードされて、メモリ管理部14により、キャッシュ部13に格納される。
In the electronic sound generation apparatus, when key depression data or the like is received from the interface (I / F) side, the
一方上記楽音発生部10に対し、バスコントローラ11により、外部バス200を介して、第1の記憶部210から楽音波形データが読み出される。その途中、デコーダ・バッファ16に読み出された楽音波形データが一時的に格納され、デコードされて、時分割で処理され、同時発音される系列毎に、そこから楽音発生部10に供給される。
On the other hand, musical tone waveform data is read from the
さらに、上記CPU用プログラムが実行される制御部12により、楽音を生成するためのパラメータが作成されて、内部バス100を介して、上記楽音発生部10に供給される。
Further, a parameter for generating a musical tone is created by the control unit 12 in which the CPU program is executed and supplied to the musical
上記楽音発生部10は、読み出された上記楽音波形データに、さらに生成・供給されたパラメータに応じて加工を施して、時分割で複数の楽音を発生せしめ、外部に楽音を発生する。
The
その間一旦読み出されて、上記キャッシュ部13に格納されたと同じプログラムが、上記制御部12により読み出される場合、すなわち、キャッシュがヒットしている場合、メモリ管理部14により、内部バス100は、キャッシュ部13に接続され、制御部12の指定するアドレスは、メモリ管理部14によって自動的にキャッシュ部13のアドレスに読み替えられ、キャッシュ部13から上記プログラムが読み出される。この時メモリ管理部14は、制御信号CTRをOFFにする(キャッシュヒットの状態)。
In the meantime, when the same program read once and stored in the
一方、バスコントローラ11は、楽音発生部10が読み出す楽音波形データの一時格納部となっているデコーダ・バッファ16にアクセス権を優先して与える。もし楽音発生部10における現在のタイムスロットのTGチャンネルが発音中であり(後述する図3参照)、デコーダ・バッファ16の更新を必要としていれば、REQ=ONが送られてくるので、外部バス200をデコーダ・バッファ16に接続する。
On the other hand, the
図3は、上述のように、キャッシュがヒットしている場合の各信号、バス、及びTGチャンネル(楽音発生部10の同時発音チャンネル)のタイムチャートを示している。 FIG. 3 shows a time chart of each signal, bus, and TG channel (simultaneous sound generation channel of the tone generator 10) when the cache is hit as described above.
同図に示されるように、本装置では、サンプリング時間=20μsecとし、その間に時分割チャンネル時間を1.25μsecとして、1サンプリング時間内に、同自発音数16の時分割発音チャンネル(TGチャンネル)があり、これらの全てのチャンネルが時分割処理され、16音が同時発音している状態になっている(図中0x0〜0xFで示される)。
As shown in the figure, in this apparatus, the sampling time is set to 20 μsec, and the time division channel time is set to 1.25 μsec during that time, and the time-division sound generation channel (TG channel) having the same number of
この時、バスコントローラ11からメモリ管理部14へのWAIT信号、(メモリ管理部14から制御部12へのWO信号)及びメモリ管理部14からバスコントローラ11へのCTR信号は、OFF状態であるが、上記デコーダ・バッファ16からバスコントローラ11へのREQ信号は、常に複数の系列の楽音波形データの読み出しが行われるため、同図に示すようなON状態が繰り返されるととになる。
At this time, the WAIT signal from the
さらに、メモリ管理部14によって、内部バス100にはキャッシュ部13のプログラムが読み出されており(図中C0で示される)、即ち、キャッシュがヒットした状態となっている。
Further, the
他方、REQ信号を受けたバスコントローラ11により、外部バス200には第1の記憶部210から楽音波形データが読み出され、上記デコーダ・バッファ16に一時的に格納されている(図中D/Bで示されている)。
On the other hand, the musical tone waveform data is read from the
図4は、キャッシュがミスヒットして、楽音波形データの読み出しが中断され、プログラム更新中の場合のタイムチャートを示している。また、図5は、上記場合の本発明構成の機能ブロックを示す説明図である。 FIG. 4 shows a time chart when the cache is miss-hit, reading of musical sound waveform data is interrupted, and the program is being updated. FIG. 5 is an explanatory diagram showing functional blocks of the configuration of the present invention in the above case.
キャッシュがミスヒットした場合、即ち、制御部12が必要とするアドレスをメモリ管理部14に指定して、キャッシュ部13にプログラムの読み出しをかけた場合に、そのキャッシュ部13に、そのアドレスに対応するキャッシュ上のアドレスが無く、該キャッシュ部13に該当するプログラムが存在しない場合を、これらの図は示している。
When the cache misses, that is, when the address required by the control unit 12 is specified in the
そのような場合に、まずメモリ管理部14は、バスコントローラ11に対し、CTR信号(上述のように該制御信号CTRは、制御部12からのアクセスでキャッシュミスヒットをメモリ管理部14で検知した場合に該メモリ管理部14からバスコントローラ11に出されるキャッシュミスヒットをしたことを示す信号=キャッシュミスヒット信号)を出力する。
In such a case, first, the
この時、バスコントローラ11は、該CTR信号を受信して、図5に示すように、デコーダ・バッファ16からの上記REQ信号の受信を遮断することで、楽音発生部10による楽音波形データの読み出しを中断させる。そして、該バスコントローラ11は、同図に示すように、読み出しの中断された楽音波形データを、欠損値として、該楽音発生部10に送出する。
At this time, the
バスコントローラ11による楽音波形データ読み出しが中断された際に、上記メモリ管理部14により、図4及び図5に示すように、上記制御部12による第2の記憶部211へのアクセスを許可して、制御部12は、メモリ管理部14を介して、内部バス100を外部バス200に接続させ、外部バス200をアクセスしようとする。それによって、制御部12は、第2の記憶部211から、必要とするプログラムをロードする。
When the musical tone waveform data reading by the
同時に、メモリ管理部14は、ロードされるプログラムを、上記キャッシュ部13にもページロードさせる。
At the same time, the
他方、上述のタイミングのバスコントローラ11に機能については、該バスコントローラ11自身は、デコーダ・バッファ16にアクセス権を優先して与えているが、CTR信号を受信するまでは、メモリ管理部14にWAITを出力しつつ、外部バス200を、デコーダ・バッファ16側に接続し、その間にも各チャンネルの楽音波形データの読み出しに使用させる。その間WAITは、メモリ管理部14で処理され、(WO信号として)制御部12には送られない。
On the other hand, with respect to the function of the
そして、キャッシュミスヒットが発生して、CTR信号がONになったタイミングで(図4のCTR信号ON時)、外部バス200は、図5に示すように、メモリ管理部14経由で内部バス100に接続され、制御部12は、第2の記憶部211から、必要とするプログラムのロードを行う。この時、メモリ管理部14により、同時に、ロードされるプログラムが、上記キャッシュ部13にページロードされる。
Then, at a timing when the cache miss occurs and the CTR signal is turned ON (when the CTR signal is ON in FIG. 4), the
以上の例では、キャッシュミスヒット時に、空きチャンネルがあろうが、なかろうが、強制的に、バスコントローラ11により、楽音発生部10への楽音波形データの読み出しが中断され、且つ読み出しの中断された楽音波形データが、欠損値として補間部15に送出される。
In the above example, whether or not there is an empty channel at the time of a cache miss hit, the reading of the musical sound waveform data to the
以上のように、本実施構成によれば、キャッシュミスヒット時に、空きチャンネルがあろうが、なかろうが、メモリ管理部14は、バスコントローラ11に指令を出し、強制的に、バスコントローラ11により、楽音発生部10への楽音波形データの読み出しが中断され、内部バス100は外部バス200に接続され、制御部12には、第2の記憶部211から、必要とするプログラムがロードされる。同時に、メモリ管理部14により、ロードされるプログラムが、上記キャッシュ部13にもページロードされる。また、その間に欠損するはずの楽音波形データは、バスコントローラ11により欠損値を受信した補間部15により、楽音波形データの読み出し中断の発生前及び発生後に読み出される楽音波形データの値によって、上記欠損値との間が補間される。そのため、読み出される楽音波形データに欠損を生じず、同時発音数を減らすことなく、アクセス時間が許す限り多くの発音ができるようになる。
As described above, according to the present embodiment, the
図5につき、さらに詳述する。メモリ管理部14は、キャッシュのミスヒットがあってから(CTR信号がONになってから)1サンプル時間だけ連続して、デコーダ・バッファ16のアクセス権を奪って、外部バス200をアクセスする[楽音発生部10が外部バス200を占拠していない時間帯に外部メモリをアクセスするのではなく、少なくともn(楽音波形データに周期的に現れる後述するパリティデータの頻度に等しい数;本例の場合4)サンプルに1回は制御部12が強制的に楽音発生部10のアクセスを奪う]。そして、1サンプル時間(1/44100秒)後にはアクセス権は失われて、WAIT信号がアクティブになる。WAIT信号がアクティブになってから(図の例では)3サンプル時間の間は、WAIT信号がアクティブになり続けるので、メモリ管理部14が外部バス200をアクセスすることはできない。
FIG. 5 will be described in further detail. The
一方WAIT信号は、初期状態でアクティブである。サンプル時間毎のカウンタを持ち、アクティブになってから、3サンプル時間の間は強制的にアクティブであり続ける。それを過ぎると、CTR信号がアクティブになった瞬間に、1サンプル時間の間だけ、外部バス200をメモリ管理部14に開放する。この間にデコーダ・バッファ16は楽音波形データを取りこぼすことになるが、上述のように、補間部15によって取りこぼしたデータは再現される。
On the other hand, the WAIT signal is active in the initial state. It has a counter for each sample time and remains active for 3 sample times after it becomes active. After that, at the moment when the CTR signal becomes active, the
上述したように、ある発音系列(TG Channel)に着目すれば、連続した4サンプルのうち、1サンプルを取り落とすことはあっても、必ず他の3サンプルは読み出すことができ、取り落とした1サンプルは、上記補間部15により補間されるので、発音が途切れることなく、かつ制御部12も動作を続けることが可能となる。
As described above, if attention is paid to a certain pronunciation sequence (TG Channel), even if one sample is dropped out of four consecutive samples, the other three samples can always be read out, and one sample removed Is interpolated by the interpolating
上記補間部15による補間処理につき、以下に説明する。
The interpolation processing by the
読み出される楽音波形データについて、図6に示されるように、読み出される一定の量毎に、チェック用のパリティデータが付加されている。すなわち、同図に示す場合は、(3+1)の発音系列として、data n+3、n+2、n+1、nの系列順で楽音波形データが、時分割で読み出される。ここでは、パリティデータは4サンプルに1回出現するので、「n=4」となり、メモリ管理部14は、4サンプルに1回、外部メモリをアクセスできる。パリティデータが、6サンプルに1回出現するなら、メモリ管理部14は、6サンプルに1回、パリティデータが11サンプルに1回出現するなら、メモリ管理部14は11サンプルに1回外部メモリをアクセスできることになる。
As shown in FIG. 6, parity data for checking is added to the read sound waveform data for every certain amount to be read. In other words, in the case shown in the figure, the musical sound waveform data is read out in a time-sharing manner in the order of data n + 3, n + 2, n + 1, and n as the (3 + 1) pronunciation sequence. Here, since the parity data appears once in 4 samples, “n = 4” is obtained, and the
CTR信号がアクティブ(キャッシュミスヒット)の間、図7に示すように、デコーダ・バッファ16は読み出せなかった(同図xxで示す)楽音波形データの代わりに、欠損データフラグbfがアクティブ(=1)となったデータを作る。このデータはデコーダ・バッファ16では無視され、補間部15により、他のサンプルとパリティデータから当該無視されたデータを補間によって発生する。すなわち、同図に示すデータを例にすれば、補間部15により、補間されるデータは=bp−b0−b2で求められ、その欠損データ(xx)が修復・補間される。
While the CTR signal is active (cache miss hit), as shown in FIG. 7, the
一方、図8に示すように、楽音波形データに欠損がない場合[そのデータの欠損データフラグbfは非アクティブ(=0)]や、欠損が生じたデータがパリティデータの場合[そのデータの欠損データフラグbfは非アクティブ0でもアクティブ1でも良い(図中xxで示される)]は、取り出された楽音波形データには何ら問題はないので、そのままデコーダ・バッファ16に転送され、補間処理は行われない。
On the other hand, as shown in FIG. 8, when there is no loss in the musical sound waveform data [the missing data flag bf of that data is inactive (= 0)], or when the data in which the loss occurs is parity data [the loss of the data The data flag bf may be inactive 0 or active 1 (indicated by xx in the figure)], since there is no problem with the extracted musical sound waveform data, it is transferred to the
図9は、上記実施例1の、制御部12のメインフローを示す図面である。 FIG. 9 is a diagram illustrating a main flow of the control unit 12 according to the first embodiment.
同図に示すように、制御部12により、キャッシュ部13、デコーダ・バッファ16、データキャッシュ部17、及び第2の記憶部211の一部を構成するRAMなどが初期化される(ステップS100)。
As shown in the figure, the control unit 12 initializes the
そしてイベントがあるか否かが検出され(ステップS102)、イベントがあれば(ステップS102;Y)、ステップS106に移行する。 Then, it is detected whether or not there is an event (step S102). If there is an event (step S102; Y), the process proceeds to step S106.
反対にイベントがなければ(ステップS102;N)、イベントの処理がなされる(ステップS104)。 On the contrary, if there is no event (step S102; N), the event is processed (step S104).
そして、ステップS106では、イベント外の処理(時間経過による処理)がなされる。 In step S106, processing outside the event (processing with the passage of time) is performed.
図10は、上記図9のステップS100で示される制御部12による初期化処理の処理フローを示している。 FIG. 10 shows a processing flow of initialization processing by the control unit 12 shown in step S100 of FIG.
該初期化処理では、インターバルタイマ割込ルーチンTINT()、外部割込等が禁止される(ステップS200)。 In the initialization process, the interval timer interrupt routine TINT (), external interrupt, etc. are prohibited (step S200).
次にスタックポインタ等の変数が初期化される(ステップS202)。 Next, variables such as a stack pointer are initialized (step S202).
さらに上記楽音発生部10の全チャンネル消音する等のデバイス設定がなされる(ステップS204)。
Further, device settings such as mute all channels of the
そして上記キャッシュ部13に、キャッシュのゼロペイジ(外部バス200アクセスのための楽音発生部10の消音ルーチンが格納されている)がロードされる(ステップS206)。
Then, the
その後プログラム定数が、第2の記憶部211からデータキャッシュ部17(C1)にロードされ、プログラム定数ポインタが該データキャッシュ部17(C1)エリアに設定される(ステップS208)。
Thereafter, the program constant is loaded from the
さらにプログラム変数の初期値がセットされる(ステップS210)。 Further, initial values of program variables are set (step S210).
最後に、上述したインターバルタイマ割込ルーチンTINT()、外部割込等が可能な許可設定がなされる(ステップS212)。以上で初期化処理ルーチンが終了する。 Finally, the above-described interval timer interrupt routine TINT (), permission settings enabling external interrupts, etc. are made (step S212). This is the end of the initialization process routine.
図11は、インターバルタイマ割込ルーチンTINT()の内容を示すフローチャートである。該インターバルタイマ割込ルーチンTINT()では、タイマカウンタTをインクリート(1だけ増加)する処理がなされる(ステップS300)。以上でインターバルタイマ割込ルーチンTINT()が終了する。 FIG. 11 is a flowchart showing the contents of the interval timer interrupt routine TINT (). In the interval timer interrupt routine TINT (), a process of incrementing the timer counter T (incrementing by 1) is performed (step S300). This completes the interval timer interrupt routine TINT ().
図12は、上記図9の制御部12のメイン処理フローにおいて、ステップS104で行われるイベント処理(doEvent)の処理フローを示している。 FIG. 12 shows a process flow of the event process (doEvent) performed in step S104 in the main process flow of the control unit 12 of FIG.
そのイベントがキーイベントであるか否かがチェックされる(ステップS400)。そのイベントがキーイベントであった場合(ステップS400;Y)、図示しないキースキャナからの押鍵・離鍵イベントに応じて、発音処理・消音処理がなされる(ステップS402)。 It is checked whether or not the event is a key event (step S400). If the event is a key event (step S400; Y), sound generation / mute processing is performed in response to a key press / release event from a key scanner (not shown) (step S402).
上記ステップS400で、そのイベントがキーイベントでなかった場合(ステップS400;N)、そのイベントがパネルイベントであるか否かがチェックされる(ステップS404)。そのイベントがパネルイベントであった場合(ステップS404;Y)、図示しないパネルスキャナからのパネルイベントに応じて、音色等の発音パラメータが変更される(ステップS406)。 If the event is not a key event in step S400 (step S400; N), it is checked whether the event is a panel event (step S404). If the event is a panel event (step S404; Y), a tone generation parameter such as a tone color is changed according to a panel event from a panel scanner (not shown) (step S406).
上記ステップS404で、そのイベントがパネルイベントでなかった場合(ステップS404;N)、そのイベントがMIDIイベントであるか否かがチェックされる(ステップS408)。そのイベントがMIDIイベントであった場合(ステップS408;Y)、図示しない外部割込で受信されるMIDI入力に応じて、MIDI処理が行われる(ステップS410)。 If the event is not a panel event in step S404 (step S404; N), it is checked whether the event is a MIDI event (step S408). If the event is a MIDI event (step S408; Y), MIDI processing is performed according to a MIDI input received by an external interrupt (not shown) (step S410).
上記ステップS408で、そのイベントがMIDIイベントでなかった場合(ステップS408;N)、その他のイベント処理がなされる(ステップS412)。 If the event is not a MIDI event in step S408 (step S408; N), other event processing is performed (step S412).
さらに図13は、上記図9の制御部12のメイン処理フローにおいて、ステップS106で行われるタイマカウンタTに基づく処理(doTVar)の処理フローを示している。 Further, FIG. 13 shows a processing flow of processing (doTVar) based on the timer counter T performed in step S106 in the main processing flow of the control unit 12 of FIG.
まずタイマカウンタTが参照され、自動演奏が実行される(ステップS500)。 First, the timer counter T is referred to and an automatic performance is executed (step S500).
そしてエクスプレッションペダルなどのアナログ入力が読み取られ、それに基づく処理が実行される(ステップS602)。 Then, an analog input such as an expression pedal is read and processing based on the analog input is executed (step S602).
次にタイマカウンタTが参照されて、変調用のLFOの歩進処理がなされる(ステップS504)。 Next, the timer counter T is referred to, and the modulation LFO stepping process is performed (step S504).
続いて、離鍵後又は減衰音の押鍵後、EG−2のレベルがゼロになっているものを探して処理がなされる(ステップS506)。 Subsequently, after releasing the key or pressing the decay sound, processing is performed by searching for a EG-2 level of zero (step S506).
図14は、上記実施例1の、楽音発生部10の詳細な構成を示す説明図である。
FIG. 14 is an explanatory diagram showing a detailed configuration of the
同図に示すように、楽音発生部10は、パラメータレジスタ(PR)1100と、ウェイブアドレスジェネレータ(WAG)1102と、インターポレイタ(IP)1104と、DCF1106と、第1のエンベロープジェネレータ(EG−1)1108と、DCA1110と、第2のエンベロープジェネレータ(EG−2)1112と、ラウドネス回路(LD)1114と、論理和回路(OR)1116と、パンコントローラ1118と、ミキサ1120と、エフェクト付与回路(EFP)1122とを有している。また、図示しないが、CPUは、ウェイブアドレスジェネレータ(WAG)1102などと同様に、第1のエンベロープジェネレータ(EG−1)1108、第2のエンベロープジェネレータ(EG−2)1112、ラウドネス回路(LD)1114、エフェクト付与回路(EFP)1122などとも、パラメータレジスタ(PR)1100を介してパラメータの交換を行ってもよい。
As shown in the figure, the
そのうち、プログラムレジスタ(PR)1100は、制御部12から各発音チャンネルの波形読出開始アドレス、ループ開始アドレス、ループ終端アドレス、波形読出レート、DCFオフセット周波数、EG−1目標値、EG−1レート、音量、PAN係数などのパラメータを受け取って、各部に供給すると共に、各部の演算による現在値を保存する機能を有している。 Among them, the program register (PR) 1100 receives a waveform read start address, loop start address, loop end address, waveform read rate, DCF offset frequency, EG-1 target value, EG-1 rate, It has a function of receiving parameters such as volume and PAN coefficient, supplying them to each unit, and saving the current value obtained by the calculation of each unit.
上記ウェイブアドレスジェネレータ(WAG)1102は、波形読出開始アドレスから順にループ開始アドレスを経てループ終端アドレスに到達し、以後ループ開始アドレスとループ終端アドレスの間を繰り返し読み出すためのアドレスを発生する機能を有している。読出速度は波形読出レート(Fナンバ)に応じて変更される。 The wave address generator (WAG) 1102 has a function of generating an address for repeatedly reading between the loop start address and the loop end address after reaching the loop end address via the loop start address in order from the waveform read start address. doing. The reading speed is changed according to the waveform reading rate (F number).
上記インターポレイタ(IP)1104は、読み出された波形データを受け取って補間を行う機能を有している。 The interpolator (IP) 1104 has a function of receiving the read waveform data and performing interpolation.
上記DCF1106は、波形データにフィルタ処理を行うデジタルコントロールドフィルタである。 The DCF 1106 is a digitally controlled filter that performs filtering on waveform data.
上記第1のエンベロープジェネレータ(EG−1)1108は、DCF1106のカットオフ周波数に時間エンベロープを与える機能を有している。 The first envelope generator (EG-1) 1108 has a function of giving a time envelope to the cutoff frequency of the DCF 1106.
上記DCA1110は、波形データの振幅を制御するデジタルコントロールドアンプリファイアである。 The DCA 1110 is a digitally controlled amplifier that controls the amplitude of waveform data.
上記第2のエンベロープジェネレータ(EG−2)1112は、DCA1110の振幅に時間エンベロープを与えると共に、振幅ゼロ検出信号を、論理和回路(OR)1116に出力する機能を有している。 The second envelope generator (EG-2) 1112 has a function of providing a time envelope to the amplitude of the DCA 1110 and outputting a zero amplitude detection signal to the OR circuit (OR) 1116.
上記ラウドネス回路(LD)1114は、波形データの音量を制御するとともに、音量ゼロ検出信号を論理和回路(OR)1116に出力する機能を有している。 The loudness circuit (LD) 1114 has a function of controlling the volume of the waveform data and outputting a volume zero detection signal to the OR circuit (OR) 1116.
上記論理和回路(OR)1116は、第2のエンベロープジェネレータ(EG−2)1112とラウドネス回路(LD)1114のゼロ検出信号の論理和を出力する回路である。 The logical sum circuit (OR) 1116 is a circuit that outputs a logical sum of the zero detection signals of the second envelope generator (EG-2) 1112 and the loudness circuit (LD) 1114.
上記パンコントローラ1118は、波形データのステレオ定位を制御する機能を有している。 The pan controller 1118 has a function of controlling stereo localization of waveform data.
上記ミキサ1120は、例えば本実施例装置のチャンネル数が16チャンネルある場合に、その16チャンネルの各発音チャンネルの波形データを系列加算するミキシング回路である。 The mixer 1120 is a mixing circuit that, for example, adds the waveform data of each of the 16 sound generation channels when the number of channels of the apparatus of this embodiment is 16.
上記エフェクト付与回路(EFP)1122は、系列加算された波形データにエフェクトを付与する機能を有している。 The effect applying circuit (EFP) 1122 has a function of applying an effect to the waveform data added in series.
図15は、上記実施例1の、メモリ管理部14とキャッシュ部(C0)13の詳細な構成を示す説明図である。
FIG. 15 is an explanatory diagram illustrating detailed configurations of the
同図に示すように、これらの回路構成のうち、キャッシュ部(C0)13は、例えば0〜Fまでの16ライン構成であり、1ラインあたりの容量は4096バイトとする仮定する。その場合のキャッシュ部13の容量は65536バイトとなる。
As shown in the figure, among these circuit configurations, the cache unit (C0) 13 is assumed to have a 16-line configuration from 0 to F, for example, and the capacity per line is assumed to be 4096 bytes. In this case, the capacity of the
以上の各部の動作について説明する。 The operation of each unit will be described.
1)制御部12から内部バス100へ外部メモリ(第1及び第2の記憶部210及び211)へのアドレス(例えば32ビット)が送出される。
1) An address (for example, 32 bits) to the external memory (first and
2)キャッシュ部13の各ライン(CacheLine0〜F)のラインアドレスセレクタ1400(LAS−0〜LAS−F)がこれを受け取り、上位(例えば20)ビットを見て自分がレジストしているラインに対応するアドレスの上位(例えば20)ビットと比較する。この比較のためにラインアドレスセレクタ1400は(例えば20ビットの)上位アドレスレジスタを備えている。レジスタの内容は、ラインが更新される際に書き換えられる。
2) The line address selector 1400 (LAS-0 to LAS-F) of each line (CacheLine0 to F) of the
3)一致結果はHIT信号としてラインセレクタ1406(LS)に送出される。HIT=ONの場合は下位(例えば12)ビットのアドレスがラインメモリ1300(LM−0〜LM−F)に送出される。HIT=OFFの場合、アドレスは送出されない。 3) The match result is sent to the line selector 1406 (LS) as a HIT signal. When HIT = ON, the lower (for example, 12) bit address is sent to the line memory 1300 (LM-0 to LM-F). When HIT = OFF, no address is sent.
4)各ラインのHIT信号は全てラインセレクタ1406(LS)に集められる。 4) All the HIT signals of each line are collected in the line selector 1406 (LS).
4−1)全てのHITがOFFであれば、ラインセレクタ1406(LS)は、(0)CTR=ON(制御部12がキャッシュミスヒットした場合に出力される信号)を出力し、(1)適切な(例えば最後にアクセスされた時期が最も古い)キャッシュラインを選び、(2)当該ラインのデータバスセレクタ1402(DBS)をOCT信号を用いて「外部−内部直結」に切り替え、(3)当該ラインのラインメモリ1300(LM)をCCT信号を用いて書込モードで選択状態にし、(4)ラインアドレスセレクタ1400(LAS)をICT信号を用いて強制的に内部バス100選択状態にし、(5)プリロードアドレスジェネレータ1404(PAG)にスタートアドレスのクリアを要求する。
4-1) If all the HITs are OFF, the line selector 1406 (LS) outputs (0) CTR = ON (a signal output when the control unit 12 has a cache miss hit), and (1) Select an appropriate cache line (for example, the oldest accessed time), and (2) switch the data bus selector 1402 (DBS) of the line to “external-internal direct connection” using the OCT signal. (3) The line memory 1300 (LM) of the line is selected in the write mode using the CCT signal, and (4) the line address selector 1400 (LAS) is forcibly set to the
4−2)いずれかのラインがHIT=ONを示しており、かつ前回のライン処理完了時までにプリロードアドレスジェネレータ1404(PAG)が更新されなかった場合は、ラインセレクタ1406(LS)は、(0)CTR=OFFを出力し、(1)HIT=ONであるラインのラインメモリ1300(LM)をCCT信号を用いて読出モードで選択状態にし、(2)当該ラインのデータバスセレクタ1402(DBS)をOCT信号を用いて「内部」のみ接続状態とする。 4−3)いずれかのラインがHIT=ONを示しており、かつ前回のライン処理完了時までにプリロードアドレスジェネレータ1404(PAG)が更新された場合は、ラインセレクタ1406(LS)は、(0)CTR=ONを出力し、(1)HIT=ONであるラインのラインメモリ1300(LM)をCCT信号を用いて読出モードで選択状態にし、(2)当該ラインのデータバスセレクタ1402(DBS)をOCT信号を用いて「内部」のみ接続状態とし、(3)適切な(例えば最後にアクセスされた時期が最も古い)キャッシュラインを選び、(4)当該ラインのデータバスセレクタ1402(DBS)をOCT信号を用いて「外部」のみ接続状態に切り替え、(5)当該ラインのラインメモリ1300(LM)をCCT信号を用いて書込モードで選択状態にし、(6)ラインアドレスセレクタ1400(LAS)をICT信号を用いて強制的に内部バス100選択状態にし、(7)プリロードアドレスジェネレータ1404(PAG)にスタートアドレスのクリアを要求する。
4-2) If any line indicates HIT = ON and the preload address generator 1404 (PAG) is not updated by the completion of the previous line processing, the line selector 1406 (LS) 0) CTR = OFF is output, (1) The line memory 1300 (LM) of the line where HIT = ON is selected in the read mode using the CCT signal, and (2) the data bus selector 1402 (DBS) of the line ) Is connected only to “inside” using the OCT signal. 4-3) When any line indicates HIT = ON and the preload address generator 1404 (PAG) is updated by the completion of the previous line processing, the line selector 1406 (LS) ) CTR = ON is output, (1) The line memory 1300 (LM) of the line where HIT = ON is selected in the read mode using the CCT signal, and (2) the data bus selector 1402 (DBS) of the line (3) Select an appropriate (for example, the oldest accessed time) cache line, and (4) set the data bus selector 1402 (DBS) of the line Using the OCT signal, only “external” is switched to the connected state. (5) The line memory 1300 (LM) of the line is changed to the CCT signal. (6) The line address selector 1400 (LAS) is forcibly set to the
5)外部バス200のデータはデータアナライザ1408(DA)によって解析される。もしデータ(プログラムデータ)中にジャンプもしくはコール命令が存在していたら、データアナライザ1408(DA)はその飛び先アドレスの上位(例えば20)ビットを取得し、プリロードアドレスジェネレータ1404(PAG)に送出する。
5) Data on the
6)プリロードアドレスジェネレータ1404(PAG)は、ラインセレクタ1406(LS)によってラインメモリ1300(LM)の書き換えを実行中にデータアナライザ1408(DA)から飛び先アドレスが送られてきたら、その下位(例えば12)ビットに“0”を付加してプリロードスタートアドレスとしてレジストする。その後ラインセレクタ1406(LS)によって当該ラインの転送が終了したら、図示しないクロックに応じてプリロードアドレスを1ずつインクリメントしながら送出する。 6) The preload address generator 1404 (PAG) receives the jump address from the data analyzer 1408 (DA) while the line selector 1406 (LS) is executing the rewrite of the line memory 1300 (LM). 12) Add “0” to the bit and register as a preload start address. Thereafter, when the line selector 1406 (LS) finishes transferring the line, the preload address is incremented by 1 in accordance with a clock (not shown) and sent out.
ここでライン1がHITした場合の例を説明する。
Here, an example when
ラインアドレスセレクタ1400(LAS−1)はインターナルアドレスを選択し、それ以外のラインアドレスセレクタ1400は非接続に設定される。そして、ラインメモリ1300(LM−1)は上記ラインアドレスセレクタ1400(LAS−1)からの下位アドレスに従って読出処理を実行し、それ以外のラインメモリ1300は非選択状態となる。その後データバスセレクタ1402(DBS−1)はラインメモリ1300(LM−1)を内部バス100に接続し、それ以外のラインメモリ1300は非接続状態にされる。
The line address selector 1400 (LAS-1) selects an internal address, and the other
反対にキャッシュがミスヒットした場合について説明する。 On the contrary, a case where the cache misses will be described.
一旦、全てのラインアドレスセレクタ1400がHIT=OFFを出力するので、CTR信号が出力される。バスコントローラ11(BC)によって楽音発生部10とバスタイミングが競合すると、該バスコントローラ11(BC)が外部バス200をメモリ管理部14に接続する。
Once all the
バスコントローラは上記接続を図示しないクロックのカウントにより1サンプル時間維持する。この間に外部バスに接続された、上記外部メモリ(第2の記憶部211など)からデータがラインに記憶されつつ、制御部12も動作し、この間ジャンプまたはコール命令があれば更にプリロードアドレスが記憶される。
The bus controller maintains the connection for one sample time by counting a clock (not shown). During this time, while the data is stored in the line from the external memory (
上記1サンプル時間が経過すると、バスコントローラ11(BC)はWAIT信号を出力し、外部バス200の接続をメモリ管理部14からデコーダ/バッファ16に戻し、最小でも、例えば3サンプル時間の間この接続を維持する。
When the one sample time elapses, the bus controller 11 (BC) outputs a WAIT signal, and the connection of the
この後、更にメモリ管理部14からCTR信号による接続要求があれば、上記の処理を、接続要求がなくなるまで繰り返す。ここでバスコントローラ11(BC)が接続をデコーダ/バッファ16に戻して維持する時間は、例えば波形データ中に周期的に出現するチェック用データ(パリティデータ)の間のデータ列(通常の波形データ)のワード数に等しくすることができる。
Thereafter, if there is a connection request by the CTR signal from the
上記のラインが終端に達したら、次のラインを探す。次がHITであれば、制御部12はキャッシュを読んで動作し、同時にプリロードアドレスジェネレータ1404(PAG)を用いてジャンプ先のペイジがプリロードされ、HITしなければプリロードは実行されずに、次のラインが読み込まれる。 When the above line reaches the end, it looks for the next line. If the next is HIT, the control unit 12 reads and operates the cache, and at the same time, the jump destination page is preloaded using the preload address generator 1404 (PAG). If the HIT is not performed, the preload is not executed. A line is read.
図16は、上記実施例1のデコーダ・バッファ(D/B)16の構成を示す回路図である。
FIG. 16 is a circuit diagram showing a configuration of the decoder buffer (D /
楽音発生部10の上記ウェイブアドレスジェネレータ(WAG)1102(図14参照)が発生した波形読出アドレスは、バッファセレクタ(BS)1500を通じてウェイブデータバッファ(WDB−0/1)1502a及び1502bに与えられる。現在波形が外部バス200から読み込まれていない側のウェイブデータバッファ(WDB−0/1)1502a又は1502bから波形が楽音発生部10のインターポレイタ(IP)1104(図14参照)へ送出される。
The waveform read address generated by the wave address generator (WAG) 1102 (see FIG. 14) of the
上記楽音発生部10に波形が送出されていない側のウェイブデータバッファ(WDB−0/1)1502a又は1502bは、外部バス200から波形データがウェイブリーダレジスタ(WRR)1510を通じて読み込まれる。
In the wave data buffer (WDB-0 / 1) 1502a or 1502b on the side where the waveform is not sent to the
このウェイブリーダレジスタ(WRR)1510は、バスコントローラ11を介して外部メモリ(第1の記憶部210)から1ブロック分(図6に拠れば8bit×4word)を読出し、記憶する。実体は1ビットのメモリをbit幅×word数だけ備えたメモリである。外部メモリから読むときは、通常通りwordアドレス(row)を上位、bitアドレス(column)を下位アドレスとして記憶するが、補間ユニット(IPUnit;IU)1506に送出する際は、ウェイブリーダレジスタ(WRR)1510の書込/読出アドレスを、rowとcolumnで入れ替え制御するアドレスR/Cエクスチェンジャ(ARCE)1508によって、rowアドレスとcolumnアドレスを入れ替えて読み出される。該アドレスR/Cエクスチェンジャ(ARCE)1508によって、図7のように記憶したデータが読み出される。また上記補間ユニット(IPUnit;IU)1506は、ウェイブリーダレジスタ(WRR)1510から読み出されたデータのうち、欠損データがある場合に、上述の図7のようにして、他のデータから復元する。
The wave reader register (WRR) 1510 reads and stores one block (8 bits × 4 words according to FIG. 6) from the external memory (first storage unit 210) via the
読み出されたデータは、ウェイブデコーダ(WD)1504によってデコードされる。このとき、楽音波形データの読出速度(例えばチャンネル時間あたり2バイト)と圧縮比(例えば1/2)によって得られるウェイブデータバッファ(WDB−0/1)1502a及び1502bのバッファ速度(例えばチャンネル時間あたり4バイト)がウェイブアドレスジェネレータ(WAG)1102の波形読出速度以上(例えば2.0バイト/チャンネル時間以下)ならば、バッファサイズ分の楽音波形データの読出が終わった後は空き時間となる。この間はREQ=OFFとなって、制御部12が外部バス200を直接アクセス可能となる。
The read data is decoded by a wave decoder (WD) 1504. At this time, the buffer speeds (for example, per channel time) of the wave data buffers (WDB-0 / 1) 1502a and 1502b obtained by the reading speed of the musical sound waveform data (for example, 2 bytes per channel time) and the compression ratio (eg, 1/2) are obtained. If 4 bytes) is equal to or higher than the waveform reading speed of the wave address generator (WAG) 1102 (for example, 2.0 bytes / channel time or less), it becomes a free time after the reading of the sound waveform data for the buffer size is completed. During this time, REQ = OFF, and the control unit 12 can directly access the
ウェイブアドレスジェネレータ(WAG)1102からアドレスが送出されない場合もREQ=OFFとなって、制御部12が外部バス200を直接アクセス可能となる。
Even when an address is not transmitted from the wave address generator (WAG) 1102, REQ = OFF, and the control unit 12 can directly access the
図17は、バスコントローラ(BC)11の構成を示す回路図であり、また図18は、その図の中で示されるバスセレクトコントロール(BSC)1600の真理値表である。 FIG. 17 is a circuit diagram showing the configuration of the bus controller (BC) 11, and FIG. 18 is a truth table of the bus select control (BSC) 1600 shown in the figure.
該バスセレクトコントロール(BSC)1600は、エクスターナルアドレスセレクタ(EAL)1602、エクスターナルデータセレクタ(EDL)1604及びエクスターナルコントロールセレクタ(ECL)1606に接続され、これらの信号を出力する。 The bus select control (BSC) 1600 is connected to an external address selector (EAL) 1602, an external data selector (EDL) 1604, and an external control selector (ECL) 1606, and outputs these signals.
上記バスセレクトコントロール(BSC)1600は、メモリ管理部14からのCTR信号とデコーダ・バッファ16からのREQ信号が入力され、上記各部へセレクト信号を出力するほか、メモリ管理部14へのWAIT信号の出力を行う。
The bus select control (BSC) 1600 receives a CTR signal from the
エクスターナルアドレスセレクタ(EAL)1602は、上記セレクト信号の他、メモリ管理部14からのメモリアドレス及びデコーダ・バッファ16からのメモリアドレスを指定する信号を受信し、第1の記憶部210又は第2の記憶部211の所定のアドレスを指定する信号を送出する。
The external address selector (EAL) 1602 receives the signal specifying the memory address from the
エクスターナルデータセレクタ(EDL)1604は、上記セレクト信号の他、メモリ管理部14と外部バス200間でやりとりされるべきデータの送受信とデコーダ・バッファ16と外部バス200間でやりとりされるべきデータの送受信がなされ、さらにこれらのデータが外部バス200との間で送受信される。
An external data selector (EDL) 1604 transmits / receives data to be exchanged between the
エクスターナルコントロールセレクタ(ECL)1606は、上記セレクト信号の他、メモリ管理部14からの制御(Control)信号とデコーダ・バッファ16からの制御(Control)信号が入力され、第1の記憶部210又は第2の記憶部211に対しての制御(Control)信号を出力する。
In addition to the select signal, the external control selector (ECL) 1606 receives a control (Control) signal from the
図18は、上述のように、バスセレクトコントロール(BSC)1600の真理値表である。 FIG. 18 is a truth table of the bus select control (BSC) 1600 as described above.
同図によれば、バスコントローラ11は、CTR信号及びREQ信号のいずれもOFFの場合、外部バス200はメモリ管理部14にもデコーダ・バッファ16にも接続されず、上記WAIT信号はON状態に設定される。
According to the figure, when both the CTR signal and the REQ signal are OFF, the
またCTR信号=OFFで、REQ信号=ONの場合、外部バス200はデコーダ・バッファ16に接続され、上記WAIT信号はON状態に設定される。
When the CTR signal = OFF and the REQ signal = ON, the
さらにCTR信号=ONで、REQ信号=OFFの場合、外部バス200はメモリ管理部14に接続され、上記WAIT信号はOFF状態に設定される。
Further, when the CTR signal = ON and the REQ signal = OFF, the
そしてCTR信号及びREQ信号のいずれもONの場合、外部バス200はメモリ管理部14に接続され、上記WAIT信号はOFF状態に設定される。このWAIT信号がOFFの状態が1サンプル時間経過する(この間に制御部12が動作すると同時にキャッシュ部13が更新される)と、WAIT信号が再度ONとなり、その後、最小、例えば3サンプル時間(3ST)の間、外部バス200はデコーダ/バッファ16に接続され続ける。この図18のCTR信号及びREQ信号のいずれもONの場合における、「3サンプル時間(3ST)の間、外部バス200はデコーダ/バッファ16に接続され続ける」の「3」は図6の波形データの「パリティデータ」と次の「パリティデータ」の間のデータ列のワード数に等しい。さらにCTR信号及びREQ信号が競合している間は、上記の処理を繰り返す。
When both the CTR signal and the REQ signal are ON, the
本実施例構成によれば、メモリ管理部14により、キャッシュ部13のキャッシュミスヒットが検知されると、バスコントローラ11により、楽音発生部10による楽音波形データ読み出しが中断せしめられて、制御部12による第2の記憶部211へのアクセスが許可され、同時に読み出されたプログラムが上記キャッシュ部13に記憶せしめられる。また、該バスコントローラ11により、読み出しの中断された楽音波形データが、欠損値として補間部15に送出される。他方、この楽音波形データの読み出しが中断された場合に、上記補間部15により、該中断発生前及び発生後に読み出される楽音波形データの値によって、上記欠損値との間が補間されることになる。
According to the configuration of the present embodiment, when the
すなわち、キャッシュ部13のキャッシュミスヒットの時には、バスコントローラ11により、楽音波形データの読み出しを中断させて、制御部12によるプログラムの読み出しを優先させ、その中断の際に生じる楽音波形データの欠損は、上記補間部15による補間処理で補うことになる。そのため、楽音発生部10による楽音波形データの読み出しをバスコントローラ11が中断させて、制御部12が第2の記憶部211へアクセスすることができるようにしつつ、その中断で欠損した分の楽音波形データは補間部15で補われるため、時分割で行われる複数の楽音発生には影響がでないようにすることが可能となる。
That is, at the time of a cache miss hit of the
上記補間部15による補間処理は、読み出される楽音波形データが、読み出される一定の量毎にチェック用のパリティデータが用いられて行われると、中断が行われたことが直ぐに分かると共に、また補間処理が正しく簡単にできるようになる。
The interpolation processing by the interpolating
尚、本発明の1チップ電子楽音発生器は、上述の図示例にのみ限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。例えばキャッシュ(C0)及びデータキャッシュ(C1)をチップに組み込まずに外装してもよい。また、ゼロペイジプログラムはキャッシュ(C0)でなく、データキャッシュ(C1)または内部バス上に配置される他の記憶手段に記憶されてもよい。キャッシュ(C0)の各ラインのうち、ライン0を書き換え不能、またはペイジアウト不能としてもよい。データキャッシュ(C1)はキャッシュ(C0)と同様に扱われてもよい。データキャッシュ(C1)を廃してプログラムコードとプログラムデータをキャッシュ(C0)に混在させてもよい。第1の記憶部と第2の記憶部は同一の記憶手段の別エリアであってもよい。
Note that the one-chip electronic musical tone generator of the present invention is not limited to the above-described illustrated examples, and it is needless to say that various modifications can be made without departing from the gist of the present invention. For example, the cache (C0) and the data cache (C1) may be packaged without being incorporated in the chip. Further, the zero page program may be stored not in the cache (C0) but in the data cache (C1) or other storage means arranged on the internal bus. Of the lines in the cache (C0),
本発明に係る1チップ電子楽音発生器の構成は、電子楽器などに利用できるほか、電子ゲームやその他電子的に楽音を発生できるものには利用可能である。 The configuration of the one-chip electronic musical tone generator according to the present invention can be used for electronic musical instruments and the like, as well as for electronic games and other devices that can generate musical sounds electronically.
10 楽音発生部
11 バスコントローラ
12 制御部
13 キャッシュ部
14 メモリ管理部
15 補間部
16 デコーダ・バッファ
17 データキャッシュ部
100 内部バス
200 外部バス
210 第1の記憶部
211 第2の記憶部
1100 パラメータレジスタ
1102 ウェイブアドレスジェネレータ
1104 インターポレイタ
1106 DCF
1108、1112 エンベロープジェネレータ
1110 DCA
1114 ラウドネス回路
1116 論理和回路
1118 パンコントロール
1120 ミキサ
1122 エフェクト付与回路
1300 ラインメモリ
1400 ラインアドレスセレクタ
1402 データバスセレクタ
1404 プリロードアドレスジェネレータ
1406 ラインセレクタ
1408 データアナライザ
1500 バッファセレクタ
1502a、1502b ウェイブデータバッファ
1504 ウェイブデコーダ
1506 補間ユニット
1508 アドレスR/Cエクスチェンジャ
1510 ウェイブリーダレジスタ
1600 バスセレクトコントロール
1602 エクスターナルアドレスセレクタ
1604 エクスターナルデータセレクタ
1606 エクスターナルコントロールセレクタ
DESCRIPTION OF
1108, 1112 Envelope Generator 1110 DCA
1114 Loudness circuit 1116 OR circuit 1118 Pan control 1120 Mixer 1122 Effect applying circuit 1300
Claims (2)
上記第1の記憶手段及び第2の記憶手段に対し、外部バスを介してこれらの記憶手段に時分割でアクセスすると共に、キャッシュミスヒット信号の受信により、上記楽音発生手段による楽音波形データの読み出しを中断させ、且つ読み出しの中断された楽音波形データを欠損値として送出するバスコントローラと、
読み出された上記プログラムに応じて動作し、上記楽音を生成するためのパラメータを作成して上記楽音発生手段に供給する制御手段と、
上記バスコントローラと制御手段との間に介在して、少なくともプログラムのキャッシュを行うキャッシュ手段と、
上記キャッシュ手段のキャッシュミスヒットを検知し、キャッシュミスヒットが検知された際に、上記バスコントローラにキャッシュミスヒット信号を送信すると共に、バスコントローラによる楽音波形データ読み出しが中断された際に、上記制御手段による第2の記憶手段へのアクセスを許可して、同時に読み出されたプログラムを上記キャッシュ手段に記憶させるメモリ管理手段と、
該バスコントローラにより楽音波形データの読み出しが中断された場合に、該中断発生前及び発生後に読み出される楽音波形データの値によって、上記欠損値との間を修復補間する補間手段と
を有し、
上記補間手段は、上記修復補間処理を、読み出される楽音波形データが読み出される一定の量毎に付加されたチェック用データを用いて行うことを特徴とする1チップ電子楽音発生器。 According to the parameter generated based on the program for generating the musical sound, which is read out from the first storage means storing the musical sound waveform data for generating the musical sound, and stored in the second storage means. A musical sound generating means for processing musical sound waveform data to generate a plurality of musical sounds in a time-sharing manner;
The first storage means and the second storage means are accessed in a time-sharing manner via an external bus, and the musical sound waveform data is read out by the musical sound generation means by receiving a cache miss signal. A bus controller that interrupts the reading and sends out the interrupted musical tone waveform data as a missing value;
Control means that operates in accordance with the read program, generates a parameter for generating the musical sound, and supplies the parameter to the musical sound generating means;
Cache means for interposing at least a program interposed between the bus controller and the control means,
When a cache miss hit is detected by the cache means, a cache miss signal is transmitted to the bus controller when a cache miss hit is detected, and when the musical tone waveform data reading by the bus controller is interrupted, the control is performed. Memory management means for permitting access to the second storage means by the means and storing the simultaneously read program in the cache means;
If the bus controller by the musical tone waveform data read is interrupted, the value of the musical tone waveform data read out after the interruption occurs before and generating, possess an interpolation means for repairing interpolating between the missing values,
The one-chip electronic musical tone generator according to claim 1 , wherein the interpolation means performs the repair interpolation processing using check data added for every fixed amount of read musical sound waveform data .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008068446A JP5229993B2 (en) | 2008-03-17 | 2008-03-17 | 1-chip electronic musical tone generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008068446A JP5229993B2 (en) | 2008-03-17 | 2008-03-17 | 1-chip electronic musical tone generator |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009223060A JP2009223060A (en) | 2009-10-01 |
JP5229993B2 true JP5229993B2 (en) | 2013-07-03 |
Family
ID=41239892
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008068446A Expired - Fee Related JP5229993B2 (en) | 2008-03-17 | 2008-03-17 | 1-chip electronic musical tone generator |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5229993B2 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2679540B2 (en) * | 1992-07-15 | 1997-11-19 | ヤマハ株式会社 | Memory controller |
JP2921376B2 (en) * | 1993-12-22 | 1999-07-19 | ヤマハ株式会社 | Tone generator |
JP3235409B2 (en) * | 1995-06-07 | 2001-12-04 | ヤマハ株式会社 | Music system, sound source and tone synthesis method |
JP2901143B2 (en) * | 1995-12-28 | 1999-06-07 | ヤマハ株式会社 | Music generator |
JP4254677B2 (en) * | 2004-09-30 | 2009-04-15 | カシオ計算機株式会社 | Musical sound generator and musical sound generation processing program |
-
2008
- 2008-03-17 JP JP2008068446A patent/JP5229993B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009223060A (en) | 2009-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5614420B2 (en) | Musical sound generating apparatus, electronic musical instrument, program, and musical sound generating method | |
US6473847B1 (en) | Memory management method for use in computer system | |
US5763801A (en) | Computer system and method for performing wavetable music synthesis which stores wavetable data in system memory | |
KR20020000878A (en) | Musical sound generator | |
US5809342A (en) | Computer system and method for generating delay-based audio effects in a wavetable music synthesizer which stores wavetable data in system memory | |
JP5915420B2 (en) | Musical sound generating device, musical sound generating method, electronic musical instrument and program | |
JP5229990B2 (en) | 1-chip electronic musical tone generator | |
JP5229993B2 (en) | 1-chip electronic musical tone generator | |
CN109243472B (en) | Audio processing method and audio processing system | |
JPH1020860A (en) | Musical tone generator | |
JP2901143B2 (en) | Music generator | |
JP2950461B2 (en) | Tone generator | |
US7470848B2 (en) | Structure and method for playing MIDI messages and multi-media apparatus using the same | |
JP4254677B2 (en) | Musical sound generator and musical sound generation processing program | |
JP3095290B2 (en) | Electronic musical instrument | |
JP4354268B2 (en) | Signal processing device | |
JP3781171B2 (en) | Music generation method | |
JP3521461B2 (en) | Processing device for multiple periodic media data | |
JP3138585B2 (en) | Electronic tone generator | |
JP2000122668A (en) | Digtal sound data processor, and computor system | |
JP3280361B2 (en) | Electronic musical instrument | |
JP3707908B2 (en) | Electronic musical instrument effect adding device | |
JP2005266662A (en) | Sound source device | |
JPH07271752A (en) | Dsp device | |
JPH0713861A (en) | Cpu interface device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110128 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120927 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121127 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130124 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130312 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130318 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160329 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |