JPH0460722A - Digital microcomputer - Google Patents

Digital microcomputer

Info

Publication number
JPH0460722A
JPH0460722A JP2170163A JP17016390A JPH0460722A JP H0460722 A JPH0460722 A JP H0460722A JP 2170163 A JP2170163 A JP 2170163A JP 17016390 A JP17016390 A JP 17016390A JP H0460722 A JPH0460722 A JP H0460722A
Authority
JP
Japan
Prior art keywords
data
address
cpu
signal
interrupt
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2170163A
Other languages
Japanese (ja)
Inventor
Ryuji Usami
隆二 宇佐美
Kosuke Shiba
斯波 康祐
Koichiro Oki
広一郎 太期
Kazuo Ogura
和夫 小倉
Jun Hosoda
潤 細田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2170163A priority Critical patent/JPH0460722A/en
Publication of JPH0460722A publication Critical patent/JPH0460722A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To set the processing result of an interruption processing routine to be accurate by preventing the control of CPU from shifting to an interruption mode while plural pieces of data are written into a memory for interruption processing. CONSTITUTION:MCPU executes an instruction masking interruption prior to the transfer of data for preventing the control of MSPU from shifting a timer interruption processing routine while data is transferred from a transfer buffer to register group for channel sound source. The mask signal MSK of low active is generated from the operation control circuit of MSPU while the interruption mask instruction is executed. The mask signal MSK operates in such a way that it masks an interruption signal INT from an interruption generation part and prohibits the shift of control for the interruption processing routine.

Description

【発明の詳細な説明】 E発明の技術分野〕 この発明はデジタルマイクロコンピュータに関する。[Detailed description of the invention] Technical field of E invention] This invention relates to a digital microcomputer.

[発明の背景] 最近1本件出願人はマイクロコンピュータのプログラム
処理により、電子楽器の制御入力処理だけでなく、楽音
信号の生成も行う装置を提案した(特願昭63−334
.158号)、このマイクロコンピュータのCPUはメ
インプログラムの実行生成するため、タイマーからのイ
ンタラプト信号に応答してインタラプト処理ルーチンを
実行する。
[Background of the Invention] Recently, the applicant has proposed a device that not only processes control inputs for electronic musical instruments but also generates musical tone signals through microcomputer program processing (Japanese Patent Application No. 63-334).
.. No. 158), the CPU of this microcomputer executes an interrupt processing routine in response to an interrupt signal from a timer in order to generate execution of the main program.

このマイクロコンピュータにはメインプログラムからイ
ンタラプト処理ルーチンへのデータ転送に関連する問題
がある。即ちCPUのメインプログラムでの処理のなか
には、インタラプト処理ルーチンで参照することになる
複数のデータをインタラプト処理用メモリに設定するデ
ータ更新処理が含まれる。インタラプト信号はこのよう
なデータ更新処理の途中でも生じ得る。その場合、CP
Uの制御はメインプログラムからインタラプト処理ルー
チンに移る。その結果、インタラプト処理ルーチンの処
理結果(楽音波形データ)にエラーが生じてしまう1例
えば、エンベロープを例にとると、エンベロープのステ
ップを更新するときにメインプログラムは新しいステッ
プに対する複数のエンベロープパラメータ(エンベロー
プ演算間7期、エンベローラ差分値、エンベロープミル
s等)をインタラプト処理用メモリの対応する領域に書
き込もうとする。すべてのエンベロープ、パラメータが
書き込まれないうちにインタラシト信号が発生してイン
タラプト処理ルーチンにCPUの制御が移行すると、イ
ンタラプト処理ルーチンでハ更新されたエンベロープパ
ラメータと更新前のエンベロープパラメータ(したがっ
て正しくない値のデータ)とを用いてエンベロープ波高
値を演算し、エンベロープ波高値に基づいて楽音信号を
生成する。したがって、生成されるエンベロープ波高値
、楽音信号は意図しない値となってしまう。
This microcomputer has problems related to data transfer from the main program to the interrupt processing routine. That is, the processing in the main program of the CPU includes data update processing for setting a plurality of data to be referenced in the interrupt processing routine in the interrupt processing memory. An interrupt signal can also be generated during such data update processing. In that case, C.P.
Control of U is transferred from the main program to the interrupt processing routine. As a result, errors occur in the processing results (music waveform data) of the interrupt processing routine.1 For example, taking an envelope as an example, when updating an envelope step, the main program updates multiple envelope parameters (envelope 7 period between calculations, envelope difference value, envelope mill s, etc.) is attempted to be written to the corresponding area of the interrupt processing memory. If an interrupt signal is generated and CPU control is transferred to the interrupt processing routine before all envelopes and parameters have been written, the interrupt processing routine will write the updated envelope parameters and the envelope parameters before the update (therefore, the incorrect values). The envelope peak value is calculated using the data), and a musical tone signal is generated based on the envelope peak value. Therefore, the generated envelope peak value and musical tone signal end up being unintended values.

以上、電子楽器に応用したマイクロコンピュータを例に
とって、メインプログラムからインタラプト処理ルーチ
ンに複数のデータを渡す場合の問題を説明したが、以下
説明するこの発明はこの種の問題をかかえるすべてのマ
イクロコンピュータにとって有効な解決手段を提供する
ものである。
Above, we have explained the problem of passing multiple pieces of data from the main program to the interrupt processing routine using a microcomputer applied to an electronic musical instrument as an example.This invention, which will be explained below, is suitable for all microcomputers facing this type of problem. It provides an effective solution.

[発明の目的] すなわち、この発明の目的は、インタラプト処理ルーチ
ンに渡すメインプログラムでの複数データの書込処理を
保証して、インタラプト処理ルーチンの処理結果が常に
正しいものになるようにしたマイクロコンピュータを提
供することである。
[Object of the Invention] That is, an object of the present invention is to provide a microcomputer that guarantees writing processing of multiple data in a main program passed to an interrupt processing routine so that the processing results of the interrupt processing routine are always correct. The goal is to provide the following.

[発明の構成1作用] 上記の目的を達成するため、この発明によればメインプ
ログラムを実行するメインプログラムモードとインタラ
プト処理ルーチンを実行するインタラプトモードとを有
するCPUと、インタラプト信号を発生するインタラプ
ト発生手段と、前記インタラプト信号に応答して前記C
PUで実行中のメインプログラムを中断して前記CPU
のモードを前記インタラプトモードに切替制御するCP
Uモード制御手段と、を有するデジタルマイクロコンピ
ュータにおいて、前記CPUの前記メインプログラムモ
ードにおいて複数のデータをインタラプト処理用メモリ
に書き込み、前記インタラプトモードにおいてこのイン
タラプト処理用メモリに記憶される前記複数のデータを
参照する手段と、前記メインプログラムモーFにおいて
前記手段によりインタラプト処理用メモリに対する前記
複数のデータの書込処理が実行されている間、前記イン
タラプト信号をマスクすることにより前記CPUモード
制御手段の動作を禁止して前記書込処理の中断を禁止す
るインタラプトマスク手段とを有することを特徴とする
デジタルマイクロコンピュータが提供される。
[Structure 1 of the Invention] In order to achieve the above object, the present invention includes a CPU having a main program mode for executing a main program and an interrupt mode for executing an interrupt processing routine, and an interrupt generator for generating an interrupt signal. means, and said C in response to said interrupt signal.
The main program running on the PU is interrupted and the CPU
CP that controls switching of the mode of the mode to the interrupt mode.
In the digital microcomputer, the digital microcomputer has a U-mode control means, in which a plurality of data are written in the interrupt processing memory in the main program mode of the CPU, and the plurality of data stored in the interrupt processing memory are written in the interrupt processing memory in the interrupt mode. referring means; and while the writing process of the plurality of data to the interrupt processing memory is executed by the means in the main program mode F, the operation of the CPU mode control means is controlled by masking the interrupt signal. There is provided a digital microcomputer characterized in that it has interrupt mask means for prohibiting interruption of the write process.

この構成によれば、メインプログラムモードにおいて複
数のデータがインタラプト処理用メモリに書き込まれて
いる間はインタラプト信号がマスクされてCPUの制御
をインタラプトモードに移行するCPUモード制御手段
の動作が禁止されるので、書込処理を保証でき、インク
ラブド処理ルーチンの処理結果を正しいものにすること
ができる。
According to this configuration, while a plurality of pieces of data are written to the interrupt processing memory in the main program mode, the interrupt signal is masked and the operation of the CPU mode control means for shifting control of the CPU to the interrupt mode is prohibited. Therefore, write processing can be guaranteed, and the processing results of the included processing routine can be made correct.

[実施例] 以下、図面を参照してこの発明の詳細な説明する。[Example] Hereinafter, the present invention will be described in detail with reference to the drawings.

く概 要〉 本実施例はこの発明を電子楽器に適用したものである0
本実施例(第1〜第34図)は種々の特徴を含んでいる
。第1の特徴は、楽音信号を生成する音源としてプログ
ラムで動作する複数のマイクロコンピュータ処理装置1
(CPU)を使用することであり、従来のような専用構
造の/\−トウエア音源は不要である。1つのCPUが
メインCPUあるいはマスターCPU(10)として働
き音源処理のみでなくアプリケーション(この場合、楽
器)に従う入力装置(W’1.機能キー等)、出力装!
 (DAC等)を取り扱う(第4図、第5図)、他のC
PUはマスターCPUに対してサブCPUないしスレー
ブCPU (20)として働き、音源処理を実行する(
第6図)、シたがって、音源処理について各CPUの負
担が分担される構成である。
Summary> This embodiment applies this invention to an electronic musical instrument.
This embodiment (FIGS. 1 to 34) includes various features. The first feature is a plurality of microcomputer processing devices 1 that operate according to a program as a sound source that generates musical tone signals.
(CPU), and there is no need for a /\-toware sound source with a dedicated structure like in the past. One CPU functions as the main CPU or master CPU (10) and not only processes sound sources, but also input devices (W'1. function keys, etc.) and output devices according to the application (in this case, a musical instrument)!
(DAC etc.) (Figure 4, Figure 5), other C
The PU works as a sub-CPU or slave CPU (20) for the master CPU and executes sound source processing (
(FIG. 6), the configuration is such that the burden of sound source processing is shared between each CPU.

第2の特徴はサブCPUが動作を開始し、終了するメカ
ニズムに関係しており、本実施例によれば、サブCPU
の動作は、マスターCPUに対して音源処理を要求する
タイヤインタラプトを合図として開始し、その結果、マ
スターCPUとサブCPUにおいて音源処理が並行に実
行される。サブCPUの動作(音源処理)が終了すると
その終了信号によってサブCPUはリセット状態(停止
状態)に移行するとともにその終了信号がマスターCP
Uに伝えられる(第8図、第16図)。この特徴により
、マスターCPUはサブCPUの動作期間を有効に管理
、把握できる。更に、この特徴により、高速処理が要求
される音源処理タスク(楽音信号のデジタルサンプルを
生成する仕事)を効率よく実行できる。
The second feature is related to the mechanism by which the sub-CPU starts and ends its operation, and according to this embodiment, the sub-CPU
The operation starts in response to a tire interrupt that requests sound source processing to the master CPU, and as a result, sound source processing is executed in parallel in the master CPU and sub CPU. When the operation (sound source processing) of the sub CPU is completed, the sub CPU is transferred to the reset state (stop state) by the end signal, and the end signal is sent to the master CPU.
It is transmitted to U (Fig. 8, Fig. 16). This feature allows the master CPU to effectively manage and understand the operating period of the sub CPU. Furthermore, this feature allows efficient execution of sound source processing tasks (generating digital samples of musical tone signals) that require high-speed processing.

本実施例の第3の特徴はメインプログラムからタイマイ
ンタラプト処理ルーチンに渡すデータの更新(転送)問
題に関係する。インタラプト処理ルーチンの実行の結果
、インタラプト処理ルーチンにおいて#照すべき複数の
データ(例えばエンヘローブ目標値、エンベロープレー
トのようなエンヘロープパラメータ)を更新する必要が
生じる。この複数のデータの更新の実行命令はメインプ
ログラム中に含まれる。即ち、この複数のデータはメイ
ンプログラムが更新し、タイマインタラプト処理ルーチ
ンが参照するデータである。このような複数のデータは
、全体として意味ある情報を構成するので、メインプロ
グラムにおいて複数のデータのすべてが更新されないう
ちにインタラプト処理ルーチンに制御が移ってはならな
い、これを防止するため、第1の方式としてデータ更新
が完了するまでインタラプトをマスクしてインタラプト
処理ルーチンへの移行を禁止する方式が開示され(第1
6図、第17図)、第2の方式として、複数のデータの
更新(転送)をメインプログラム中の単一命令で実行す
る方式が開示される(第18図〜第21図)、この結果
、インタラプト処理ルーチンの処理結果(楽音信号のサ
ンプル)が正しい伯を示し、正しい動作が保証される。
The third feature of this embodiment relates to the problem of updating (transferring) data passed from the main program to the timer interrupt processing routine. As a result of the execution of the interrupt processing routine, it becomes necessary to update a plurality of data (eg, enthrope target value, enthrope parameters such as envelope plate) to be referenced in the interrupt processing routine. The execution instructions for updating this plurality of data are included in the main program. That is, this plurality of data is updated by the main program and referenced by the timer interrupt processing routine. Since such multiple pieces of data constitute meaningful information as a whole, control must not be transferred to the interrupt processing routine before all of the multiple pieces of data have been updated in the main program. As a method, a method has been disclosed in which the interrupt is masked and the transition to the interrupt processing routine is prohibited until the data update is completed (Part 1).
6 and 17), and as a second method, a method is disclosed in which multiple data updates (transfers) are executed with a single instruction in the main program (Figs. 18 to 21). , the processing results (samples of musical tone signals) of the interrupt processing routine show correct numbers, and correct operation is guaranteed.

本実施例の第4の特徴はマスターCPUからスレーブC
PUに対するデータアクセス問題に関する。従来の複数
CPUマイクロコンピュータシステムでは、一般に、C
PU間のデータ転送は一連のシーケンスを通して行われ
、相当の時間を要する1代表的には、データのアクセス
を要求するCPUからアクセスが要求されるCPUに対
し、アクセス要求信号を送る。このアクセス要求信号に
対しアクセスが要求されるCPUは実行中のオペレーシ
ョンを完了した後に承認(アク7リフジ)信号をCPU
に渡して停止状態となる。アクセス要求信号送信後、承
認信号が受信されるまでの間、要求側のCPUは待ち状
態になる。承認信号を受けて要求側のCPUは被要求側
のCPUの内部メモリに対し、実際のデータアクセスを
実行する。このように従来のCPU間データアクセス方
式は時間を要するので高速処理が望まれる電子楽器のよ
うなアプリケーションには適さない、これを解決するた
め、本実施例では、第1のデータアクセス方式として、
上記第2の特徴を利用してサブCPUが停止状態にある
ときにマスターCPUがサブCPUの内部メモリ(20
6)に対しデータをリード/ライト(アクセス)する停
止モード制御方式が開示され(第22図)、第2のデー
タアクセス方式として待ち状態なしにマスターCPUが
サブCPUをデータアクセスする(サブCPUはデータ
アクセス中のみ強制的に停止状態にされる)瞬時データ
アクセス方式とが開示される(第23図〜第25図)。
The fourth feature of this embodiment is that from the master CPU to the slave C
Concerning data access issues for PUs. In conventional multi-CPU microcomputer systems, C
Data transfer between PUs is performed through a series of sequences and takes a considerable amount of time. Typically, a CPU requesting data access sends an access request signal to the CPU requesting access. In response to this access request signal, the CPU to which access is requested completes the operation being executed, and then sends an approval (acknowledgement) signal to the CPU.
and enters the stopped state. After the access request signal is sent, the requesting CPU is in a waiting state until the approval signal is received. Upon receiving the approval signal, the requesting CPU performs actual data access to the internal memory of the requested CPU. As described above, the conventional inter-CPU data access method takes time and is therefore not suitable for applications such as electronic musical instruments that require high-speed processing. To solve this problem, in this embodiment, as the first data access method,
Utilizing the second feature above, when the sub CPU is in a stopped state, the master CPU uses the sub CPU's internal memory (20
6), a stop mode control method for reading/writing (accessing) data has been disclosed (Fig. 22), and as a second data access method, the master CPU accesses data to the sub CPU without waiting state (the sub CPU An instantaneous data access method (forcibly stopped only during data access) is disclosed (FIGS. 23 to 25).

本実施例の第5の特徴はデータ源としてのCPU外部メ
モリを複数のCPUで共用する場合における複数CPU
からのアクセスの競合(衝突)問題に関する0本実施例
によれば後述するメモリ装置競合回避回路(50)を設
けることにより、共用メモリに対するアクセスの競合を
解消し、一定の待ち時間の後、共用メモリからのデータ
を得られるようにしている。
The fifth feature of this embodiment is that the CPU external memory as a data source is shared by multiple CPUs.
According to this embodiment, by providing a memory device conflict avoidance circuit (50) to be described later, conflicts in access to the shared memory are resolved, and after a certain waiting time, the shared memory is Allows data to be retrieved from memory.

本実施例の第6の特徴はデータ変換外FJ(シフト、反
転、一部取り出し等)の高速化に関する。
The sixth feature of this embodiment relates to speeding up FJ (shift, inversion, partial extraction, etc.) other than data conversion.

従来においては、上述したCPU外部メモリのようなデ
ータメモリ内のデータから、CPU内部メモリ(演算用
メモリ)上に変換されたデータを得るために、転送(リ
ードアクセス)命令により、データメモリのデータを演
算用メモリに移し、しかる後、変換命令により、演算用
メモリのデータをALUを介して変換する。所望のデー
タ変換を行うために複数の変換命令を実行する必要もし
ばしば生じる。このように、従来においてはデータ変換
の処理に時間がかかるという問題があり、特に音源処理
のように高速処理が要求されるアプリケーションにおい
ては大きな問題となる。これを解決するため、この実施
例によれば、データ・アドレス変換ハードウェア(60
,70)を設け。
Conventionally, in order to obtain data converted from data in a data memory such as the above-mentioned CPU external memory onto the CPU internal memory (computation memory), a transfer (read access) command is used to transfer the data in the data memory. is transferred to the arithmetic memory, and then the data in the arithmetic memory is converted via the ALU by a conversion instruction. It is also often necessary to execute multiple conversion instructions to effect the desired data conversion. As described above, there has been a problem in the past that data conversion processing takes time, which is a particularly serious problem in applications that require high-speed processing, such as sound source processing. To solve this, according to this embodiment, data address translation hardware (60
, 70).

特殊な転送命令(変換付転送命令)を実行することによ
り、その命令に応答するデータ・アドレス変換ハードウ
ェアを介して所望のデータ変換が施されたデータが演算
用メモリ(106,206)に取り込まれるようにして
いる。したがって、所望の変換データを得るのに、複数
の命令を実行するのではなく単一の命令を実行すればよ
く処理の高速化が図れる。
By executing a special transfer instruction (transfer with conversion instruction), data that has been subjected to the desired data conversion is loaded into the calculation memory (106, 206) via the data address conversion hardware that responds to the instruction. I'm trying to make it happen. Therefore, in order to obtain desired conversion data, it is sufficient to execute a single instruction instead of a plurality of instructions, and the processing speed can be increased.

く全体構成(第1図)〉 第1図は電子楽器の処理装置として構成した本実施例の
全体構成を示すブロック図である0本システムは2つの
中央演算処理装置(一方をMCPUIO1他方を5CP
U20で示す)を有する。
Overall Configuration (Figure 1) Figure 1 is a block diagram showing the overall configuration of this embodiment configured as a processing device for an electronic musical instrument.
(denoted as U20).

各CPUl0120はプログラムを内蔵しており、それ
ぞれのプログラムに従って動作する0MCPUl0は音
源処理(第5図)以外にシステム全体の制御、例えば入
カポ−)118、出力ボート120に接続される入力装
置(例えば鍵盤、機能キー等)からの入力情報の処理、
デジタル楽音信号をアナログ楽音信号に変換するDAC
100の制御等を行う(第4図)、これに対し、5CP
U20は音源処理に専用される(第6図)。
Each CPU 10120 has a built-in program, and the 0MCPU 10, which operates according to the respective program, controls the entire system in addition to sound source processing (Fig. 5). processing of input information from keyboards, function keys, etc.);
DAC that converts digital musical tone signals to analog musical tone signals
100 control etc. (Figure 4), whereas 5CP
U20 is dedicated to sound source processing (FIG. 6).

90は音源制御データ、波形データ等のデータ源として
のメモリである。データメモリ90はここでは、LSI
チップ(第1図の残りのデバイスを搭載している)に外
付けされたROMで構成されている。集積度が高ければ
、単一のLSIチップ上にデータメモリ90を内部メモ
リとして形成可能である。外部メモリ90はMCPU 
10と5CPU20に共用される0MCPUl0からの
アドレス情報はMCPUIOに結合するアドレスバスM
A、外部メモリアドレスチッチ30のMCPU外部メモ
リアドレスラッチ30M、アドレス切り換え回路40.
アドレス変換回路60を介して外部データメモリ90の
アドレス入力に加えられる。一方、5CPU20からの
アドレス情報は5CPU20に結合するアドレスへスS
A、5CPU外部メモリアドレスラッチ30S、アドレ
ス切り換え回路40、アドレス変換回路60を通して外
部データメモリ90のアドレス入力に加えられる。外部
データメモリ90からMCPUIOへのデータ伝送径路
は外部データメモリ90のデータ出力、データ変換回路
70.外部メモリデータラッチ80のMCPU外部メモ
リデータラッチ80M、MCPUloに結合するデータ
バスMDによって構成される。これに対し、外部データ
メモリ90から5CPU20へのデータ伝送径賂は外部
データメモリ90のデータ出力、データ変換回路70.
5CPU外部メモリデータラッチ80S、5CPU20
に結合するデータバスSDによって構成される。
A memory 90 serves as a data source for sound source control data, waveform data, and the like. The data memory 90 is an LSI
It consists of a ROM externally attached to a chip (which carries the remaining devices in Figure 1). If the degree of integration is high, data memory 90 can be formed as an internal memory on a single LSI chip. External memory 90 is MCPU
Address information from 0MCPU10, which is shared by CPUs 10 and 5, is transferred to address bus M, which couples to MCPUIO.
A. MCPU external memory address latch 30M of external memory address switch 30, address switching circuit 40.
It is applied to the address input of external data memory 90 via address conversion circuit 60. On the other hand, the address information from 5CPU20 is sent to the address connected to 5CPU20.
A, 5 is applied to the address input of the external data memory 90 through the CPU external memory address latch 30S, address switching circuit 40, and address conversion circuit 60. The data transmission path from the external data memory 90 to the MCPUIO is the data output of the external data memory 90, the data conversion circuit 70. The MCPU of external memory data latch 80 is composed of external memory data latch 80M and data bus MD coupled to MCPUlo. On the other hand, the data transmission fee from the external data memory 90 to the 5 CPU 20 is the data output of the external data memory 90, the data conversion circuit 70.
5CPU external memory data latch 80S, 5CPU20
It is constituted by a data bus SD coupled to the data bus SD.

メモリ装置競合回避回路50はMCPUIOと5CPU
20の両CPUによる外部メモリ90のアクセスを制御
し、その競合を回避するものである。メモリ装置競合回
避回路50はMCPUIOからの外部メモリアクセスを
要求する信号romaと5CPUからの外部メモリアク
セスを要求する信号r omaの各々に応答してアドレ
ス切り換え回路40を制御してアドレス切り換え回路4
0にMCPUIOからのアドレスと5CPU20からの
アドレスのいずれかを外部メモリ90へのアドレスとし
て選択させる。このためにメモリ装置競合回避回路50
からの選択信号MSELによりアドレス切り換え回路4
0は選択動作を行う、外部メモリ90へのアドレスが確
定するとメモリ装置競合回避回路50は外部メモリ90
に対するチップ選択信号CEと出力イネーブル信号OE
をアクティブにする。これにより外部メモリ90からデ
ータが出力され、データ変換回路70を通してそのデー
タが外部メモリラッチ80の入力バスに現われる。ここ
で、メモリ装置競合回避回路50はデータアクセスを要
求したCPUにデータを送るためにMCPU外部メモリ
データラッチ80M、5CPU外部メモリデータラッチ
80Sのいずれかを作動してデータをラッチさせる。こ
のためにMCPU外部メモリデータラッチ80Mはメモ
リ装置競合回避回路50からのラッチ信号MDLにより
ラッチ動作し、5CPU外部メモリデークラッチ80S
はメモリ装置競合回避回路50からのラッチ信号SDL
によりラッチ動作するようになっている。
The memory device contention avoidance circuit 50 includes MCPUIO and 5 CPUs.
This system controls access to the external memory 90 by both CPUs 20 and avoids conflicts. The memory device conflict avoidance circuit 50 controls the address switching circuit 40 in response to the signal roma requesting external memory access from MCPUIO and the signal roma requesting external memory access from the 5 CPUs.
0 selects either the address from MCPUIO or the address from 5CPU 20 as the address to external memory 90. For this purpose, the memory device contention avoidance circuit 50
Address switching circuit 4 by selection signal MSEL from
0 performs a selection operation. When the address to the external memory 90 is determined, the memory device conflict avoidance circuit 50 selects the external memory 90.
chip selection signal CE and output enable signal OE for
Activate. This causes data to be output from external memory 90 and appear on the input bus of external memory latch 80 through data conversion circuit 70 . Here, the memory device contention avoidance circuit 50 operates either the MCPU external memory data latch 80M or the 5CPU external memory data latch 80S to latch the data in order to send the data to the CPU that has requested data access. For this purpose, the MCPU external memory data latch 80M operates in response to the latch signal MDL from the memory device contention avoidance circuit 50, and the 5CPU external memory data latch 80S
is the latch signal SDL from the memory device contention avoidance circuit 50.
It is designed to latch.

アドレス変換回路60とデータ変換回路70は外部デー
タメモリ90のデータを変換したデータがCPUl01
20に取り込まれるようにするための変換デバイスであ
る。アドレス変換回路60はアドレス切り換え回路40
を通ったアドレス、即ち、CPU (MCPUIOか5
CPU20)から出力されたアドレス(論理アドレス)
を選択的に変更して外部データメモリ90に実際に入力
されるアドレスを形成するものであり、データ変換回路
70は外部データメモリ90から出力されたデータを選
択的に変更してCPU(MCPUIOか5CPU20)
に実際に入力されるデータを形成するものである。各変
換回路60.70における変換の態様を指定するために
、制御信号が使用される。各CPUl0120において
、外部データメモリ90に対するデータアクセスは転送
命令を実行することで行われる。転送命令に基づいてC
PUで生成される制御信号をMRl、MR2、MR3(
MCPUI Oの場合)、SR1,SR2、SR3(S
CPU20の場合)で示しである。これらの信号は外部
メモリアドレスチッチ30、アドレス切り換え回路40
を通った後、信号R1,R2、R3と呼ばれる(MRi
 +LMRi→RiまたはSRi+LSRi+Ri)、
変換の態様を指定するため、制御信号R1,R2がアド
レス変換回路60に入力される。更に、データ変換回路
70における変換のS様を特定するため、制御信号R1
,R2、R3とアドレス変換回路60からのアドレスビ
ット12の信号AI2とアドレスビット15の信号A1
5がデータ変換回路70に加えられる。アドレス変換回
路60とデータ変換回路70の詳細については後述する
The address conversion circuit 60 and the data conversion circuit 70 convert the data of the external data memory 90 to the CPU101.
This is a conversion device for importing into 20. The address conversion circuit 60 is the address switching circuit 40.
The address passed through, that is, the CPU (MCPUIO or 5
Address (logical address) output from CPU 20)
The data conversion circuit 70 selectively changes the data output from the external data memory 90 to form an address that is actually input to the external data memory 90. 5CPU20)
This forms the data that is actually input into the system. Control signals are used to specify the manner of conversion in each conversion circuit 60,70. In each CPU10120, data access to the external data memory 90 is performed by executing a transfer command. C based on transfer instruction
The control signals generated by the PU are MRl, MR2, MR3 (
For MCPUI O), SR1, SR2, SR3 (S
(in case of CPU 20). These signals are sent to the external memory address switch 30 and the address switching circuit 40.
After passing through, the signals are called R1, R2, R3 (MRi
+LMRi→Ri or SRi+LSRi+Ri),
Control signals R1 and R2 are input to address conversion circuit 60 to specify the mode of conversion. Furthermore, in order to specify the S type of conversion in the data conversion circuit 70, the control signal R1
, R2, R3, address bit 12 signal AI2 from address conversion circuit 60, and address bit 15 signal A1.
5 is added to the data conversion circuit 70. Details of the address conversion circuit 60 and data conversion circuit 70 will be described later.

MCPUIOと5CPU20との間のインタフェースを
定めるため、両CPU間で複数の信号が伝送される。信
号AはMCPU 10から5CPU20に送られる5C
PU20の処理開始を表わす信号、信号Bは5CPU2
0からMCPUIOに送られる5CPU20の処理絆了
を表わす信号、MaはMCPUIOから5CPU20に
送られる5CPU20の内部メモリ(第3図の206)
のアドレス情報、信号CはMCPU 10から5CPU
20に送られる5CPU20の内部メモリの読み書き制
御信号、Dinは5CPU20からMCPUIOに送ら
れる5CPU20の内部メモリからの読出しデータ、D
 oUTはMCPUIOから5CPU20に送られる5
CPU20の内部メモリへの書き込みデータを表わす、
CPU間イフィンタフエース細については後述する。
In order to define the interface between MCPUIO and 5 CPUs 20, a plurality of signals are transmitted between both CPUs. Signal A is 5C sent from MCPU 10 to 5CPU 20
A signal indicating the start of processing of PU20, signal B is 5CPU2
0 to the MCPUIO indicating the completion of processing of the 5CPU 20, Ma is the internal memory of the 5CPU 20 sent from the MCPUIO to the 5CPU 20 (206 in FIG. 3)
address information, signal C is MCPU 10 to 5 CPU
The read/write control signal of the internal memory of the 5 CPU 20 is sent to the MCPUIO, Din is the read data from the internal memory of the 5 CPU 20, which is sent from the 5 CPU 20 to the MCPUIO, D
oUT is sent from MCPUIO to 5CPU205
Represents data written to the internal memory of the CPU 20,
Details of the inter-CPU interface will be described later.

上述したように音源処理によりMCPUIOと5CPU
20とでデジタル楽音信号が生成される。生成結果はM
CPUIOから、右DAC100Rと左DAC100L
とから成るデジタルアナログ変換器(DAC)Zooに
送られ、アナログ楽音信号に変換されて外部に出力され
る。
As mentioned above, MCPUIO and 5 CPU
20, a digital musical tone signal is generated. The generated result is M
From CPUIO, right DAC100R and left DAC100L
The signal is sent to a digital-to-analog converter (DAC) Zoo consisting of , and is converted into an analog musical tone signal and output to the outside.

<MCPUと5CPUの構成(第2、第3図)〉第2図
にMCPUIOの内部構造を示し、第3図に5CPU2
0の内部構造を示す。
<Configuration of MCPU and 5CPU (Figs. 2 and 3)> Fig. 2 shows the internal structure of MCPUIO, and Fig. 3 shows the structure of 5CPU2.
The internal structure of 0 is shown.

第2図において制御用ROM102には楽器の各種制御
入力を処理するメインプログラムと楽音を生成するイン
タラプト処理プログラムが記憶されており、ROMアド
レス制御部114からROMアドレスデコーダ104を
介して指定されたアドレスにあるプログラム語(命令)
をインストラクション出力ラッチ102aを介して順次
出力していく、なお、具体的実施例では、プログラム語
長は28ビツトであり、プログラム語の一部が次に読み
出されるべきプログラム語を記憶するアドレスの下位部
(ページ内アドレス)としてROMアドレス制御部11
4に入力されるネクストアドレス方式となっているが、
代りにプログラムカウンタ方式を使用してもよい、RA
Mアドレス制御部114は制御用ROM102からの命
令のオペランドがレジスタを指定している場合に、RA
M106内の対応するレジスタのアドレスを指定する。
In FIG. 2, the control ROM 102 stores a main program for processing various control inputs of the musical instrument and an interrupt processing program for generating musical tones. Program words (commands) in
In the specific embodiment, the program word length is 28 bits, and part of the program word is located at the lower address of the address storing the program word to be read next. ROM address control unit 11 as part (intra-page address)
The next address method is entered in 4, but
A program counter method may be used instead, RA
When the operand of the instruction from the control ROM 102 specifies a register, the M address control unit 114 controls the RA
Specifies the address of the corresponding register in M106.

RAM106は演算用メモリを構成するレジスタ群であ
り、汎用演算、フラグ演算、楽音の演算等に使用される
。ALU部(加減算器及び論理演算部)108と乗算器
110は制御用ROMIO2からの命令が演算命令のと
きに用いられる。
The RAM 106 is a group of registers constituting a calculation memory, and is used for general-purpose calculations, flag calculations, musical tone calculations, and the like. The ALU section (addition/subtractor and logic operation section) 108 and multiplier 110 are used when the instruction from the control ROMIO 2 is an operation instruction.

特に乗算器110は楽音波形の演算に使用しており、そ
のための最適化として第1と第2のデータ入力(例えば
16ビツトデータ)を乗算して入力と同じ長さ(16ビ
ツト)のデータを出力するようになっている。上記RA
M106、加減算器108、乗算器110により、演算
回路が構成される。オペレージオン制御回路112は制
御用ROM102からの命令のオペコードを解読し、指
示されるオペレーションを実行するために、回路の各部
に制御信号(全体をCNTRで示す)を送る。また条件
付分岐命令の実行の際にオペレージ苫ン制御回路112
はALU部108からのステータス信号S(例えばオー
バーフロー信号、ゼロフラグ信号等)により分岐条件成
立を検出してROMアドレス制御部114を介してアド
レスを分岐先のアドレスにジャンプさせる。
In particular, the multiplier 110 is used to calculate musical waveforms, and as an optimization for this purpose, it multiplies the first and second data inputs (for example, 16-bit data) to obtain data of the same length (16 bits) as the input. It is designed to be output. Above RA
M106, adder/subtractor 108, and multiplier 110 constitute an arithmetic circuit. The operation-on control circuit 112 decodes the operation code of the instruction from the control ROM 102 and sends a control signal (indicated by CNTR) to each part of the circuit in order to execute the instructed operation. In addition, when executing a conditional branch instruction, the operation control circuit 112
detects the establishment of a branch condition based on the status signal S (for example, an overflow signal, a zero flag signal, etc.) from the ALU unit 108 and jumps the address to the branch destination address via the ROM address control unit 114.

所定時間ごとに制御用ROM102の楽音生成プログラ
ムを実行するため、この実施例ではタイマインタラプト
を採用している。すなわち、タイマ(ハードウェアカウ
ンタ)を有するインタラプト発生部116により、一定
時間ごとにROMアドレス制御部114に制御信号IN
T、(割込要求信号)を送り、この信号により、ROM
アドレス制御部114は次に行うメインプログラムの命
令のアドレスを退iI!(保持)し、楽音の生成が行わ
れるインタラプト処理プログラム(サブルーチン)の先
頭アドレスを代りにセットする。これにより、インタラ
プト処理プログラムが開始される。インタラプト処理プ
ログラムのaSにはリターン命令があるので、このリタ
ーン命令がオペレーション制御回路112で解読された
時点で、ROMアドレス制御部114は退避してあった
アドレスを再度セットし、メインプログラムに復帰する
。更に、インタラプト発生部、116からの制御信号I
NTはDAClooにおける楽音信号のデジタル/アナ
ログ変換サンプリング速度を定めるためにDACloo
に供給される。なお、インタラプト発生部116は図の
上ではMCPUIOの内部要素として描いであるが、M
CPUIOに対して現在行っている仕事を停止させ特別
の処理を要求するものであり、論理的にはMCPUIO
の外部要素(周辺装M)である。
In order to execute the musical tone generation program in the control ROM 102 at predetermined intervals, this embodiment employs a timer interrupt. That is, the interrupt generation section 116 having a timer (hardware counter) sends a control signal IN to the ROM address control section 114 at regular intervals.
T, (interrupt request signal) is sent, and this signal causes the ROM to
The address control unit 114 sets the address of the next main program instruction iI! (retained) and instead sets the start address of the interrupt processing program (subroutine) in which musical tones are generated. This starts the interrupt processing program. Since the aS of the interrupt processing program has a return instruction, when this return instruction is decoded by the operation control circuit 112, the ROM address control unit 114 sets the saved address again and returns to the main program. . Furthermore, the control signal I from the interrupt generator 116
NT uses DACloo to determine the digital/analog conversion sampling rate of musical tone signals in DACloo.
is supplied to Note that although the interrupt generation unit 116 is depicted as an internal element of MCPUIO in the diagram,
It requests the CPUIO to stop the work it is currently doing and perform special processing, and logically the MCPUIO
It is an external element (peripheral M) of

クロック発生回路136はマスタークロー、り発生回路
(図示せず)からの2相のマスタークロー7りCKIと
CK2を受け、オペレーション制御回路112を初めと
する回路の各部に加える種々のタイミング信号(T1.
T2、T3、TlCK1、T2CK2、T3CK3等)
を発生する。
The clock generation circuit 136 receives two-phase master claw signals CKI and CK2 from a master clock generation circuit (not shown), and generates various timing signals (T1 ..
T2, T3, TlCK1, T2CK2, T3CK3, etc.)
occurs.

第2図の残りの要素はMCPU 20の外部装置とのイ
ンタフェースに係っている。122は外部メモリアクセ
ス用アドレスバスMA(第1図)にMCPU内部パスを
接続するためのバスインタフェースとしてのゲートを表
わし、124は外部メモリデータバスMDにMCPU内
部パスを接続するためのゲートを表わし、126はDA
Cデータ転送パスにMCPU内部パスを接続するための
ゲートを表わす、また、入カポ−)118と出カポ−)
120はMCPU内部パスを外部の入力装置に結合する
ためのインタフェースである。128は5CPU内部R
AMアドレス指定パスにMCPU内部バスを接続するた
めのゲート、130は5CPU内部RAM書込データバ
スにMCPU内部パスを接続するためのゲート、132
は5CPU内部RAM読出データバスをMCPU内部パ
スに接続するためのゲートを表わす。
The remaining elements of FIG. 2 relate to interfacing MCPU 20 with external devices. 122 represents a gate as a bus interface for connecting the MCPU internal path to the external memory access address bus MA (FIG. 1), and 124 represents a gate for connecting the MCPU internal path to the external memory data bus MD. , 126 is DA
Represents a gate for connecting the MCPU internal path to the C data transfer path, and also includes an input capo (118) and an output capo (118).
120 is an interface for coupling the MCPU internal path to an external input device. 128 is 5 CPU internal R
132 is a gate for connecting the MCPU internal bus to the AM addressing path; 130 is a gate for connecting the MCPU internal path to the 5CPU internal RAM write data bus;
represents a gate for connecting the 5CPU internal RAM read data bus to the MCPU internal path.

5CPUリセット制御部134は5CPU20の動作期
間を管理するためのデバイスである。この実施例に従い
5CPUリセット制御部134はインタラプト発生部1
16からのインタラプト信号INTに応答して、5CP
U20の処理開始を示す信号Aを発生する。この信号A
は5CPU20のROMアドレス制御部214(第3図
)に送られ、これによりROMアドレス制御部214の
アドレス更新動作が開始し、5CPU20の動作(音源
処理を含む)が開始する。5CPU20の動作が終了す
ると5CPU20のオペレーション制御回路212から
処理終了を示す信号Bが発生し、この信号Bが5CPU
リセット制御部134に送られる。これに対し、5CP
Uリセット制御部134は5CPU20の動作を停止す
るために信号Aを反転し、これにより5CPU20のR
OMアドレス制御部214の動作を停止させる、ととも
に、5CPU20が停止中であることを表わす5CPU
状態フラグ信号をオペレーション制御回路112に送る
。オペレーション制御回路112は制御用ROM102
からの5CPU状態の検査命令の実行時に、この5CP
U状態フラグ信号を読むことにより、5CPU20の状
態を検出できる。
The 5CPU reset control unit 134 is a device for managing the operating period of the 5CPU 20. According to this embodiment, the 5 CPU reset control section 134
In response to the interrupt signal INT from 16, 5CP
A signal A indicating the start of processing of U20 is generated. This signal A
is sent to the ROM address control unit 214 (FIG. 3) of the 5 CPU 20, thereby starting the address updating operation of the ROM address control unit 214, and starting the operation of the 5 CPU 20 (including sound source processing). When the operation of the 5 CPU 20 is completed, a signal B indicating the end of processing is generated from the operation control circuit 212 of the 5 CPU 20, and this signal B is sent to the 5 CPU 20.
It is sent to the reset control section 134. On the other hand, 5CP
The U reset control unit 134 inverts the signal A in order to stop the operation of the 5 CPU 20, thereby causing the R of the 5 CPU 20 to stop.
The 5 CPU stops the operation of the OM address control unit 214 and indicates that the 5 CPU 20 is stopped.
A status flag signal is sent to operation control circuit 112. The operation control circuit 112 is a control ROM 102
When executing the 5CPU status inspection command from
By reading the U status flag signal, the status of the 5 CPUs 20 can be detected.

第3図の5CPU20のブロック図において、要素20
2.202a、204.205 206.208.21
2.214.222.224.236はそれぞれ、第2
図のMCPUIOのブロー2り図における要素102.
102a、104.105.106.108.110.
112.114.122.124.136に対応する要
素である。ただし、5CPU20の制御用ROM202
には基本的に音源処理のためのプログラムのみが記憶さ
れており、5CPU20を音源処理専用の処理装置とし
て機能させている。
In the block diagram of the 5 CPU 20 in FIG.
2.202a, 204.205 206.208.21
2.214.222.224.236 are the second
Element 102 in the MCPUIO blow diagram of the figure.
102a, 104.105.106.108.110.
This is an element corresponding to 112.114.122.124.136. However, the control ROM 202 of 5 CPU 20
Basically, only programs for sound source processing are stored in the 5 CPU 20, and the 5 CPU 20 functions as a processing device exclusively for sound source processing.

240は5CPU20の演算用メモリとしてのRAM2
06へ入力するデータをMCPUIOからのデータ(M
CPUIOからゲート130.データバスD 0LII
 を通ったデータ)と5CPU20の生成(演X)した
データ(ALU部208または乗算器210からのデー
タバスDB上のデータ)とから選択するRAMデータイ
ン切り換え部である。RAMデータイン切り換え部24
0は信号Aによってその選択モードが制御され、信号A
が“5CPU20動作中”を表わしているときには5C
PU20で演算したデータを選択し、信号Aが“5CP
U20停止中”を表わしているときにはMCPUIOか
らのデータを選択する。
240 is RAM2 as a memory for calculation of 5CPU20
The data input to 06 is the data from MCPUIO (M
Gate 130. from CPUIO. Data bus D0LII
This is a RAM data-in switching unit that selects between data (data passed through the CPU 20) and data generated (operation RAM data-in switching section 24
0 has its selection mode controlled by signal A;
When indicates "5CPU20 in operation", 5C
Select the data calculated by PU20, and signal A is “5CP”.
When "U20 is stopped" is displayed, data from MCPUIO is selected.

また、RAMアドレス制御部205も、信号Aによって
そのモードが制御され、信号Aが“5CPU20動作中
”を表わしているときには制御用ROMのインストラク
ション出力ラッチ202aからのパスSA上の情報をR
AM206のアドレスとして選択し、信号Aが“5CP
U20停止中”を表わしているときにはMCPUIOか
らパスゲート128(信号Aにより開いている)を経て
パスMa上にあるMCPUIOからの情報をRAM20
6のアドレスとして選択する。同様に、ライト信号切り
換え部242も信号Aによってそのモードが制御され、
信号Aが“5CPU20動作中”を表わしているときに
は5CPU20のオペレージ、ン制御回路212からの
RAMリードライト信号を選択してRAM206のリー
ドライト入力R/Wに結合し、信号Aが“5CPU20
停止中”を表わしているときには5CPU20ではなく
MCFUIOのオペレーション制御回路112からのS
CPDRAMリードライト信号を選択してRAM206
のリードライト入力R/Wに結合する。
The mode of the RAM address control unit 205 is also controlled by the signal A, and when the signal A indicates "5 CPU 20 in operation", the RAM address control unit 205 inputs the information on the path SA from the instruction output latch 202a of the control ROM.
Selected as the address of AM206, and the signal A is “5CP”.
When "U20 is stopped" is displayed, information from the MCPUIO on the path Ma is transferred from the MCPUIO to the RAM 20 via the pass gate 128 (opened by signal A).
Select it as address 6. Similarly, the mode of the write signal switching section 242 is controlled by the signal A,
When the signal A indicates "5CPU20 in operation", the RAM read/write signal from the operation control circuit 212 of the 5CPU20 is selected and coupled to the read/write input R/W of the RAM 206, and the signal A indicates "5CPU20 in operation".
When “stopped” is displayed, S is sent from the operation control circuit 112 of the MCFUIO instead of the 5CPU 20.
Select CPDRAM read/write signal and write to RAM206
It is coupled to the read/write input R/W of.

以下1本実施例の諸特徴を更に詳細に説明する。Below, various features of this embodiment will be explained in more detail.

く複数CPU音源橡能(第1−第7図、第9〜第11図
)〉 第4図はMCPUIOのメインプログラム(バックグラ
ンドプログラム)によるMCPUIOの動作を示すフロ
ーチャート、第5図はタイマインタラプト信号INTに
よって起動されるMCPUloのインタラプト処理ルー
チンによるMCPUloの動作を示すフローチャート、
第6図はタイマインタラプト信号INTによって起動さ
れる5CPU20のプログラムによる5CPU20の動
作を示すフローチャート、第7図はMCPUIOと5C
PU20のそれぞれが実行する音源処理のフローチャー
トである。
Multiple CPU sound source functions (Figures 1 to 7, Figures 9 to 11) Figure 4 is a flowchart showing the operation of MCPUIO by the MCPUIO main program (background program), and Figure 5 is a timer interrupt signal. a flowchart showing the operation of MCPUlo by the interrupt processing routine of MCPUlo started by INT;
FIG. 6 is a flowchart showing the operation of the 5CPU 20 by the program of the 5CPU 20 activated by the timer interrupt signal INT, and FIG. 7 shows the MCPUIO and 5C
It is a flowchart of the sound source processing which each PU20 performs.

@1−第351Jに関して述べたように1本実施例の電
子楽器処理システムはMCPUIOと5CPU20とか
ら成る複数のCPUを備えており、両CPUが協働して
電子楽器のための処理を実行する。特にMCPUIOは
、第5図に示すようなインタラプト処理ルーチンにより
音源処理を行い、5CPU20は第6図に示すようなプ
ログラムにより音源処理を行う、更にMCPUIOは第
4図に示すメインプログラムにより、システム全体の制
御のための種々のタスクを実行する。
As mentioned in relation to @1-351J, the electronic musical instrument processing system of this embodiment is equipped with a plurality of CPUs consisting of an MCPUIO and 5 CPUs 20, and both CPUs cooperate to execute processing for the electronic musical instrument. . In particular, the MCPUIO processes the sound source using an interrupt processing routine as shown in Figure 5, the 5CPU 20 processes the sound source using a program as shown in Figure 6, and the MCPUIO processes the entire system using the main program shown in Figure 4. Perform various tasks for control.

第4図のメインプログラムのフローにおいて、4−1は
電源投入時にシステムを初期化する処理であり1MCP
Ul0はRAM106、RAM206のクリアや、リズ
ムテンポ等の初期値の設定等を行う、4−2でMCPU
IOは出力ポート120からキー走査のための信号を出
力し、鍵盤、機能スイッチ等の入力装置の状態を入力ポ
ートl18から取り込むことにより、機能キー、I!盤
キーの状態をRAM106のキーバッファエリアに記憶
する。4−3では4−2で得た機能キーの新しい状態と
前回の状態とから、状態の変化した機能キーを識別し、
指示される機能の実行を行う(例えば、楽音番号のセッ
ト、エンベロープ番号のセット、リズム番号のセット等
)、4−4では4−2で得た鍵盤の最新の状態と前回の
状態とから、変化した鍵(押鍵、離鍵)を識別する0次
の4−5で4−4の処理結果から、発音処理4−9のた
めのキーアサイン処理を行う、4−6では機能キーでデ
モ演奏キーが押鍵されたとき外部メモリ90から、デモ
演奏データ(シーケンサデータ)を順次読み出し、処理
することにより、発音処理4−9のためのキーアサイン
処理等を行う。
In the main program flow shown in Figure 4, 4-1 is the process to initialize the system when the power is turned on, and 1MCP
Ul0 clears RAM106 and RAM206, sets initial values such as rhythm tempo, etc. 4-2 is MCPU
IO outputs a signal for key scanning from the output port 120, and receives the status of input devices such as the keyboard and function switches from the input port 118, so that the function keys, I! The state of the keyboard keys is stored in the key buffer area of the RAM 106. In 4-3, the function key whose state has changed is identified from the new state of the function key obtained in 4-2 and the previous state,
Execute the instructed functions (for example, set musical tone numbers, set envelope numbers, set rhythm numbers, etc.).In 4-4, based on the latest and previous states of the keyboard obtained in 4-2, In 4-5, which identifies the changed key (key press, key release), perform key assignment processing for pronunciation processing 4-9 from the processing result in 4-4. In 4-6, demonstrate using function keys. When a performance key is pressed, demo performance data (sequencer data) is sequentially read out from the external memory 90 and processed, thereby performing key assignment processing for the sound generation processing 4-9.

4−7ではリズムスタートキーが押鍵されたとき外部メ
モリ90からリズムデータを順次読み出し、発音処理4
−9のためのキー7サイン処理を行う、フロー−周タイ
マ処理4−8では、メインフローで必要なイベントのタ
イミングを知るために、フロー−開時間(これは、フロ
ーを一周する間に実行されたタイマインタラプトの回数
を計数することで得られる。この計数処理は後述のイン
タラプトタイマ処理5−2で行われる。)を基に演算I
:行い、エンベロープ用タイマ(エンベロープの演算周
期)やリズム用の基準値を得る0発音処理4−9では4
−5.4−6.4−7でセットされたデータから、実際
に楽音を発音させるための各種演算を行い、結果をRA
M106.RAM206内の音源処理レジスタ(第11
図)にセットする。4−10は次のメインフローのパス
のための準備処理であり、今回のパスで得た押鍵状態へ
の変化を示すNEW  ON状態をON中にしたり、離
鍵状態への変化を示すNEW  OFF状態をOFF中
に変える等の処理を行う。
In step 4-7, when the rhythm start key is pressed, rhythm data is sequentially read out from the external memory 90, and sound generation processing 4 is performed.
In flow-period timer processing 4-8, which performs key 7 sign processing for -9, flow-open time (this is executed during one cycle of the flow) in order to know the timing of events required in the main flow. The calculation I
4 in 0 sound processing 4-9 to obtain the reference value for the envelope timer (envelope calculation cycle) and rhythm.
- From the data set in 5.4-6.4-7, perform various calculations to actually produce musical tones, and send the results to RA.
M106. Sound source processing register (11th
(Figure). 4-10 is a preparation process for the next main flow pass, in which the NEW ON state indicating a change to the key pressed state obtained in the current pass is set to ON, or the NEW indicating a change to the key released state is set to ON. Processing such as changing the OFF state to OFF is performed.

インタラプト発生部116からインタラプト信号INT
が発生すると、MCPUIOは実行中のメインプログラ
ムを中断し、第5v!Jに示すインタラプト処理ルーチ
ンを実行し、5CPU20は第6図に示すプログラムを
実行する。ここにMCPUIOは第5図のフローにおい
て楽音信号を生成し、5CPU20は第6図のフローに
おいて楽音信号を生成するようになっている。
Interrupt signal INT from interrupt generation section 116
occurs, the MCPUIO interrupts the main program being executed, and the 5th v! The interrupt processing routine shown in J is executed, and the 5 CPU 20 executes the program shown in FIG. Here, the MCPUIO generates a musical tone signal in the flow shown in FIG. 5, and the 5CPU 20 generates a musical tone signal in the flow shown in FIG.

詳細に述べるとMCPUIOは5−1で各チャンネルに
対する楽音波形データを生成し、累算し、記憶する。従
来はこの処理を音源回路ハードウェアで行っていた0次
のインタラプト処理タイマ処理5−2でMCPUIOは
インタラプトが一定時間ごとにかかることを利用して、
フロー−周計時用のタイマレジスタ(RAM106内)
e通過の都度、プラスlする。5−3でMCPUIOは
5CPU20の音源処理6−1が終了しているかどうか
を検査し、終了していれば、5−4に進んで、5CPU
20で生成されたRAM206上の楽音波形データをR
AM106内に読み込む。
Specifically, the MCPUIO generates, accumulates, and stores musical waveform data for each channel at 5-1. Conventionally, this process was performed by the sound source circuit hardware, but in the 0th order interrupt processing timer process 5-2, the MCPUIO takes advantage of the fact that interrupts take a certain period of time,
Flow - timer register for cycle timing (in RAM 106)
Each time e passes, add l. In 5-3, the MCPUIO checks whether the sound source processing 6-1 of the 5CPU20 has been completed, and if it has been completed, the process proceeds to 5-4 and the MCPUIO
The musical sound waveform data on the RAM 206 generated in
Read into AM106.

モして5−5でMCPUIOはMCPUIOの生成した
楽音波形データと5CPU20で生成した楽音波形デー
タをDAClooに出力する。
Then, in step 5-5, the MCPUIO outputs the musical tone waveform data generated by the MCPUIO and the musical tone waveform data generated by the CPU 20 to the DACloo.

音源処理5−1.6−1の詳細を第7図に示す、本例で
は、各CPU(MCPUIO1scpU20)はそれぞ
れ8チャンネル分の楽音波形データを生成可能であり、
システム全体として16チヤンネル分の楽音波形データ
を生成可能としている。7−1で波形加算用RAM領域
(RAMI06内、RAM206内)をクリアし、7−
2〜7−9で第1チヤンネルからW48チャンネルまで
の各チャンネル音源処理を順次実行する。各チャンネル
音源処理の最後で、チャンネルの楽音#形値が波形加算
用RAM領域のデータに加算される。
Details of the sound source processing 5-1.6-1 are shown in FIG. 7. In this example, each CPU (MCPUIO1scpU20) can generate musical waveform data for 8 channels,
As a whole, the system can generate musical waveform data for 16 channels. Clear the waveform addition RAM area (RAMI06, RAM206) in 7-1, and
In steps 2 to 7-9, sound source processing for each channel from the first channel to the W48 channel is sequentially executed. At the end of each channel sound source processing, the tone #-shaped value of the channel is added to the data in the waveform addition RAM area.

次にチャンネル音源処理の例について第9図〜第11図
を参照して説明する。この例では、波形読み出しくPC
M)方式の楽音合成を採用している(他の楽音合成方式
、例えばFM合成も実現可能であり、この発明は特定の
楽音合成方式には制限されない)、チャンネル音源処理
は大きくわけて、エンベロープ処理(9−1〜9−7)
と、エンベロープ付加を含む波形処理(9−8〜9−2
1)とから成る。各CPU (MCPUIO,5CPU
20)はチャンネル音源処理を実行する際に、そのチャ
ンネルに対する音源処理レジスタ群、即ち第11図に示
すように、エンベロープΔx用タイマー、目標エンベロ
ープ、エンベロープΔX、加減フラグ付エンベロープΔ
y、現在エンベロープ、アドレス加算値、ループアドレ
ス、エンドアドレス、スタートアドレス兼現在アドレス
を参照し、所望のレジスタを更新する。エンベロープは
振幅変調のために基本波形に付加すべきもので、全体と
していくつかのセグメント(ステップ)から成っている
。エンベロープΔχ用タイマーと目標エンベロープとエ
ンベロープΔXと加減フラグ付エンベロープΔyは現在
進行中のエンベロープセグメントを定義するエンベロー
プパラメータであり、このエンベロープパラメータは、
MCPUIOのメインプログラム(第4図)の発音%F
i4−9内において、エンベロープ値がセグメントの目
標値に到達の都度、更新される情報であり、インタラプ
ト処理ルーチン(第5図、第6図)ではこれらのエンベ
ロープパラメータはエンヘロープΔχ用タイマーを除い
て単に参照されるだけである。エンベロープΔXはエン
ベロープの演算周期を表わし、目標エンベロープは現セ
グメントにおけるエンベロープの目標値を表わし、加減
フラグ付エンベロープΔyは演算周期ごとのエンベロー
プの変化分を表わし、現在エンベロープは現在のエンベ
ロープ値を表わす、アドレス加算値、ループアドレス、
エンドアドレス及びスタートアドレス兼現在アドレスは
外部メモリ90に置かれる基本波形に対するアドレス情
報であり、スタートアドレスは基本波形メモリ(外部メ
モリ90内)のスタートアドレス、ループアドレスは基
本波形を繰り返し読み出す場合の戻り先のアドレス(3
10図ではスタートアドレスと同一’) 、エンドアド
レスは基本波形のエンドアドレスを表わし、現在アドレ
スは基本波形の現在の位相な表わすアドレスであり、そ
の整数部が、基本波形メモリに現実に存在する記憶場所
を表わし、その小数部が、この記憶場所からのずれを表
わし、アドレス加算値はタイマインタラプト処理ルーチ
ンノ時間間隔ごとに現在アドレスに加算されるべき値で
あり、生成する楽音のピッチに正比例する。
Next, an example of channel sound source processing will be described with reference to FIGS. 9 to 11. In this example, the PC to read out the waveform
M) method of musical sound synthesis is adopted (other musical sound synthesis methods, such as FM synthesis, are also possible, and this invention is not limited to a specific musical sound synthesis method). Channel sound source processing can be broadly divided into envelope and Processing (9-1 to 9-7)
and waveform processing including envelope addition (9-8 to 9-2
1). Each CPU (MCPUIO, 5CPU
20) is a group of sound source processing registers for the channel when executing channel sound source processing, that is, as shown in FIG.
y, current envelope, address addition value, loop address, end address, start address and current address, and update the desired register. The envelope should be added to the basic waveform for amplitude modulation, and consists of several segments (steps) as a whole. The timer for the envelope Δχ, the target envelope, the envelope ΔX, and the envelope with addition/subtraction flag Δy are envelope parameters that define the envelope segment currently in progress, and these envelope parameters are:
MCPUIO main program (Figure 4) pronunciation %F
In i4-9, this is information that is updated each time the envelope value reaches the target value of the segment, and in the interrupt processing routine (Figures 5 and 6), these envelope parameters are used except for the timer for envelope Δχ. It is simply referenced. The envelope ΔX represents the calculation cycle of the envelope, the target envelope represents the target value of the envelope in the current segment, the envelope Δy with addition/subtraction flag represents the change in the envelope for each calculation cycle, and the current envelope represents the current envelope value. Address addition value, loop address,
The end address and start address/current address are address information for the basic waveform stored in the external memory 90, the start address is the start address of the basic waveform memory (in the external memory 90), and the loop address is the return address when repeatedly reading the basic waveform. Destination address (3
In Figure 10, the end address represents the end address of the basic waveform, the current address is the address that represents the current phase of the basic waveform, and the integer part is the memory that actually exists in the basic waveform memory. The address add value is the value to be added to the current address at each time interval of the timer interrupt handling routine, and is directly proportional to the pitch of the tone being generated.

詳細に述べると、9−1でエンベロープの演算周期ΔX
と比較するためのタイマレジスタをインタラプトごtに
インクリメントし、9−2でΔXと一致したと59−3
でエンベロープ変位分のデータΔyの加減算フラグ(符
号ビット)をテストしてエンベロープが上昇中か下鋒中
かを判別し。
To explain in detail, in 9-1, the envelope calculation period ΔX
Increment the timer register for comparison with
The addition/subtraction flag (sign bit) of the envelope displacement data Δy is tested to determine whether the envelope is rising or falling.

9−4.9−5でそれぞれ現在エンベロープの減算また
は加算を行う、9−6で現在エンベロープが目標エンベ
ロープ値に達したがどうかをチエツクし、達しておれば
、現在エンベロープに目標レベルをセットする。これに
よりメインプログラムの発音処理4−9で次のエンベロ
ープステップのデータがセットされることになる。また
発音処理4−9でゼロの現在エンベロープを読んだとき
には発音の終了として処理される。
9-4. In 9-5, the current envelope is subtracted or added, respectively. In 9-6, it is checked whether the current envelope has reached the target envelope value, and if it has, the target level is set in the current envelope. . This causes the next envelope step data to be set in the main program's sound generation process 4-9. Furthermore, when the current envelope of zero is read in the sound generation process 4-9, it is processed as the end of sound generation.

次に、波形処理9−8〜9−21について述べる。波形
処理では、現在アドレスの整数部を使って基本波形メモ
リから隣り合う2つアドレスの波形データを読み出し、
(整数部十小数部)で示される現在アドレスに対して想
足される波形値を補間で求めている。補間が必要な理由
は1.タイマインタラプトによる波形サンプリング周期
が一定であり、アドレスの加算値(ピッチデータ)が楽
器への応用上、ある音域にわたるためである(音階音し
か出力しない楽器で音階音ごとに波形データを用意すれ
ば補簡の必要はないが許容できない記憶容量の増大とな
る)、補間による音色の劣化、歪みは高音域の方が著し
いため、原音の記録サンプリング周期より高速の周期で
原音を再生するのが好ましい、この実施例では原音(4
,−4)再生の周期を2倍にしている(第10図)、シ
たがって、アドレス加算値がL5のとき、A4の音が得
られるようになっている。この場合、A#4ではアドレ
ス加算値は(1,529と、なり、A3のとき、1とな
る。これらのアドレス加算値はピッチデータとして制御
データ兼波形外部メモリ90内に記憶されており、押鍵
時には発音処理4−9において、鍵に対応するピッチデ
ータと選択されている音色の波形スタートアドレス、波
形エンドアドレス及び波形ループアドレスがRAM10
6またはRAM206の対応するレジスタ、すなわち、
アドレス加算値レジスタ、スタートアドレス兼現在アド
レスレジスタ、エンドアドレスレジスタ、ループアドレ
スレジスタにセットされる。
Next, waveform processing 9-8 to 9-21 will be described. In waveform processing, the integer part of the current address is used to read the waveform data of two adjacent addresses from the basic waveform memory.
The waveform value to be added to the current address indicated by (integer part ten decimal part) is obtained by interpolation. The reason why interpolation is necessary is 1. This is because the waveform sampling period due to the timer interrupt is constant, and the added value of the address (pitch data) covers a certain range in application to musical instruments. It is preferable to play back the original sound at a faster cycle than the recording sampling cycle of the original sound, since the deterioration of tone and distortion due to interpolation are more pronounced in the high range (although there is no need for supplementation, it would result in an unacceptable increase in storage capacity). , in this example, the original sound (4
, -4) The playback period is doubled (FIG. 10). Therefore, when the address addition value is L5, an A4 sound is obtained. In this case, the address addition value is (1,529) for A#4, and 1 for A3.These address addition values are stored as pitch data in the control data/waveform external memory 90, When a key is pressed, the pitch data corresponding to the key, the waveform start address, waveform end address, and waveform loop address of the selected tone are stored in the RAM 10 in the sound generation process 4-9.
6 or the corresponding register of RAM 206, i.e.
Set in the address addition value register, start address/current address register, end address register, and loop address register.

・参考までに、第1θ図に時間に対する補間波形データ
を示す0図中、白丸は基本波形メモリの記憶場所にある
波形データ値、×印は補間値を含む出力サンプルを示し
ている。
-For reference, in Figure 1 θ which shows interpolated waveform data with respect to time, white circles indicate waveform data values stored in the storage location of the basic waveform memory, and x marks indicate output samples including interpolated values.

補間の方式はいろいろあるが、ここでは直線補間を採用
している。詳細に述べると、まず、9−8で現在アドレ
スにアドレス加算値慶加算して新しい現在アドレスを得
る。9−9−で現在アドレスとエンドアドレスを比較し
、現在アドレス〉エンドアドレスならば、9−10.9
−11により、現在アドレスくエンドアドレスのときは
9〜12により、物理上(番地上)または論理上(動作
上)の次のアドレスを計算し、9−14でその整数部に
より基本波形メモリをアクセスして次回波形データを得
る。ループアドレスは動作上エンドアドレスの次のアド
レスである。すなわち、第10図の場合、図示の波形は
繰り返し読み出される。したがって、現在アドレス=エ
ンドアドレスのときは次のアドレスとしてループアドレ
スの波形データを読み出す(9−13)、9−15.9
−16により、現在アドレスの整数部で基本波形をアク
セスして今回の波形データを読み出す0次に、9−17
で次回波形値から今回波形値を減算し、9−18でその
差に現在アドレスの小数部を乗算し、その結果を9−1
9で今回の波形値に加えることにより、波形の直線補間
値を求める。この直線補間したデータに現在エンベロー
プ値を乗算してチャンネルの楽音データ値を得(9−2
0)、それを波形加算用レジスタの内容に加えて楽音デ
ータを累算する(9−21)、このレジスタに累算され
たデジタル楽音データがタイマインタラプト処理ルーチ
ン(s、 5図)の5−5でDAC100に送出される
。これに関連し、第1図ではDAClooはステレオ出
力を得るべく右DAC100Rと左DAC100Lから
成っている。
There are various interpolation methods, but here we use linear interpolation. In detail, first, in step 9-8, the address addition value is added to the current address to obtain a new current address. Compare the current address and end address at 9-9-, and if current address > end address, 9-10.9
-11, if the current address is the end address, calculate the next physical (address) or logical (operational) address using 9-12, and use the integer part to store the basic waveform memory in 9-14. Access to get the next waveform data. The loop address is operationally the next address after the end address. That is, in the case of FIG. 10, the illustrated waveform is repeatedly read out. Therefore, when the current address = end address, the waveform data of the loop address is read as the next address (9-13), 9-15.9
-16 accesses the basic waveform with the integer part of the current address and reads the current waveform data.9-17
Subtract the current waveform value from the next waveform value with 9-18, multiply the difference by the decimal part of the current address, and use the result with 9-1
In step 9, the linearly interpolated value of the waveform is obtained by adding it to the current waveform value. This linearly interpolated data is multiplied by the current envelope value to obtain the musical tone data value of the channel (9-2
0), and adds it to the contents of the waveform addition register to accumulate musical tone data (9-21).The digital musical tone data accumulated in this register is added to the contents of the waveform addition register (9-21). 5 and sent to the DAC 100. In this regard, in FIG. 1, DACloo consists of a right DAC 100R and a left DAC 100L to obtain a stereo output.

この場合、MCPUIO,5CPU20の処理する音源
チャンネルの夫々を左右のDACのいずれに割り当てる
かを決めるようにするとよい、具体的には、各チャンネ
ル用の音源データとして内部RAM10B、206上に
、選択DAC指示データをもたせ、また、2つの波形加
算用領域、即ち、左DAC用波形加算用領域と左DAC
用波形加算用領域を設ける。また、7−1に対応するス
テップで左右のDAC用の各波形加算用領域をクリアし
、9−20の処理の後、処理チャンネルに割り当ててい
るDACを選択DAC指示データから判別し、対応する
波形加算用領域に処理チャンネルの楽音波形データを加
算する。そして、MCPUIOのインタラプト処理ルー
チン(第5図)のステ、プ5−4に対応するステップで
、5CPU20の生成した左DAC用楽音波形データと
右DAC用楽音波形データとをそれぞれMCPUIoで
生成した左DAC用楽音波形データと右DAC用楽音波
形データに加算し、加算結果である左DAC用と右DA
C用の楽音波形データを5−5に相当するステップで、
それぞれ左DAC100Lと右DAC100Rに送出す
る。
In this case, it is preferable to decide which of the left and right DACs to assign each of the sound source channels processed by the MCPUIO and 5 CPUs 20. Specifically, the sound source data for each channel is stored on the internal RAM 10B, 206, and the selected DAC It also has two waveform addition areas, namely a waveform addition area for the left DAC and a waveform addition area for the left DAC.
Provide an area for waveform addition. In addition, in the step corresponding to 7-1, each waveform addition area for the left and right DACs is cleared, and after the processing in 9-20, the DAC assigned to the processing channel is determined from the selected DAC instruction data, and the corresponding Add the musical waveform data of the processing channel to the waveform addition area. Then, in the step corresponding to step 5-4 of the interrupt processing routine of the MCPUIO (FIG. 5), the musical waveform data for the left DAC and the musical waveform data for the right DAC generated by the 5CPU 20 are converted into the musical waveform data for the left DAC generated by the MCPUIO. Add the musical waveform data for the DAC and the musical waveform data for the right DAC, and add the addition results to the left DAC and right DA.
C musical tone waveform data in steps corresponding to 5-5,
The signals are sent to the left DAC 100L and right DAC 100R, respectively.

このように1本実施例の電子楽器用処理装置はMCPU
IOと5CPU20という複数のCPUを有し、各CP
Uにおいて、内蔵されるプログラムに従って音源処理を
実行することができる。なお実施例では1つの5CPU
を使用しているが、音源処理を行う複数の5CPUを設
けるようにしてもよい。
In this way, the electronic musical instrument processing device of this embodiment is an MCPU.
It has multiple CPUs, IO and 5CPU20, and each CPU
In U, sound source processing can be executed according to a built-in program. In the example, one 5 CPU
However, a plurality of 5 CPUs may be provided to perform sound source processing.

<5CPU動作開始・終了機能(第12〜第15図、第
2〜第6図、第8図)〉 本実施例によればMCPUIOは5CPU20の動作期
間を管理、把握する機能を有している。
<5CPU operation start/end function (Figures 12 to 15, Figures 2 to 6, and Figure 8)> According to this embodiment, the MCPUIO has a function to manage and understand the operation period of the 5CPUs 20. .

この目的のため、 (イ)MCPUIOはタイマ・インタラプト発生部11
6からインタラプト信号が発生したと5に、これを合図
として5CPU20の動作を開始させ、MCPUIOの
オペレーション制御回路112が参照する5CPU状態
フラグを“5CPU動作中”にセットする。
For this purpose, (a) MCPUIO is the timer interrupt generator 11.
When an interrupt signal is generated from 6, 5 uses this as a signal to start the operation of 5CPU 20, and sets the 5CPU status flag referred to by the operation control circuit 112 of MCPUIO to "5CPU in operation".

(ロ)SCPU20は動作(音源処理)を完了したとき
に、これに応答して停止状態に移行し、MCPUIOに
動作完了信号を送り、MCPUloのオペレーション制
御回路112が参照する5CPU状態フラグを“5CP
U停止中”にセットする。
(b) When the SCPU 20 completes the operation (sound source processing), it responds to the stop state, sends an operation completion signal to the MCPUIO, and sets the 5CPU status flag referenced by the operation control circuit 112 of the MCPUlo to "5CP".
Set to "U Stopping".

第2図〜第6図を参照すると、MCPUIOはメインプ
ログラム(第4図)の実行中に、インタラプト発生部1
16(第2図)からインタラプト信号を受けると、RO
Mアドレス制御部114を介してメインプログラムを中
断し、楽音生成のために第5図に示すタイマインタラプ
ト処理ルーチンを実行する。更に、MCPUIOはイン
タラプト信号に対し、5CPUリセット制御部134を
介して5CPU20に5CPU動作開始信号Aを送り、
これを受けて5CPU20はROMアドレス制御部21
4を介して第6図に示す楽音生成のためのプログラムを
実行する(なお信号Aにより、バスゲート128、RA
Mアドレス制御部204、RAMデータイン切り換え部
240、ライト信号切り換え部242も、5CPU20
自身の動作のためにセットされる)。このプログラムの
終了に伴い、5CPU20はオペレーション制御回路2
12から動作完了信号Bを発生する。この信号Bは5C
PUリセット制御部134に送られ、これを受けて5C
PUリセット制御部134は5CPU20の動作を停止
するために信号AとBを反転する0反転された信号Aを
受けて5CPU20のROMアドレス制御部214のア
ドレス更新動作が停止し、5CPU20は停止する。ま
た信号Bは“5CPU停止中”を示す信号としてMCP
UIOのオペレーション制御回路112に与えられる。
Referring to FIGS. 2 to 6, the MCPUIO interrupts the interrupt generation section 1 during execution of the main program (FIG. 4).
When an interrupt signal is received from 16 (Fig. 2), RO
The main program is interrupted via the M address control unit 114, and a timer interrupt processing routine shown in FIG. 5 is executed to generate musical tones. Furthermore, in response to the interrupt signal, the MCPUIO sends a 5CPU operation start signal A to the 5CPU 20 via the 5CPU reset control unit 134,
In response to this, the 5CPU 20 controls the ROM address control unit 21.
4 to execute the program for musical tone generation shown in FIG.
The M address control section 204, the RAM data-in switching section 240, and the write signal switching section 242 also have 5 CPUs 20.
(set for its own behavior). Upon completion of this program, the 5CPU 20 operates the operation control circuit 2.
12 generates an operation completion signal B. This signal B is 5C
It is sent to the PU reset control unit 134, and in response, the 5C
The PU reset control unit 134 inverts the signals A and B to stop the operation of the 5 CPU 20. Upon receiving the inverted signal A, the address updating operation of the ROM address control unit 214 of the 5 CPU 20 is stopped, and the 5 CPU 20 is stopped. In addition, signal B is used as a signal indicating "5 CPU is stopped" by the MCP.
The signal is applied to the operation control circuit 112 of the UIO.

MCPUloのインタラプト処理ルーチン(第5図)の
5−3に示す5cpuB態検査命令を実行する際、MC
PUIOのオペレージコン制御回路112は5CPU状
態フラグBを読む、フラグBが“5CPU停止中”を示
し、したがって、5CPU20での音源処理(第6図)
が完了しているときにMCPUIOは5−4に進んで5
CPU20の生成した楽音波形データを読み込む、MC
PUIOは第5図のインクラット処理ルーチン終了時に
オペレーション制御回路112からROMアドレス制御
部114にメインプログラムへの復帰コマンド信号を与
えて、中断していたメインプログラムに制御を戻す。
When executing the 5cpuB state check command shown in 5-3 of the MCPUlo interrupt processing routine (Figure 5), the MCPUlo
The PUIO operating controller control circuit 112 reads the 5CPU status flag B, and the flag B indicates "5CPU is stopped", so the sound source processing by the 5CPU 20 is performed (Fig. 6).
is completed, MCPUIO advances to 5-4 and 5
MC reads the musical waveform data generated by the CPU 20
PUIO gives a command signal for returning to the main program from the operation control circuit 112 to the ROM address control section 114 at the end of the increment processing routine shown in FIG. 5, thereby returning control to the interrupted main program.

第8図に、時間の流れに沿う本実施例の動作の流れを示
す、A−Fはメインプログラムの断片である。5A〜5
Fは第5図のMCPUインタラプト処理ルーチンを表わ
し、6A〜6Fは第6図の5CPUインタラプト処理ル
ーチンを表わす6図示のように、インタラプト信号IN
Tが発生すると、MCPUIOは実行中のプログラムを
中断し、インタラプト処理が各CPUl0120におい
て開始し、音源の並行処理が実行される。
FIG. 8 shows the flow of the operation of this embodiment along the flow of time, and A to F are fragments of the main program. 5A~5
F represents the MCPU interrupt processing routine in FIG. 5, and 6A to 6F represent the 5CPU interrupt processing routine in FIG. 6. As shown in FIG.
When T occurs, MCPUIO interrupts the program being executed, interrupt processing is started in each CPU10120, and parallel processing of sound sources is executed.

第12図に上述した5CPUの動作開始・終了機能を実
現する構成を詳細に示し、第13図〜第15図にその動
作のタイムチャートを示す、第13図のタイムチャート
において、CKI、CK2はMCPUloと5CPU2
0におけるりo +7り発生回路136,236に入力
される2相のマスタークロックであり、このマスターク
ロックCK1、CK2かもクロック発生回路136はM
CPUIO動作のための基本タイミングを与える3相の
クロックT1.T2、T3を生成する。この3相クロツ
クの繰り返し周期がマシンサイクル(最短の命令実行時
間)を定める。クロックTlCK1、T2CK2、T3
CK3はそれぞれ、TIとCK1.T2とCK2、T3
とCK3の論理積信号である。オペレーションラッチ信
号はMCPUloの制御用ROM102のインストラク
ション出力ラッチ102aにROM102からのインス
トラクションをラッチさせるための信号である。
FIG. 12 shows in detail the configuration that realizes the operation start and end functions of the 5 CPUs mentioned above, and FIGS. 13 to 15 show time charts of the operations. In the time chart of FIG. 13, CKI and CK2 are MCPUlo and 5CPU2
This is a two-phase master clock that is input to the RI o +7 ri generation circuits 136 and 236 at 0, and this master clock CK1 and CK2 may also be input to the clock generation circuit 136.
A three-phase clock T1. provides basic timing for CPUIO operations. Generate T2 and T3. The repetition period of this three-phase clock determines the machine cycle (shortest instruction execution time). Clocks TlCK1, T2CK2, T3
CK3 is TI and CK1. T2, CK2, T3
and CK3. The operation latch signal is a signal for causing the instruction output latch 102a of the control ROM 102 of MCPUlo to latch an instruction from the ROM 102.

第13図には図示しないが、5CPU20のクロック回
路236も同様のクロック信号を生成する(第3図、第
25図参照)、なお、MCPUIOと5CPU20に共
通のクロック発生回路を使用してもよい。
Although not shown in FIG. 13, the clock circuit 236 of the 5 CPU 20 also generates a similar clock signal (see FIGS. 3 and 25). Note that a common clock generation circuit may be used for the MCPUIO and the 5 CPU 20. .

第12図において、点線16の右側は5CPU20であ
り左側はMCPUIOである。左側の要素のうち、ラッ
チL1.ラッチL2、ゲート1142〜1154はMC
PUIO(第2(iU)ノR0Mアドレス制御部114
に含まれる回路要素である。ラッチLlにはMCPUI
Oの実行すべき次の命令のROM1027ドレス情報A
N (ROM102からの現命令に含まれる情報)がク
ロックTICKIでラッチされる。メインプログラム(
第4図)の実行中、ラッチLlの出方は次アドレスBN
としてMCPUIOのROMアドレスデコーダ104に
入力される。即ち、ラッチLlの出力はインバータ11
44.3状態インバータゲート1146(イネーブルさ
れている)を通ってROMアドレスデコーダ104への
アドレス入力BNとなる。ここでインタラプト発生部1
16からインタラプト信号INTが発生すると、この信
号INTを受けるORゲート1154かも、インバータ
1148を介してラッチLlの出力側にある3状態イン
バータゲー)1146をオフ(ハイインピーダンス)に
する信号が加えられ、代りに、ORゲー)1154かも
の信号により、割込人ロ/戻先アドレス選択ゲー)11
50の出力側にある3状態インバータゲー)1152が
ゲート1150の出力をROMアドレスデコーダ104
のアドレス入力BNに通す0割込λロ/戻先アドレス選
択ゲート1150はインタラプト信号INTとラッチL
2からの出力信号を受けるNORゲート群で構成され、
“H”のインタラプト信号■NT発生時に、インタラプ
ト処理ルーチン(第5図)の入p(二ントリポイント)
を表わすオール“θ″の信号を出力し、この信号は3状
態インバータゲー)1152で反転されて、オール″1
″の信号BNとしてMCPUのROMアドレスデコーダ
104に入力される。そして次のオペレージ1ンラツチ
信号により、制御用ROM102からインストラクシ、
ン出力ラッチ102aにインタラプト処理ルーチンの最
初の命令がフェッチされる0以上により、MCPUIO
の一御がインタラブト処理ルーチンに移る。
In FIG. 12, the right side of the dotted line 16 is the 5 CPU 20, and the left side is the MCPUIO. Among the elements on the left, latch L1. Latch L2, gates 1142-1154 are MC
PUIO (second (iU) R0M address control unit 114
It is a circuit element included in. MCPUI for latch Ll
ROM1027 address information A of the next instruction to be executed by O
N (information contained in the current instruction from ROM 102) is latched with clock TICKI. Main program (
During the execution of Figure 4), the output of latch Ll is the next address BN.
The address is input to the ROM address decoder 104 of the MCPUIO. That is, the output of latch Ll is output from inverter 11.
The address input BN to the ROM address decoder 104 is passed through the 44.3-state inverter gate 1146 (enabled). Here, interrupt generation part 1
When an interrupt signal INT is generated from 16, an OR gate 1154 receiving this signal INT also applies a signal to turn off (high impedance) the 3-state inverter (3-state inverter) 1146 on the output side of latch Ll via inverter 1148. Instead, by the OR game) 1154 signal, the interrupter / return destination address selection game) 11
A three-state inverter (gate) 1152 on the output side of gate 1150 converts the output of gate 1150 to ROM address decoder 104.
The 0 interrupt λ low/return address selection gate 1150 that passes through the address input BN of the interrupt signal INT and the latch L
It consists of a group of NOR gates that receive output signals from 2,
“H” interrupt signal ■When NT occurs, interrupt processing routine (Figure 5) is input p (second entry point)
This signal is inverted by a 3-state inverter (1152) and outputs an all "θ" signal representing
'' is input to the ROM address decoder 104 of the MCPU as the signal BN.Then, the next operation 1 latch signal causes the instruction,
The first instruction of the interrupt processing routine is fetched into the output latch 102a.
Control then moves to the interact processing routine.

更に、インタラプト発生部116からのインタラプト信
号INTはクロック72CK2のタイミングでANDゲ
ー)1142を通り、ラッチ信号としてラッチL2を動
作させる。これにより、ラッチL2はパスAN上にある
メインプログラムの次命令のアドレスをチッチ(退避)
してメインプログラムを中断させる。
Further, the interrupt signal INT from the interrupt generating section 116 passes through the AND gate (1142) at the timing of the clock 72CK2, and operates the latch L2 as a latch signal. As a result, latch L2 saves the address of the next instruction of the main program on path AN.
to interrupt the main program.

更にインタラプト発生部1】6からのインタラプト信号
INTは5CPUリセット制御部134に供給される。
Furthermore, the interrupt signal INT from the interrupt generating section 1]6 is supplied to the 5 CPU reset control section 134.

5CPUリセット制御部134は図示のように結合され
たDフリー7プフロツプ1342、NANDゲート13
44、R−Sフリップフロップ1346から成る。メイ
ンプログラムの実行中、R−Sフリップフロップ134
6はリセット状態にある(Q=“L”)、なお1図示し
ないカR−Sフリップフロッ7’1346はシステムの
パワーオン時にリセット状態に初期化される。
The 5 CPU reset control section 134 includes a D-free 7-flop 1342 and a NAND gate 13 connected as shown in the figure.
44, R-S flip-flop 1346. During execution of the main program, the R-S flip-flop 134
6 is in a reset state (Q="L"), and an R-S flip-flop 7'1346 (not shown) is initialized to a reset state when the system is powered on.

インタラプト信号INTは、クロック72CK1のタイ
ミングでDフリップフロップ1342に取り込まれ、次
のクロックTICKIのタイミングでNANDゲー) 
1344から反転されて出力され、R−Sフリップフロ
ップ1346をセットする。この結果、R−5:yリッ
プフロップ1346のQ出力、即ち信号Aが“H”から
“L”に切り挨え、Q出力、即ち5CPU状態フラグが
“L” (SCPU停止中を示す)から“H″ (SC
PU動作中を示す)に変化する。信号Aは、5CPU2
0における次命令のアドレスSANをラッチするための
ラッチL3にリセー7ト解除信号(ラッチL3のイネー
ブル信号)として入力される。この結果、ラッチL3は
次のクロックTlCK1のタイミングでパスSANに乗
っている5CPUプログラム(第6図)の最初の命令の
アドレスをSBNとして5CPU20のROMアドレス
デコーダ204に入力する。このようにして、インタラ
プト発生部116からのインタラプト信号INTに応答
して5CPU20の動作が開始し、第6図に示す音源処
理が実行される。
The interrupt signal INT is taken into the D flip-flop 1342 at the timing of the clock 72CK1, and the NAND gate is input at the timing of the next clock TICKI.
It is inverted and output from 1344 and sets an R-S flip-flop 1346. As a result, the Q output of the R-5:y flip-flop 1346, that is, the signal A, changes from "H" to "L", and the Q output, that is, the 5 CPU status flag changes from "L" (indicating that the SCPU is stopped). “H” (SC
(indicates that the PU is in operation). Signal A is 5CPU2
This signal is input to latch L3 for latching the address SAN of the next instruction at 0 as a reset release signal (latch L3 enable signal). As a result, the latch L3 inputs the address of the first instruction of the 5 CPU program (FIG. 6) on the path SAN to the ROM address decoder 204 of the 5 CPU 20 as SBN at the timing of the next clock TlCK1. In this way, the operation of the 5 CPU 20 is started in response to the interrupt signal INT from the interrupt generating section 116, and the sound source processing shown in FIG. 6 is executed.

5CPU20が音源処理の1&後の命令を実行する際、
5CPU20のオペレーション制御回路l12の内部で
動作終了信号(復帰コマンド信号)SRTが発生する。
5 When the CPU 20 executes the instructions after 1& of sound source processing,
An operation end signal (return command signal) SRT is generated inside the operation control circuit l12 of the 5CPU 20.

この信号SRTはDフリップフロ7プ2122にクロッ
クT2CK1のタイミングで取り込まれた後、次のTI
CKIのタイミング(次のダミー命令のラッチタイミン
グ)で動作、するNANDゲート2124で反転サレ、
〇−パルスの動作終了信号Bとして5CPUリセット制
御部134のR−Sフリップフロップ1346をリセッ
トする。この結果、R−Sフリップフロップ1346の
Q出力、即ち、信号Aは“L″から“H”に切り換り、
Q出力、即ち、5CPU状態フラグは5CPU動作中を
示す“H”から5cPU20停止中を示す“L”に切り
換る。“H”レベルの信号A(リセット信号)により、
ラッチL3の動作は禁止され、ラッチL3出力、つまり
、アドレスデコーダ204の入力はダミー命令の(No
r命令)のアドレスに固定される。このときラッチL3
の入力パスSANには5CPU音源処理プログラム(第
6図)の最初の命令のアドレス情報(NoP命令語に含
まれる)が乗っている。
This signal SRT is taken into the D flip-flop 2122 at the timing of clock T2CK1, and then the next TI
The NAND gate 2124, which operates at the CKI timing (latch timing of the next dummy instruction), inverts the
The R-S flip-flop 1346 of the 5 CPU reset control unit 134 is reset as the operation end signal B of the 〇-pulse. As a result, the Q output of the R-S flip-flop 1346, that is, the signal A switches from "L" to "H".
The Q output, that is, the 5CPU status flag switches from "H" indicating that the 5CPU is operating to "L" indicating that the 5cPU 20 is stopped. By “H” level signal A (reset signal),
The operation of latch L3 is prohibited, and the output of latch L3, that is, the input of address decoder 204 is
r instruction) address. At this time, latch L3
Address information (included in the NoP instruction word) of the first instruction of the 5-CPU sound source processing program (FIG. 6) is placed on the input path SAN.

MCPUIOはインタラプト処理ルーチン(第5図)の
5CPU状態検査命令5−3の実行特にオペレーション
制御回路112を介して5CPU状態フラグのレベルを
検査し、5CPUの停止中、即ち5CPU20の音源処
理の完了を確認してから、5CPU20の処理結果であ
る楽音波形データをRAM206からRAM106に読
み取る(5−4)、これによりMCPUIOは5CPU
20の正しい処理結果を効率よく得ることができる。
The MCPUIO executes the 5CPU status check instruction 5-3 of the interrupt processing routine (FIG. 5), and in particular checks the level of the 5CPU status flag via the operation control circuit 112 to determine whether the 5CPU is stopped, that is, the sound source processing of the 5CPU 20 is completed. After checking, the musical sound waveform data that is the processing result of the 5 CPU 20 is read from the RAM 206 to the RAM 106 (5-4), so that the MCPUIO
20 correct processing results can be efficiently obtained.

MCPUIOはインタラプト処理ルーチンの最後の命令
の実行時に、オペレーション制御回路l12から復帰コ
マンド信号RTのパルスを発生する。この信号パルスR
TはORゲート1654、イン/ヘータ1148を通っ
て、ラッチLlの出力側のアドレス情報)1146を一
時的にオフし、代りに、ラッチL2に結合する割込入ロ
/戻先アドレス選択ゲー)1150の出力側にあるアド
レスゲ−)1152を一時的に開く、この時点で、割込
入ロ/戻先アドレス選択ゲー)1150はラッチL2に
退避してあった中断されたメインプログラムの命令のア
ドレスを反転して通すインバータとして働き、このゲー
)1150の反転出力が信号パルスRTによりインバー
タとして働く3状態ゲー)1152において再度反転さ
れる。この結果、MCPUIOのROMアドレスデコー
ダ104には中断されていたメインプログラムの命令の
アドレスが入力され、次のオペレーションラッチ信号に
より、制御用ROM102からインストラクション出力
ラッチ102aを介してその命令が取り出される。この
ようにして、MCPUIOの制御はメインプログラムに
復帰する。
MCPUIO generates a pulse of the return command signal RT from the operation control circuit 112 when executing the last instruction of the interrupt processing routine. This signal pulse R
T passes through OR gate 1654 and input/hater 1148, and temporarily turns off address information (1146) on the output side of latch Ll, and instead connects to latch L2 (interrupt/return destination address selection gate). Address gate 1152 on the output side of 1150 is temporarily opened. At this point, interrupt/return destination address selection gate 1150 is used to store the instruction of the interrupted main program saved in latch L2. The inverted output of this gate 1150 is inverted again by a signal pulse RT in a three-state gate 1152 which serves as an inverter. As a result, the address of the instruction of the interrupted main program is input to the ROM address decoder 104 of the MCPUIO, and the instruction is taken out from the control ROM 102 via the instruction output latch 102a in response to the next operation latch signal. In this way, control of MCPUIO returns to the main program.

以上のように、本実施例の電子楽器処理装置は、MCP
UlOによる5CPU20の動作期間の管理を5CPU
リセット制御部134のような簡単な管理インターフェ
ース構成を設けることで効率よく、確実に行うことがで
きる。
As described above, the electronic musical instrument processing device of this embodiment has the MCP
Management of the operating period of 5 CPUs 20 by UlO is performed by 5 CPUs.
By providing a simple management interface configuration such as the reset control unit 134, this can be done efficiently and reliably.

く複数データ転送〉 CPUを用いたある種のアプリケーションでは、CPU
はメインプログラム(第1のプログラム)の実行におい
て複数のデータを更新し、インタラプト処理ルーチン(
第2のプログラム)の実行において、その処理の目的の
ためにこれら複数のデータを参照する。これはメインプ
ログラムからインタラプト処理ルーチンへデータを渡す
問題である。このような複数のデータは、インタラプト
処理ルーチンによってメインプログラムが中断される前
に、メインプログラムにおいて全てのデータを更新しな
ければならない、メインプログラムが複数のデータの一
部だけを更新した時点で中断されてインタラプト処理ル
ーチンにCPUの制御が移ってしまうとインタラプト処
理ルーチンの処理結果は誤ったものになる。
Multiple data transfer> In certain applications that use the CPU,
updates multiple data during execution of the main program (first program), and updates the interrupt processing routine (
When the second program) is executed, these multiple pieces of data are referenced for the purpose of processing. This is the problem of passing data from the main program to the interrupt handling routine. Such multiple data must be updated in the main program before the main program is interrupted by the interrupt processing routine, or interrupted when the main program has updated only part of the multiple data. If the CPU control is transferred to the interrupt processing routine, the processing result of the interrupt processing routine will be incorrect.

本実施例の電子楽器処理装置の場合も、MCPUIOの
メインプログラム(第4図)からMCPUIOのタイマ
インタラプト処理ルーチン(第5図)(及び第6図に示
す5CPU20のタイマインタラプト処理ルーチン)に
渡す複数のデータがある。エンベロープΔX(エンベロ
ープ演算周期) 、 加減フラク付エンベロープΔy(
エンベロープ変化分)目標エンベロープから成るエンベ
ロープパラメータはその例である。データ源である外部
データメモリ90はエンベロープのセグメント(例えば
アタックセグメント、デイケイセグメント、サスティン
セグメント等)ごとにエンベロープパラメータを記憶し
ている。MCPUloのメインプログラムは発音処理4
−9において、押鍵(ノートオン)あるいはインタラプ
ト処理ルーチンのチャンネル音源処理(第9図)内で検
出されたエンベロープの目標値への到達(9−6,9−
7参照)に応答して所定のセグメントについてのエンベ
ロープパラメータ(新しい目標エンベローフ、エンベロ
ープΔx、加減フラク付エンヘロープΔy)を外部デー
タメモリ90から取り出してMCPU内部RAM106
(または5CPU内部RAM206)の対応するチャン
ネル音源処理レジスタにセットすることによって複数の
データから成るエンベロープパラメータを更新する必要
がある。このような複数のデータはインタラプト発生部
116からのインタラプト信号INTによってメインプ
ログラムが中断される前に、メインプログラムにおいて
更新を完了させておかなければならない。
In the case of the electronic musical instrument processing device of this embodiment as well, a plurality of messages are passed from the MCPUIO main program (Fig. 4) to the MCPUIO timer interrupt processing routine (Fig. 5) (and the 5 CPU 20 timer interrupt processing routine shown in Fig. 6). There is data on. Envelope ΔX (envelope calculation cycle), envelope Δy with addition/subtraction flux (
An example is an envelope parameter consisting of a target envelope (envelope change amount). The external data memory 90, which is a data source, stores envelope parameters for each envelope segment (eg, attack segment, decay segment, sustain segment, etc.). The main program of MCPUlo is sound processing 4
-9, when the envelope reaches the target value (9-6, 9-
7), the envelope parameters (new target envelope, envelope Δx, envelope with adjustment Δy) for a predetermined segment are retrieved from the external data memory 90 and stored in the MCPU internal RAM 106.
It is necessary to update the envelope parameters consisting of a plurality of data by setting them in the corresponding channel sound source processing registers (or 5 CPU internal RAM 206). Such a plurality of data must be updated in the main program before the main program is interrupted by the interrupt signal INT from the interrupt generating section 116.

このような複数のデータ転送(更新)の問題を解決する
ために、本実施例では2つの解決手段を開示する。第1
の解決手段はデータ更新の間、インタラプトをマスクし
てメインプログラムのデータ更新命令群の実行が中断さ
れないようにするインタラプトマスク方式であり、第2
の解決手段は複数のデータ転送を一命令で実行する機能
を利用した一命令一方式である。
In order to solve the problem of multiple data transfers (updates), this embodiment discloses two solutions. 1st
The solution to this problem is an interrupt masking method that masks interrupts during data updating so that the execution of the main program's data update instructions is not interrupted.
The solution to this problem is a one-instruction one-instruction method that utilizes the function of executing multiple data transfers with one instruction.

インタラプトマスク 式(第16.第17、第2〜第7
図) この方式によれば、インタラプト発生部116からのイ
ンタラプトはメインプログラム、特に発音処理4−9に
おけるデータ更新命令群によって内部RAMのチャンネ
ル音源レジスタ群にデータをセットする間、マスクされ
て、MCPUIO(7)#jI御がメインプログラム(
第4図)からインタラプト処理ルーチン(第5図)に移
るのが禁止される。
Interrupt mask formula (16th, 17th, 2nd to 7th
(Figure) According to this method, the interrupt from the interrupt generation unit 116 is masked while data is set in the channel sound source register group of the internal RAM by the data update command group in the main program, especially in the sound generation process 4-9, and the interrupt from the MCPUIO (7) #jI control the main program (
4) to the interrupt processing routine (FIG. 5) is prohibited.

第17図に複数のデータ転送を含むエンベロープ処理(
メインプログラムの発音処理4−9内にある)のフロー
を示し、第16図にインタラプトマスクに関連するハー
ドウェアを示す。
Figure 17 shows envelope processing including multiple data transfers (
Fig. 16 shows the hardware related to the interrupt mask.

第17図においてMCPUIOは17−1で指定flt
チャンネルの現在エンベロープが目標エンベロープに到
達しているかどうかを調べる。到達すればMCPUIO
は17−2に進み、外部データメモリ90(第1図)か
ら、次のエンベロープセグメントに関するエンベロープ
パラメータ、即ち、新しい目標エンベロープ、加減フラ
グ付エンベロープΔy、エンベロープΔ)l取’J出L
、内部RAM106内の転送バッファにセットする。
In Figure 17, MCPUIO is specified by 17-1 flt
Check whether the channel's current envelope has reached the target envelope. If it reaches MCPUIO
goes to step 17-2 and retrieves the envelope parameters for the next envelope segment from the external data memory 90 (FIG. 1): new target envelope, envelope Δy with addition/subtraction flag, envelope Δ)
, and set it in the transfer buffer in the internal RAM 106.

ここに転送バッファはデータ番とデータ目的地との間の
中間的な記憶部でありインタラプト処理ルーチン(第9
図)によって参照されないRAM領域であるので、この
時点でのインタラプトマスクは不要である。転送バッフ
ァを設けた理由はデータ源であるメモリ90がMCPU
IOと5CPU20によって共用される外部メモリであ
り、そのデータアクセス時間が内部RAM相互のデータ
転送時間より長くなること等による。ブロック17=2
の機能は外部データメモリ90から内部RAM100へ
の複数のデータ転送命令を順次実行することで処理され
る。
Here, the transfer buffer is an intermediate storage unit between the data number and the data destination, and is used in the interrupt processing routine (9th
Since this is a RAM area that is not referenced by (Figure), an interrupt mask is not required at this point. The reason for providing the transfer buffer is that the data source memory 90 is the MCPU.
This is because the external memory is shared by the IO and the five CPUs 20, and its data access time is longer than the data transfer time between internal RAMs. Block 17=2
This function is processed by sequentially executing a plurality of data transfer commands from the external data memory 90 to the internal RAM 100.

転送バッファからチャンネル音源用レジスタ群(インタ
ラプト処理ルーチンにおいて参照される)へのデータ転
送はブロック17−4で実行される。このデータ転送中
にMCPUIOの制御がタイマインタラプト処理ルーチ
ン(第5図)に移行しないようにするため(あるいは5
CPU20の制御が第6図のプログラムに移行しないよ
うにするため)、MCPUI Oはブロー2り17−4
に先立ってブロック17−3でインタラプトをマスクす
る命令を実行する。このインタラプトマスク命令の実行
中に、MCPUlOのオペレーション制御回路112か
らローアクティブのマスク−信号MASKが発生する。
Data transfer from the transfer buffer to the channel sound source register group (referenced in the interrupt processing routine) is executed in block 17-4. To prevent MCPUIO control from shifting to the timer interrupt processing routine (Figure 5) during this data transfer (or
In order to prevent the control of the CPU 20 from shifting to the program shown in FIG.
Prior to this, an instruction to mask the interrupt is executed in block 17-3. During execution of this interrupt mask command, a low active mask signal MASK is generated from the operation control circuit 112 of the MCPUIO.

このマスク信号MASK’はインタラプト発生部116
かものインタラプト信号INTをマスクして、インタラ
プト処理ルーチン(第5図、第6図)への制御の移行を
禁正す、るように作用する。この目的のため、第16図
において、インタラプト発生部116に結合するマスク
解除特機部150が設けられる。マスク解除特機部15
0は図示のように結合したR−Sフリップフロップ15
02、ANDゲート1504、及びDフリップフロップ
1506を含む。
This mask signal MASK' is transmitted to the interrupt generating section 116.
It functions to mask the insect interrupt signal INT and prohibit transfer of control to the interrupt processing routine (FIGS. 5 and 6). For this purpose, in FIG. 16, a mask release special section 150 coupled to the interrupt generating section 116 is provided. Mask release special equipment part 15
0 is an R-S flip-flop 15 coupled as shown.
02, an AND gate 1504, and a D flip-flop 1506.

マスク信号MASKがマスク解除を示す″H″レベルの
とき、インタラプト発生部116からのインタラプト信
号INTにより、R−Sフリップフロップ1502がセ
ットされ、その出力が“H″のMASKによりイネーブ
ルされているANDゲートを通って、Dフリー、プフロ
ツプ1506にTICKI(75タイミングで取り込ま
れ、このDフリップフロップ1506の出力が、実際の
インタラプト信号A−I NTとしてMCPUIOのR
OMアドレス制御部114に入力される。その結果、5
CPU動作開始・糾了機能のところで述べたように、R
OMアドレス制御一部114のゲー)1152からRO
Mアドレスデコーダ104にイン、タラブト処理ルーチ
ン(第5図)のエントリポイントのアドレスが入力され
るとともに、次のメインプログラム命令のアドレスがパ
スANからラッチL2に退避されて、MCPUIOの制
御がインタラプト処理ルーチンに移行し、メインプログ
ラムは中断される。また5、信号A−I NTは5CP
Uリセット制御部134に入力され、その結果、5CP
U動作開始・終了機能のところで述べたようにS(1:
、PU20のプログラム(第7図)動作が開始する。D
フリップフロップ1506からのHレベルの出力はR−
Sフリップフロップ1502をリセットし、その結果、
次のTICKIのタイミングでDフリップフロ7プ15
06の出力(マスク解除特機部150の出力)はLレベ
ルに切り換る。
When the mask signal MASK is at the "H" level indicating mask release, the R-S flip-flop 1502 is set by the interrupt signal INT from the interrupt generating section 116, and its output is the AND signal enabled by the "H" MASK. Through the gate, the D flip-flop 1506 receives TICKI (at timing 75), and the output of this D flip-flop 1506 is input to the MCPUIO R as the actual interrupt signal A-I NT.
It is input to the OM address control section 114. As a result, 5
As mentioned in the CPU operation start/end function, R
OM address control part 114 game) 1152 to RO
The address of the entry point of the interrupt processing routine (FIG. 5) is input to the M address decoder 104, and the address of the next main program instruction is saved from path AN to latch L2, and the control of MCPUIO starts interrupt processing. A transition is made to the routine, and the main program is interrupted. Also 5, signal A-I NT is 5CP
is input to the U reset control unit 134, and as a result, 5CP
As mentioned in the U operation start/end function, S(1:
, the program (FIG. 7) operation of the PU 20 starts. D
The H level output from the flip-flop 1506 is R-
S flip-flop 1502 is reset, resulting in
At the timing of the next TICKI, D flip-flop 7p15
The output of 06 (output of the mask release special unit 150) is switched to the L level.

ピれに対し、第17図の17−3に示すようにインタラ
プトマスク命令の実行により、オペレーション制御回路
112からローアクティブのマスク信号MASKがマス
ク解除待機11A150に入力される場合には、インタ
ラプト発生部116からのインタラプト信号はANDゲ
ート1504によってマスクされる。その結果、マスク
解除特機部1504はマスク信号MASKがローアクテ
ィブの間、その出力A−INTを“L″の割込禁止レベ
ルにし、ROMアドレス制御回路114の通常動作を継
続させ、MCPUIOに対するメインプログラムの制御
を続行させる。
In response to peeling, when a low active mask signal MASK is input from the operation control circuit 112 to the mask release standby 11A150 by executing the interrupt mask command as shown in 17-3 in FIG. The interrupt signal from 116 is masked by AND gate 1504. As a result, the mask release special unit 1504 sets its output A-INT to the "L" interrupt disable level while the mask signal MASK is low active, continues the normal operation of the ROM address control circuit 114, and maintains the main Allow program control to continue.

したがって、ブロック17−4に示す転送命令群(及び
エンベロープΔχ用タイマーのクリア命令)の実行は、
実行の途中で、インタラプト発生部116からインタラ
プト信号INTが発生した場合にも中断されない、これ
により、インタラプト処理ルーチン(IlF!5図、第
6図)は正しく更新されたエンベロープパラメータを参
照でき、正しい演算結果(楽音波形データ)を得ること
ができる。
Therefore, the execution of the transfer command group (and the clear command for the envelope Δχ timer) shown in block 17-4 is as follows:
Even if the interrupt signal INT is generated from the interrupt generation unit 116 during execution, the interrupt processing routine (IIF! 5, 6) can refer to the correctly updated envelope parameters, and the correct Computation results (music waveform data) can be obtained.

しかる後、MCPUIOはブロック17−5に示すイン
タラプトマスク解除命令を実行する。この結果、オペレ
ーション制御回路112からマスク解除特機部150に
供給される信号MASKはマスク解除を示す“H″レベ
ル切り換る。複数のデータ転送を含むブロック17−4
の実行中に、インタラプト発生部116からインタラプ
ト信号が発生したような場合には、マスク解除特機部1
50のR−Sフリップフロップ1502の出力によって
、このマスク解除命令の実行後にインタラプトの要求が
受は付けられ、上述したようにしてメインプログラムが
中断され、インタラプト処理ルーチンに制御が移行する
Thereafter, MCPUIO executes the interrupt mask release instruction shown in block 17-5. As a result, the signal MASK supplied from the operation control circuit 112 to the mask release special unit 150 switches to the "H" level indicating mask release. Block 17-4 containing multiple data transfers
If an interrupt signal is generated from the interrupt generation section 116 during the execution of
By the output of the RS flip-flop 1502 of 50, the interrupt request is accepted after execution of this mask release instruction, the main program is interrupted as described above, and control is transferred to the interrupt processing routine.

一命   (18〜第21図 この方式はメインプログラム(第4図)におI/)て複
数のデータをインタラプト処理ルーチンの参照する内部
RAM領域にセ−/ )するために、ロング命令と呼ば
れる複数データー括転送のための単一命令を利用し、ロ
ング命令の実行が終了するまでインタラプト処理ルーチ
ンにMCPUIOの制御が移行しないようにしたもので
ある。
(Figures 18 to 21) This method is called a long instruction in order to save multiple pieces of data in the main program (Figure 4) to the internal RAM area referred to by the interrupt processing routine. A single instruction for bulk transfer of multiple data is used, and control of the MCPUIO is not transferred to the interrupt processing routine until the execution of the long instruction is completed.

単一の命令(ロング命令)で複数のデータ転送が可能な
CPUは例えば特公昭60−47612号に開示されて
おり、本実施例にこの技術が適用できる。特公昭60−
47612号によれば、ロング命令は連続するアドレス
にある複数のレジスタ間(例えばレジスタAO〜A3を
レジスタBe〜B3)の転送に適用可能である(ここに
レジスタとはRAMの1記憶場所を意味し、A、BはR
AMのアドレス上位、即ち行アドレスを表わし、0.3
はRAMのアドレス下位、即ち列アドレスを表わす)、
制御用ROM(本実施例の要素102に対応する)から
のロング命令語にはンースレジスタの行アドレス(上の
例でいえばA)、デイスティネーシ、ンレジスタの行ア
ドレス(B)。
A CPU capable of transferring a plurality of data with a single instruction (long instruction) is disclosed, for example, in Japanese Patent Publication No. 47612/1983, and this technique can be applied to this embodiment. Special Public Service 1986-
According to No. 47612, the long instruction can be applied to transfer between multiple registers at consecutive addresses (for example, registers AO to A3 to registers Be to B3) (here, register means one memory location in RAM). and A and B are R
Represents the upper address of AM, that is, the row address, and is 0.3
represents the lower address of RAM, that is, the column address),
The long instruction word from the control ROM (corresponding to element 102 in this embodiment) includes the row address of the first register (A in the above example) and the row address (B) of the destination register.

最初のデータ転送に係るレジスタの列アドレス(O)、
最後のデータ転送に係るレジスタの列アドレス(3)の
情報が含まれる。RAMアドレス制御部(本実施例の要
素105に対応する)はロング命令の実行に適するよう
に構成され、列アドレスを最初の転送の列アドレスから
最後の転送の列アドレスまでデータ転送の都度、1ずつ
更新するカウンタ(その出力がRAMの列アドレス入力
に順次加えられる)と、すべてのデータ転送が完了した
ことを検出するためカウンタ出力と最後のデータ転送の
列アドレス値とを比較し、一致したときにロング命令実
行完了信号を発生する一致回路とを含んでいる。
Column address (O) of the register related to the first data transfer,
Contains information on the column address (3) of the register related to the last data transfer. The RAM address control unit (corresponding to element 105 in this embodiment) is configured to be suitable for executing long instructions, and changes the column address by 1 for each data transfer from the column address of the first transfer to the column address of the last transfer. To detect that all data transfers have been completed, the counter output is compared with the column address value of the last data transfer, and if they match. and a matching circuit that sometimes generates a long instruction execution completion signal.

以下の説明において1本実施例の制御用ROM102の
メインプログラム内には上述したようなロング命令が含
まれるものとし、RAMアドレス制御部105.205
は上述したようにロング命令の実行を適用できるように
構成されているものとする。
In the following description, it is assumed that the main program of the control ROM 102 of this embodiment includes the above-mentioned long instructions, and the RAM address control unit 105.205
It is assumed that the configuration is such that the execution of long instructions can be applied as described above.

第18図にロング命令の実行中、インタラプト信号IN
Tによるメインプログラムの中断を禁止する回路を含む
ハードウェアのブロック図を示し、第19mにロング命
令をエンベロープノぐラメ−タの転送に適用した場合の
RAMのメモリマツプを示し、第20図にロング命令(
単一転送命令)と複数の転送命令との動作の比較を示し
、第21図にロング命令を使用したエンベロープパラメ
ータの転送に関連するフローチャートを示す。
Figure 18 shows that during the execution of a long instruction, the interrupt signal IN
A block diagram of the hardware including a circuit that prohibits interruption of the main program by T is shown. Figure 19m shows the memory map of the RAM when the long instruction is applied to envelope parameter transfer. Figure 20 shows the long instruction. order(
FIG. 21 shows a flowchart related to envelope parameter transfer using a long instruction.

第18図において、インタラプト発生部116に転送終
了特機部152が結合している。この回路152はロン
グ命令の実行中、インタラプト信号によるメインプログ
ラムの中断を禁止する。転送終了特機部152は図示の
ように結合されたR−Sフリップフロップ1522、A
NDゲート1524、Dフリップフロップ1526から
成り、Dフリップフロップ1526の出力(転送終了特
機部152の出力)が実際に作用するインタラプト信号
A−INTとしてROMアドレス制御部214と5CP
Uリセット制御部134に結合している。ANDゲー)
 1524に入力される信号〜LONGが“L”の間は
、インタラプト発生部116からインタラプト信号IN
Tが発生しても、Dフリップフロップ1526の出力は
”L″のままであり、ROMアドレス制御部214と5
CPUリセット制御部134はインタラプト信号INT
の作用を受けない、ここに、信号〜LONGはロング命
令の実行中に“L″となる信号であり。
In FIG. 18, a transfer termination special unit 152 is coupled to the interrupt generating unit 116. This circuit 152 prohibits interruption of the main program by an interrupt signal during execution of a long instruction. The transfer end special unit 152 includes R-S flip-flops 1522 and A connected as shown in the figure.
It consists of an ND gate 1524 and a D flip-flop 1526, and the output of the D flip-flop 1526 (output of the transfer end special unit 152) is used as the interrupt signal A-INT that actually acts on the ROM address control unit 214 and the 5CP.
It is coupled to the U reset control section 134. AND game)
While the signal ~LONG input to 1524 is “L”, the interrupt signal IN is output from the interrupt generation unit 116.
Even if T occurs, the output of the D flip-flop 1526 remains "L", and the ROM address control units 214 and 5
The CPU reset control unit 134 receives an interrupt signal INT.
Here, the signal ~LONG is a signal that becomes "L" during execution of the long instruction.

ロング命令の実行完了に伴ってRAMアドレス制御部1
04の一致回路から発生するロング命令実行完了信号に
応答して“H″に復帰する。信号〜LONGのレベルが
H″のときには、インタラプト発生・部116からのイ
ンタラプト信号INTは転送終了待機m152を通って
ROMアドレス制御部214と5CPUリセツト@@i
ll I 34に作用し、MCPUIOの制御をメイン
プログラム(第4図)からインタラプト処理ルーチン(
第5図)に移行させ、5CPU20のプログラム(第6
図)動作を開始させる。
Upon completion of execution of the long instruction, RAM address control unit 1
It returns to "H" in response to the long instruction execution completion signal generated from the coincidence circuit 04. When the level of the signal ~LONG is H'', the interrupt signal INT from the interrupt generation unit 116 passes through the transfer end wait m152 and is sent to the ROM address control unit 214 and the 5CPU reset@@i
ll I 34 and controls the MCPUIO from the main program (Figure 4) to the interrupt processing routine (
(Fig. 5) and the 5CPU20 program (6th
Figure) Start the operation.

エンベロープパラメータの更新に一命lj式を適用する
場合において、インタラプト処理ルーチン(第5図、第
6図)のチャンネル音源処理サブルーチン(第9図)が
参照し、メインプログラムのエンへロープ処理サブルー
チン(第21図)が設定(更新)するエンベロープパラ
メータはエンベロープΔχ用タイマー、新目標エンベロ
ープ11i x ンヘO−7’ΔX、[olKフラグ付
エンベロープΔyである0本実施例において、これらの
エンベローフハラメータのデータ源は外部メモリ90(
第1図)にある、エンベローフハラメータノ更新の際に
(21−1)、外部データメモリ90から内部RAM1
06.206のチャンネル音源データ領域への直接の転
送は望ましくないので、外部データメモリ90からのエ
ンベロープパラメータはいったん内部RAM106内の
転送用バッファ領域に移しく2l−2)、次に、転送用
バー、ファ領域からチャンネル音源データ領域に移す(
21−3)。
When applying the Ikkei lj formula to update the envelope parameters, the channel sound source processing subroutine (Fig. 9) of the interrupt processing routine (Figs. 5 and 6) refers to it, and the envelope processing subroutine (Fig. 9) of the main program The envelope parameters set (updated) in FIG. 21) are the timer for the envelope Δχ, the new target envelope 11i The data source is the external memory 90 (
1), when updating the envelope data (21-1), the data is transferred from the external data memory 90 to the internal RAM
Since direct transfer to the channel sound source data area of 06.206 is not desirable, the envelope parameters from the external data memory 90 are temporarily transferred to the transfer buffer area in the internal RAM 106 (2l-2), and then transferred to the transfer bar. , move from the F area to the channel sound source data area (
21-3).

この転送用バッファ領域からチャンネル音源データ領域
へのデータ転送処理21−3に上述したロング命令が使
用される。ロング命令を適用するために、転送用バッフ
ァ領域はRAM上の連続した領域であることを必要とし
、同様にエンベロープパラメータのチャンネル音源デー
タ領域も連続した領域であることを必要とする。この例
を第19図に示す、ここでは、エンベロープパラメータ
の転送用バッファ領域は、レジスタx4〜x7の連続領
域に17ビングぎれエンベロープパラメータについての
1チヤンネル音源データ領域はレジスタA4〜A7の連
続領域にマツピングされている。したがって、1チヤン
ネルでエンベロープパラメータを更新する必要のあると
きには、21−3で、レジスタx4〜x7をレジスタA
4〜A7に転送するロング命令を実行すればよい、この
命令が実行されている間は、上述したようにインタラプ
ト信号INTがインタラプト発生部116から発生して
も、転送終了特機部152のロング命令完了待機機能に
より、ロング命令が終了するまではインタラプト信号の
作用がROMアドレス制御部114.5CPUリセット
制御部134に波及しない(第20図(B)参照)、こ
の結果、チャンネル音源データ領域のエンベロープパラ
メータが全て正しい更新値に変更された後にインタラブ
ト処理ルーチンが開始するので、その演算結果(楽音波
形データ)が正しい値を示し、誤りのない動作が保証さ
れる。     、 これに対しもし、21−3に示す転送処理機能を複数の
転送命令(−命令ごとに1つのエンベロープパラメータ
を転送する)の実行によって果たそうとした場合には、
転送の途中で、例えば、第20図(A)に示すように転
送命令lの実行中にインタラプト信号INTが発生する
と次のマシンサイクルで転送命令2の代りにインタラプ
ト処理ルーチンの最初の命令が実行されてエンベロープ
転送処理は途中で中断されてしまう、この結果、インタ
ラプト処理ルーチンの処理結果(楽音波形データ)は誤
った値となってしまう。
The above-mentioned long command is used in the data transfer process 21-3 from the transfer buffer area to the channel sound source data area. In order to apply the long command, the transfer buffer area needs to be a continuous area on the RAM, and similarly the channel sound source data area of the envelope parameter needs to be a continuous area. An example of this is shown in FIG. 19. Here, the buffer area for envelope parameter transfer is a continuous area of registers x4 to x7, and the 1-channel sound source data area for envelope parameters is a continuous area of registers A4 to A7. It has been mapped. Therefore, when it is necessary to update the envelope parameters in one channel, registers x4 to x7 are transferred to register A in 21-3.
4 to A7. While this instruction is being executed, even if the interrupt signal INT is generated from the interrupt generation section 116 as described above, the long instruction of the transfer end special section 152 is executed. Due to the instruction completion standby function, the effect of the interrupt signal does not affect the ROM address control unit 114.5 CPU reset control unit 134 until the long instruction is completed (see FIG. 20(B)). Since the interact processing routine starts after all the envelope parameters have been changed to correct update values, the calculation results (music waveform data) show correct values, and error-free operation is guaranteed. , On the other hand, if the transfer processing function shown in 21-3 is attempted to be achieved by executing multiple transfer instructions (one envelope parameter is transferred for each - instruction),
During the transfer, for example, if an interrupt signal INT occurs during the execution of transfer instruction 1 as shown in FIG. 20(A), the first instruction of the interrupt processing routine will be executed instead of transfer instruction 2 in the next machine cycle. Therefore, the envelope transfer process is interrupted midway, and as a result, the processing result (music waveform data) of the interrupt processing routine becomes an incorrect value.

−命令方式による複数データの転送(更新)処理では1
7−3.17−5に示すようなインタラプトマスク命令
、インタラプト解除命令を実行する必要がなく、オーへ
−ヘッドなしの最短時間で、転送処理を実行することが
できる利点もある。
- 1 for multiple data transfer (update) processing using command method
There is also the advantage that there is no need to execute an interrupt mask command or an interrupt release command as shown in 7-3.17-5, and transfer processing can be performed in the shortest possible time without an overhead.

変形例として、第18図に示すような転送終了特機部1
52の代りに、ロング命令の実行中、制御用ROM10
2.202からの一命令をフェッチするインストラクシ
ョン出力ラッチ102aの動作を禁止する手段を使用し
てもよい、即ち、制御用ROM102からラッチ102
aを介して与えられるロング命令語に含まれるモード信
号(命令がロングであることを示している)によって、
インストラクシ、ン出力ラッチ102a、202aに加
えるオペレーションラッチ信号の発生を禁止し、ロング
命令の実行完了信号に応答して次のマシンサイクルでオ
ペレーションラッチ信号を発生する回路をオペレーショ
ン制御回路112内に設ければ、インタラプト信号IN
Tがロング命令の実行中に発生しても制御用ROM10
2.202からインタラプト処理ルーチンの最初の命令
語はロング命令の実行が終了するまではインストラクシ
ョン出力ラッチ102a、202aにフェッチされない
(したがって実行もされない)ので実施例と同様の効果
が得られる。
As a modified example, a transfer termination special unit 1 as shown in FIG.
52, the control ROM 10 is used during execution of a long instruction.
2. Means may be used to inhibit the operation of the instruction output latch 102a that fetches one instruction from the control ROM 102.
By the mode signal (indicating that the instruction is long) included in the long instruction word given via a,
A circuit is provided in the operation control circuit 112 to inhibit generation of an operation latch signal applied to the instruction output latches 102a and 202a, and to generate an operation latch signal in the next machine cycle in response to a long instruction execution completion signal. If so, interrupt signal IN
Even if T occurs during the execution of a long instruction, the control ROM 10
2. Since the first instruction word of the interrupt processing routine from 202 is not fetched into the instruction output latches 102a, 202a (and therefore not executed) until the execution of the long instruction is completed, the same effect as in the embodiment can be obtained.

<MCPUからの5CPUアクセス機能〉本実施例の装
置はMCPUIOからS C、P U 20の内部RA
M206にデータを高速にアクセス(リードまたはライ
ト)する機能を有している。
<5CPU access function from MCPU> The device of this embodiment has access from MCPUIO to SC, internal RA of PU 20.
It has a function to access (read or write) data to M206 at high speed.

この課題は一般に複数のCPU間のデータアクセス問題
と、して把えられている。従来技術ではこの種のインタ
ーCPUデータアクセスに時間がかかる問題がある。従
来技術ではアクセスを要求するCPUからアクセスを要
求されるCPUに対し、要求信号を与える。アクセスを
要求されるCPUはこの要求信号に対し、ただちに要求
側CPUからのデータアクセスを許可する承認信号を発
生することはできず、実行中のオペレージ、ンが完了す
るまで承認信号の発生を遅延させる。したがって1.従
来のインターCPUデータアクセス方式は高速処理が要
求されるアプリケーションにおける障害の1つとなりて
いる。
This problem is generally understood as a data access problem between multiple CPUs. In the prior art, there is a problem in that this type of inter-CPU data access takes time. In the prior art, a request signal is given from a CPU requesting access to a CPU requesting access. In response to this request signal, the CPU to which access is requested cannot immediately generate an acknowledge signal that allows data access from the requesting CPU, and delays generation of the acknowledge signal until the ongoing operation is completed. let Therefore 1. The conventional inter-CPU data access method has become one of the obstacles in applications requiring high-speed processing.

本実施例では高速のインターCPUデータアクセスのた
めに2つの解決手段、即ち、5CPU停止モ一ド利用方
式と瞬時強制アクセス方式を開示する。
In this embodiment, two solutions are disclosed for high-speed inter-CPU data access, namely, a 5-CPU stop mode utilization method and an instantaneous forced access method.

5CPU停 モード利  式(第22図、第2、第3図
) この方式は上述した5CPU動作開始・終了機能を利用
したものである。この機能により5CPU20のプログ
ラム(第6図)動作はMCPUIOにおけるインタラプ
ト処理ルーチン(第5図)の開始と同時に開始し1MC
PUl0のインタラプト処理ルーチンが終了する前に終
了する。したがって、MCPUIOにおいてメインプロ
グラム(第4図)が動作している間は5CPU20は停
止モード(リセット状1りにある。第2図に示すように
停止モード中では、リセット制御部134からの信号A
が“5CPU停止中”を示す“H”レベルになる。この
信号Aにより、5CPU20(第3図)ではROMアド
レス制御部214の動作が停止し、RAMアドレス制御
部204は5CPU20の制御用ROM202からのR
AMアドレスバスSAではなく、MCPUloからパス
ゲ−)128を介してRAMアドレスバスMaに結合し
てMCPUIOからの5CPU内部RAM206の指定
アドレスを受けるように動作モードが設定され、RAM
データに切り換え部240は5CPU20のオペレーシ
ョン結果(ALU部208出力または乗算器210出力
)を運ぶデータバスDBではなくMCPUIOからのデ
ータを運ぶデータバスDoUI にRAM206のデー
タインを結合する動作モードに設定され、ライト信号切
り換え部242は5CPUオペレ一シヨン制御回路21
2からのり一ド/ライト制御信号ではなくオペレーショ
ン制御回路112からのり一ド/ライト制御信号CをR
AM206のリード/ライト制御人力に結合する動作モ
ードに設定される。このように停止状態のとき、5CP
U20はMCPUlOによってデータアクセスが可能な
状態に置かれている。
5CPU stop mode utilization method (Figures 22, 2, and 3) This method utilizes the above-mentioned 5CPU operation start/end function. With this function, the program operation of 5CPU20 (Fig. 6) starts at the same time as the start of the interrupt processing routine (Fig. 5) in MCPUIO.
It ends before the interrupt processing routine of PUl0 ends. Therefore, while the main program (FIG. 4) is operating in the MCPUIO, the 5 CPU 20 is in the stop mode (reset state 1).As shown in FIG.
becomes “H” level indicating “5 CPU is stopped”. This signal A stops the operation of the ROM address control section 214 in the 5 CPU 20 (FIG. 3), and the RAM address control section 204 controls the ROM address control section 202 of the 5 CPU 20 (FIG. 3).
The operation mode is set so that the designated address of the 5CPU internal RAM 206 is received from the MCPUIO by connecting it to the RAM address bus Ma from MCPUlo via the passgate 128 instead of the AM address bus SA, and the RAM
The data switching unit 240 is set to an operation mode in which the data input of the RAM 206 is coupled to the data bus DoUI that carries data from the MCPUIO instead of the data bus DB that carries the operation results of the CPU 20 (the output of the ALU unit 208 or the output of the multiplier 210). , the write signal switching unit 242 is a 5-CPU operation control circuit 21.
2, but not the read/write control signal C from the operation control circuit 112.
The operating mode is set to be coupled to the read/write control of AM206. When in a stopped state like this, 5CP
U20 is placed in a state where it can access data by MCPUlO.

したがって、本実施例によれば、MCPUIOはメイン
プログラムにおいて5CPU20の内部RAM206を
自由にアクセスすることができる。この様子を第22図
に示す、5CPtJ20の停止状態(音源処理完了)の
確認、即ちMCPUオペレーション制御回路112にお
ける5CPUリセット制御部134からの5CPU状態
フラグの検査はMCPUIOのインタラプト処理ルーチ
ン(第5図)のなかで1回だけ行えばよい(5−3参照
)、いったん停止状態が確認されれば、次のインタラプ
ト信号INTが発生するまで、再度の確認をする必要な
しに、−命令の実行で、MCPUIOは5CPU20の
内部RAM206をアクセスできる。したがって、従来
に比べ、5CPU20へのデータアクセスに要する時間
が大幅に短縮される。
Therefore, according to this embodiment, the MCPUIO can freely access the internal RAM 206 of the 5 CPUs 20 in the main program. This situation is shown in FIG. 22. Confirmation of the stopped state (sound source processing completion) of the 5CPtJ20, that is, inspection of the 5CPU status flag from the 5CPU reset control unit 134 in the MCPU operation control circuit 112, is performed by the interrupt processing routine of the MCPUIO (see FIG. ) (see 5-3). Once the stop state is confirmed, there is no need to confirm again until the next interrupt signal INT is generated. , MCPUIO can access the internal RAM 206 of the 5 CPU 20. Therefore, the time required for data access to the 5 CPUs 20 is significantly reduced compared to the prior art.

瞬時強制アクセス方式(第23〜825図)この方式は
データアクセスのためにMCPUIOと5CPU20と
の間で従来のようなアクセスの要求と承認という手続を
踏むことなく、MCPUIOからの5CPUデ一タアク
セス時に5CPU20の動作を強制的に一時停止させ、
その間にMCPUIOが5CPU20の内部RAM20
6にアクセスするものである。この方式によれば、MC
PUIOは任意のときに5CPU20の状態を調べる必
要なしに5CPTJ20を高速に(−命令実行で)アク
セスできる。
Instant forced access method (Figures 23 to 825) This method allows 5 CPUs to access data from MCPUIO without going through the conventional procedure of requesting and approving access between MCPUIO and 5 CPUs 20 for data access. Sometimes, the operation of 5CPU20 is forcibly stopped,
Meanwhile, MCPUIO is 5 CPU 20 internal RAM 20
6. According to this method, MC
PUIO can access 5CPTJ20 at high speed (by executing a -instruction) without having to check the status of 5CPU20 at any time.

このような特徴を備えたMCPU 10のブロック図と
5CPU20のブロー2り図をそれぞれ第23図と第2
4図に示す、なお、このMCPUと5CPUは上述した
5CPU動作開始終了機能に関する要素(第2図の5C
PUリセット制御回路134その他)を含むが第23図
と第24図では簡略化のため図示を省略しである。この
場合、リセット制御回路134からの5CPU動作起動
/停止信号Aは5CPU20 (第24図)のROMア
ドレス制御部214にのみ供給すれば十分である。第2
3図と第24図のMCPUIOと5CPU20の瞬時強
制アクセスに関する動作のタイムチャートを第25図に
示す。
A block diagram of the MCPU 10 and a block diagram of the 5CPU 20 with such features are shown in Figures 23 and 2, respectively.
The MCPU and 5CPU shown in Figure 4 are elements related to the above-mentioned 5CPU operation start and end function (5C in Figure 2).
PU reset control circuit 134 and others), but their illustration is omitted in FIGS. 23 and 24 for the sake of brevity. In this case, it is sufficient to supply the 5CPU operation start/stop signal A from the reset control circuit 134 only to the ROM address control unit 214 of the 5CPU 20 (FIG. 24). Second
FIG. 25 shows a time chart of operations related to instantaneous forced access of MCPUIO and 5 CPU 20 in FIGS. 3 and 24.

瞬時強制アクセス方式を使用する場合、MCPUIOと
5CPU20は別個のクロック発生回路136.236
Mを必要とする。5CPU20のクロック発生回路23
6Mは、5CPU20へのデータアクセス命令実行時に
MCPUIOのオペレーション制御回路112Mから出
力されるハイアクティブの5CPUアクセス信号りに応
答してその動作を停止する。これに関連し、MCPUI
Oのクロック発生回路136と5CPU20のクロック
発生回路236Mは共通の2相マスタ一クロツク信号C
K1.CK2を受けるが、出力するクロックのタイミン
グは独立である。MCPUIOではクロック発生回路1
36からの3相のクロック信号T1.T2、T3の一周
期でマシンサイクル(最短の一命令実行時間)が規定さ
れ、方、5CPU20ではクロック発生回路236Mか
らの3相のクロック信号ST1.ST2.ST3の一周
期でそのマシンサイクルが規定される。
When using the instantaneous forced access method, MCPUIO and 5CPU20 are separate clock generation circuits 136.236
Requires M. 5 Clock generation circuit 23 of CPU 20
6M stops its operation in response to a high active 5CPU access signal output from the operation control circuit 112M of MCPUIO when a data access instruction to 5CPU 20 is executed. In this regard, MCPUI
The clock generation circuit 136 of the CPU 20 and the clock generation circuit 236M of the 5 CPU 20 use a common two-phase master clock signal C.
K1. Although it receives CK2, the timing of the output clock is independent. In MCPUIO, clock generation circuit 1
The three-phase clock signal T1. A machine cycle (the shortest one instruction execution time) is defined by one period of T2 and T3, and in the 5 CPU 20, a three-phase clock signal ST1. ST2. One cycle of ST3 defines the machine cycle.

第25図において、5CPUアクセス信号りが発生する
前において、MCPUIOに関するクロックTIのタイ
ミングは5CPU20に関するクロックSTIではなく
クロックST2のタイミングに一致している0両CPU
間で取り得る他のタイミング関係はT1がSTIに一致
する関係とTIがSr1に一致する関係である。
In FIG. 25, before the 5CPU access signal is generated, the timing of clock TI regarding MCPUIO matches the timing of clock ST2 rather than clock STI regarding 5CPU20.
Other possible timing relationships between them are T1 matching STI and TI matching Sr1.

MCPUIOにおける5CPUアクセス命令実行中にオ
ペレーション制御回路112から出力される5CPUア
クセス信号りは、5CPU20のクロック発生回路23
6Mを停止させて5CPU2oで実行中のオペレーショ
ンを停止させるとともに、その停止中にMCPUIOが
5CPU20の内部RAM206をアクセスできるよう
に、MCPUIOからの内部RAM206の指定アドレ
スに係るバスゲート128.5CPU内部RAM206
に対するアドレス制御部204、データイン切り換え部
240、及びライト信号切り換え部242の各動作モー
ドを5CPU側”から“MCPUII″に切り換える機
能を有する。このために、5CPUアクセス信号はこれ
らの要素128.204,240.242の動作モード
を選択する制御入力にDフリップフロップ250とAN
Dゲート252とから成る遅延回路を介して結合してい
る。このようなアクセス可能状態の下で、MCPUIO
はバスゲート128、RAMアドレス制御部204を介
して5cPU内部RAM206を7トレツシングし、リ
ードアクセスの場合には5CPU内部RAM206から
出力されるデータをパスゲー)132を介してMCPU
内部RAM106に読み込み、ライトアクセスの場合に
は、バスゲー)130を介して書き込みデータをデータ
バスD OUTに乗せ、5CPU内部RAM206にラ
イト信号Cを与えてデータを書き込む。
The 5 CPU access signal output from the operation control circuit 112 during execution of the 5 CPU access instruction in MCPUIO is generated by the clock generation circuit 23 of the 5 CPU 20.
In order to stop the 6M and stop the operation being executed by the 5 CPU 2o, and to allow the MCPUIO to access the internal RAM 206 of the 5 CPU 20 during the stop, the bus gate 128.
It has a function of switching the operation mode of the address control unit 204, data-in switching unit 240, and write signal switching unit 242 from the 5CPU side to the MCPUII.For this purpose, the 5CPU access signal , 240. A D flip-flop 250 and an AN
It is coupled via a delay circuit consisting of a D gate 252. Under such an accessible state, the MCPUIO
The 5cPU internal RAM 206 is tressed via the bus gate 128 and the RAM address control unit 204, and in the case of read access, the data output from the 5CPU internal RAM 206 is sent to the MCPU via the pass gate 132.
The data is read into the internal RAM 106, and in the case of a write access, the write data is transferred to the data bus DOUT via the bus game 130, and a write signal C is given to the 5 CPU internal RAM 206 to write the data.

MCPUIOからの5CPUアクセス信号りによって5
CPU20のオペレーションを中断する場合に、オペレ
ーションの中間結果が失われないようにする必要があり
、5CPUアクセス信号りの解除後に、予め保持した中
間結果を用いて5CPU20がオペレーションの残りの
部分を実行できるようにする必要がある。このために、
5CPU内部RAM206のデータ出力を一時的に記憶
するラッチ206a、206bを設けている。ラッチ2
06aはRAM206からの演算数(第1オペランド)
を5TICKIのタイミングでラッチし、ラッチ206
bはRAM206からの被演算数(第2オペランド)を
5T2CK 1のタイミングでラッチする。
5 by the 5 CPU access signal from MCPUIO
When interrupting the operation of the CPU 20, it is necessary to ensure that the intermediate result of the operation is not lost, and after the 5CPU access signal is released, the 5CPU 20 can execute the remaining part of the operation using the intermediate result held in advance. It is necessary to do so. For this,
Latches 206a and 206b are provided to temporarily store data output from the 5CPU internal RAM 206. latch 2
06a is the operation number from RAM206 (first operand)
is latched at the timing of 5TICKI, and the latch 206
b latches the operand (second operand) from the RAM 206 at the timing of 5T2CK1.

第25図を参照して動作例を述べると、この例では、M
CPUIOは5CPUアクセス信号りがハイアクティブ
レベルの間に5CPU20の内部RAM206に対する
ライトアクセスを実行している。MCPUloではこの
データ書込オペレージ、ンの最初のタイムスロットTI
の間に、MCPU内部RAM106から転送データ(R
AM206に書き込むべきデータ)を取り出す8次のタ
イムスロットT2でMCPUIOは5CPU内部RAM
206をアドレー、シングする。最後のタイムスロット
T3でMCPUIOは5CPU内部RAM20Bにライ
ト信号Cを与えてRAM206にデータを書き込む、5
CFU20偏にとってMCPUIOからの5CPUアク
セス信号りは5CPU20のオペレーション2がタイム
スロー7トST2に移るときはアクティブに変化してい
る。このオペレーション2は5CPU20のRAM20
6にある被演算数と演算数をALU部208または乗算
器210で演算するような命令のオペレーションであり
得る。MCPUloからの5CPUアクセスタイムの直
前のタイムスロットであるオペレージ1ン2の最初のタ
イムスロットSTIで5CPU20はRAM106から
演算数のデータを取り出し、そのデータをクロックTI
CKIにより演算数ラッチ106aにラッチしている0
MCPUl0からの5CPUアクセス信号りが発生しな
ければ、5CPU20は次のタイムスロットST2でR
AM106から被演算数を取り出して被演算数ラー7チ
10bにラッチし、最後のタイムスロットST3でAL
U部108または乗算器llOで演算を実行してRAM
106の被演算数レジスタに書き込む、実際には図示の
ようにオペレーション2の最初のタイムスロツ)STI
に続いてMCPUIOからの5CPUアクセス信号りが
発生している。この場合、1つの対策はオペレ−ジョン
2の残り2つのタイムスロットST2とST3で実行す
べき処理を5CPUアクセス信号りが除去されるまで、
即ちMCPUIOの5CPUアクセスオペレーシヨンが
軒下するまで中断することである。この方式でもMCP
UIOは5CPU20をアクセスするオペレーションを
最短時間(MCPUIOの内部RAM106をアクセス
するのと同じ時間)内に実行できるが、5CPU20に
とっては最適ではなくMCPUIOからの5CPUアク
セスオペレーシヨンの都度、5CPU20のオペレーシ
ョンがタイムスロット3つ分遅延されることになる。都
合のよいことに、MCPUIO(7)SCPUアクセス
オペレーションの最初のタイムスロットTIで実行され
る処理は5CPU20に影響を与えない処理である。こ
の特徴を利用し、実施例ではMCPUIOから5CPU
アクセス信号りが与えられても、MCPUlOのタイム
スロットTIの間は、5CPU20自身のオペレーショ
ンか継続できるようにして、5CPU20の動作遅れを
できるだけ短かくしている。第25図の例でいえば、5
CPU20はMCPU 10の5CPUデータ書込オペ
レーシヨンの最初のタイムスロットTIの間に、RAM
206から被演算数のデータを取り出し、ラッチ206
bにクロック5T2CK1を与えて被演算数をラッチさ
せている。その後、5CPUクロック発生回路236の
動作は5CPUアクセス信号りが除去されるまで停止し
、5CPU20は待ち状態に置かれる。そしてこの待ち
状態の間、5CPU20の要素128.264,240
.242は5CPUアクセス信号りにより“MCPU側
”に切り換えられ、MCPUloの5CPUデータ書込
オペレーンヨンにおけるタイムスロットT2、T3に関
する処理が実行されて5CPU内部RAM206にMC
PUIOからのデータが書き込まれる。
An operation example will be described with reference to FIG. 25. In this example, M
The CPUIO executes write access to the internal RAM 206 of the 5 CPU 20 while the 5 CPU access signal is at a high active level. In MCPUlo, the first time slot TI of this data write operation is
During this period, transfer data (R
At the 8th time slot T2 to retrieve data (to be written to AM206), MCPUIO writes data to the 5CPU internal RAM.
Add and sing 206. At the last time slot T3, MCPUIO gives write signal C to 5 CPU internal RAM 20B and writes data to RAM 206, 5
For CFU20, the 5CPU access signal from MCPUIO changes to active when operation 2 of 5CPU 20 moves to time slow 7 ST2. This operation 2 is 5 CPU 20 RAM 20
This may be an instruction operation in which the operands and operands in No. 6 are operated on by the ALU unit 208 or the multiplier 210. At the first time slot STI of operations 1 and 2, which is the time slot immediately before the 5 CPU access time from MCPUlo, the 5 CPU 20 retrieves the data of the operation number from the RAM 106 and uses the data as the clock TI.
0 latched in the arithmetic latch 106a by CKI
If the 5CPU access signal from MCPUl0 is not generated, the 5CPU20 will access R in the next time slot ST2.
The operand is taken out from AM106 and latched to the operand lar 7ch 10b, and the AL
The U unit 108 or the multiplier llO executes the operation and stores it in the RAM.
106 operand register (actually the first timeslot of operation 2 as shown) STI
Following this, a 5 CPU access signal from MCPUIO is generated. In this case, one countermeasure is to keep the processing to be executed in the remaining two time slots ST2 and ST3 of operation 2 until the 5 CPU access signals are removed.
That is, the 5 CPU access operations of MCPUIO are suspended until they are completed. Even with this method, MCP
UIO can execute operations that access 5 CPUs 20 within the shortest time (same time as accessing MCPUIO's internal RAM 106), but this is not optimal for 5 CPUs 20, and each time a 5 CPU access operation from MCPUIO occurs, the operation of 5 CPUs 20 increases in time. This will result in a delay of three slots. Conveniently, the process performed in the first time slot TI of the MCPUIO(7) SCPU access operation is a process that does not affect the 5 CPUs 20. By utilizing this feature, in the example, 5 CPUs are
Even if an access signal is given, the 5 CPU 20 is allowed to continue its own operation during the time slot TI of the MCPUIO, thereby minimizing the delay in the operation of the 5 CPU 20. In the example of Figure 25, 5
During the first time slot TI of a 5 CPU data write operation of MCPU 10, CPU 20 writes RAM
The data of the operand is taken out from the latch 206.
A clock 5T2CK1 is applied to b to latch the operand. Thereafter, the operation of the 5CPU clock generation circuit 236 is stopped until the 5CPU access signal is removed, and the 5CPU 20 is placed in a waiting state. During this wait state, elements 128,264,240 of 5 CPU20
.. 242 is switched to the "MCPU side" by the 5CPU access signal, and the processing related to time slots T2 and T3 in the 5CPU data write operation of MCPUlo is executed, and the MC is stored in the 5CPU internal RAM 206.
Data from PUIO is written.

MCPUIOからの5CPUアクセス信号りが除去され
ると、5CPUクロー、り発生回路236は動作を再開
し、クロックST3を“H”に変化させる1更に、5C
PUアクセス信号りの除去により、5CPU20の要素
128.204.240.242が“5CPU側”に戻
され、5CPU20自身の動作が可能な状態になる。そ
こで5CPU20はこのタイムスロットST3において
ALU部208または乗算器210の演算出力をRAM
20Bに書き込んでオペレーション2の残りの部分を実
行する。
When the 5CPU access signal from MCPUIO is removed, the 5CPU crawl generation circuit 236 resumes operation and changes the clock ST3 to "H".
By removing the PU access signal, the elements 128.204.240.242 of the 5 CPU 20 are returned to the "5 CPU side", and the 5 CPU 20 itself becomes operable. Therefore, the 5CPU 20 stores the calculation output of the ALU section 208 or the multiplier 210 in the RAM in this time slot ST3.
20B and perform the remainder of operation 2.

第25図のタイムチャートに示すように、5CPU20
の動作がMCPUIOからの5CPUアクセスオペレー
シヨンの都度、中断される時間はタイムスロット2つ分
だけである。
As shown in the time chart of Fig. 25, 5 CPU20
The operation is interrupted for only two time slots for each 5 CPU access operation from MCPUIO.

なお、MCPUIOが5CPU20の内部RAM206
からデータを読み出すリードアクセスオペレーションの
場合、そのタイムスロットT2でMCPUIOは5CP
tT内部RAM206をアドレッシングし、タイムスロ
ットT3でMCPU内部RAM106をアドレッシング
して5CPU内部RAM206からのデータをバスゲー
)132を介してMCPU内部RAM106に取り込む
In addition, MCPUIO is 5CPU20 internal RAM206
For a read access operation to read data from
tT addresses the internal RAM 206, addresses the MCPU internal RAM 106 at time slot T3, and takes data from the 5CPU internal RAM 206 into the MCPU internal RAM 106 via the bus 132.

以上のように、瞬時強制アクセス方式によればMCPU
IOは5CPU20の内部RAM206に対するアクセ
スをMCPU自身のRAM106に対するアクセスと同
様に最短時間内で実行でき 待ち時間命令を実行する必
要がない。更に瞬時強制アクセス方式によれば、5CP
U20のオペレーションヲ途中で中断し、MCPUIO
の5CPUアクセスオペレーシヨン後に、中断されたと
ころからオペレーションを再開できる。したがって、M
CPUIOは5CPU20に対するアクセスに先立って
5CPU20の状態を検査する必要はなく、任意のとき
に、例えば、インタラプト処理ルーチン(第5図)中で
も自由に5CPU20をアクセスすることができる。
As described above, according to the instantaneous forced access method, the MCPU
IO can access the internal RAM 206 of the 5 CPU 20 within the shortest possible time in the same way as access to the MCPU's own RAM 106, and there is no need to execute a waiting time instruction. Furthermore, according to the instantaneous forced access method, 5CP
The U20 operation was interrupted midway and the MCPUIO
After 5 CPU access operations, the operation can be resumed from where it was interrupted. Therefore, M
The CPUIO does not need to check the state of the 5 CPU 20 before accessing the 5 CPU 20, and can freely access the 5 CPU 20 at any time, for example, during the interrupt processing routine (FIG. 5).

く共用メモリアクセス競合解消機能(第26、第27図
、第1図)〉 第1図において外部メモリ90は複数のCPU、即ちM
CPUIOと5CPU20に共用されるデータメモリで
ある。したがって外部データメモリ90に対する複数の
アクセス、即ち、MCPUIOからの外部データメモリ
90アクセスと、5CPU20かもの外部データメモリ
90アクセスをサポートする手段が必要である。更に、
外部データメモリ90を共用化する場合においてMCP
UIOと5CPU20とが外部データメモリ90を同時
にアクセスを試みることを許容するのが望まれる。MC
PUIOと5CPU20との間で外部データメモリ90
に対する使用権(トークン)を交換する機能を設けるこ
とにより、MCPUIOと5CPU20が同時には外部
データメモリ90をアクセスしないようにすることもで
きるが、トークンの手続は外部データメモリアクセスの
ための準備時間を占めるので、外部データメモリアクセ
スに要するトータルの時間が長くなり、効率的でない、
一方、MCPUIOと5CPU20による外部データメ
モリ90の同時アクセスを許容する場合、メモリ90自
体は物理的に同時アクセス不能であるので、同時アクセ
スによるアクセス競合を解消する手段が必要となる。
Shared memory access conflict resolution function (Figs. 26, 27, and 1)> In Fig. 1, the external memory 90 is connected to multiple CPUs,
This is a data memory shared by CPUIO and 5 CPUs 20. Therefore, a means is needed to support multiple accesses to external data memory 90, ie, external data memory 90 accesses from MCPUIO and external data memory 90 accesses by five CPUs 20. Furthermore,
When sharing the external data memory 90, the MCP
It is desirable to allow the UIO and five CPUs 20 to attempt to access external data memory 90 at the same time. M.C.
External data memory 90 between PUIO and 5 CPU 20
By providing a function to exchange usage rights (tokens) for MCPUIO and 5CPU 20, it is possible to prevent the MCPUIO and 5CPU 20 from accessing the external data memory 90 at the same time, but the token procedure reduces the preparation time for accessing the external data memory. occupies the external data memory, the total time required to access the external data memory increases, making it inefficient.
On the other hand, when allowing simultaneous access to the external data memory 90 by the MCPUIO and the 5 CPUs 20, since the memory 90 itself cannot be physically accessed at the same time, a means is required to resolve access conflicts caused by simultaneous access.

これらの手段を実現するため、第1図に示すようにMC
PUIOからの外部メモリアドレス情報はアドレスバス
MA、MCPU外部メモリアドレスラッチ30M、アド
レス切り換え回路40、アドレス変換回路60を介して
外部メモリ90のアドレス入力に結合されており、外部
メモリ90からのデータ出力はデータ変換回路70.M
CPU外部メモリデータラッチ80M、データバスMD
を介してMCPUIOに結合されている。一方、5CP
U20からの外部メモリアドレス情報はアドレスバスS
A、5CPU外部メモリアドレスチッチ30S、アドレ
ス切り換え回路40、アドレス変換回路60を介して外
部メモリ90のアドレス入力に結合されており、外部メ
モリ90からのデータ出力はデータ変換回路70、SC
PU外部メモリデータラッチ80S、データバスSDを
介して5CPU20に結合されている。そして、MCP
UIOと5CPU20からの外部データメモリアクセス
要求を表わす信号MCPU−romaとSCPU−ro
maを受けるメモリ装δ競合回避回路50により、上記
MCPU外部メモリアドレスラッチ30Mは、SCPU
外部メモリアドレスチッチ305、アドレス切り換え回
路40、MCPU外部メモリデータラッチ80M、SC
PU外部メモリデータラッチ80Sが制御されるように
なっている。このメモリ装置競合回避回路50に上述し
たアクセスの競合を回避する機能が含まれている。
In order to realize these means, as shown in Figure 1, MC
External memory address information from PUIO is coupled to the address input of external memory 90 via address bus MA, MCPU external memory address latch 30M, address switching circuit 40, and address conversion circuit 60, and data output from external memory 90. is the data conversion circuit 70. M
CPU external memory data latch 80M, data bus MD
is coupled to MCPUIO via. On the other hand, 5CP
External memory address information from U20 is sent to address bus S.
A, 5 CPU external memory address switch 30S, address switching circuit 40, and address conversion circuit 60 are connected to the address input of external memory 90. Data output from external memory 90 is connected to data conversion circuit 70, SC
The PU external memory data latch 80S is coupled to the 5 CPU 20 via the data bus SD. And M.C.P.
Signals MCPU-roma and SCPU-ro representing external data memory access requests from UIO and 5CPU 20
The memory device δ contention avoidance circuit 50 receiving the MCPU external memory address latch 30M
External memory address switch 305, address switching circuit 40, MCPU external memory data latch 80M, SC
The PU external memory data latch 80S is controlled. This memory device conflict avoidance circuit 50 includes a function to avoid the above-mentioned access conflict.

第26図にメモリ装置競合回避回路50のブロック図を
示し、第27図にアクセスの競合に対する動作のタイム
チャートを示す。
FIG. 26 shows a block diagram of the memory device conflict avoidance circuit 50, and FIG. 27 shows a time chart of operations regarding access conflicts.

第26図において、メモリ装置競合回避回路50には入
力としてMCPUIOからのアクセス要求信号MCPU
−roma、5CPU20からのアクセス要求信号SC
PU−roma、更に、MCPUリセット信号MRES
及び5CPUリセット信号5RES (第1図において
図示省略)が結合する。M’CPUリセット信号MRE
Sはセットリセット回路(R−Sフリップフロップ)5
02とその出力に結合するセー、トリセット回路506
をリセットし、信号MCPU−romaは、セットリセ
ット回路502をセットする。セットリセット回路50
2はMCPUIOからのアクセス要求を一時記憶し、出
力側セットリセット回路506はセット状態において、
MCPUIOからのアクセス要求が受は付けられて外部
メモリデータアクセス制御信号発生回路510を介して
アクセスのオペレーションが実行中であることを示す、
同様に5CPUリセット信号5RESはセー、トリセッ
ト回路504とその出力に結合するセットリセット回路
508をリセットし、信号5CPU−r omaはセッ
トリセット回路504をセットする。セー、トリセット
回路504は5CPU20からのアクセス要求を一時記
憶し、出力側セットリセット回路508はセット状態に
おいて5CPU20からのアクセス要求が受は付けられ
アクセスのオペレーションが実行中であることを示す。
In FIG. 26, the memory device contention avoidance circuit 50 receives an access request signal MCPU from MCPUIO as an input.
-roma, access request signal SC from 5 CPU 20
PU-roma, furthermore, MCPU reset signal MRES
and 5CPU reset signal 5RES (not shown in FIG. 1) are coupled. M'CPU reset signal MRE
S is set-reset circuit (R-S flip-flop) 5
02 and a reset circuit 506 coupled to its output.
The signal MCPU-roma sets the set-reset circuit 502. Set reset circuit 50
2 temporarily stores the access request from MCPUIO, and the output side set reset circuit 506 is in the set state.
Indicates that the access request from MCPUIO has been accepted and the access operation is being executed via the external memory data access control signal generation circuit 510;
Similarly, the 5CPU reset signal 5RES resets the reset circuit 504 and the set reset circuit 508 coupled to its output, and the signal 5CPU-roma sets the set reset circuit 504. The reset circuit 504 temporarily stores the access request from the 5 CPU 20, and the output side set reset circuit 508 indicates in the set state that the access request from the 5 CPU 20 has been accepted and the access operation is being executed.

詳細に述べると、MCPUアクセス要求セットリセット
回路502のセット状態の出力“H″は5CPUアクセ
ス実行セー、トリセット回路508がセット状態でない
ことを条件として、即ち、SCPU20のアクセスオペ
レーションが実行中でないことを条件として(低入力が
508からのインへ−夕522を介した反転入力に結合
するANDゲート524を介して)MCPUアクセス実
行セットリセット回路506をMCPUアクセス実行状
態にセットし、このMCPUアクセス実行セットリセッ
ト回路506をセットする信号により、ORゲー)51
2 (低入力がリセット信号MRESに結合する)を介
してMCPUアクセス要求セットリセット回路502を
リセットする。同様に、5CPUアクセス要求セットリ
セット回路504のセット状態の出力“H″はMCPU
アクセス実行セットリセ、ト回路506がセット状態で
ないことを条件として、即ちMCPUIOのアクセスオ
ペレーションが実行中でないことを条件として、(低入
力の1つが506からのインへ−タ520を介した反転
入力に結合するANDゲート526)を介して5CPU
アクセス実行セットリセット回路508を5CPUアク
セス実行状態にセットし、この5CPUアクセス実行セ
ットリセット回路508をセットする信号により、OR
ゲ−)516 (低入力がリセット信号5RESに結合
する)を介して5CPUアクセス要求セットリセット回
路504をリセットする0以上の構成により、片方のC
PU(例えば5CPU20)からアクセス要求があって
も、他方のCPU(MCPU l O)に関するアクセ
スオペレーションか実行中のときは、その実行が完了す
るまではアクセスを要求したCPU (SCPU20)
に関するアクセスオペレーションは実行されない、これ
により、アクセスの競合が基本的に回避される。
In detail, the output "H" of the set state of the MCPU access request set reset circuit 502 indicates that the 5 CPU access is being executed, provided that the triset circuit 508 is not in the set state, that is, the access operation of the SCPU 20 is not being executed. sets the MCPU access execution set reset circuit 506 to the MCPU access execution state (via an AND gate 524 where a low input is coupled to an inverted input from 508 to an inverting input via input 522); By the signal that sets the set reset circuit 506, the OR game) 51
2 (low input is coupled to reset signal MRES) to reset the MCPU access request set reset circuit 502. Similarly, the set state output “H” of the 5CPU access request set reset circuit 504 is
Access Execution Set Reset, provided that the access circuit 506 is not in the set state, i.e., that no access operation of the MCPUIO is in progress (one of the low inputs is connected to the inverting input from the input circuit 506 via the input circuit 520). 5CPU through AND gate 526)
The access execution set reset circuit 508 is set to the 5 CPU access execution state, and by the signal that sets the 5 CPU access execution set reset circuit 508, the OR
516 (low input is coupled to reset signal 5RES) by a configuration of 0 or more that resets the 5CPU access request set reset circuit 504 through the
Even if there is an access request from a PU (for example, 5 CPU 20), if an access operation related to the other CPU (MCPU 1 O) is being executed, the access requesting CPU (SCPU 20) will wait until the execution is completed.
No access operations are performed, which essentially avoids access conflicts.

更に、MCPUIO,!−3CPU20とが完全に同時
仁アクセスを要求する場合がある。このアクセス競合に
対し、実施例では、MCPUIOからのアクセス要求を
優先させ、MCPUIOのアクセスオペレーションを実
行してから、5CPU20のアクセスオペレーションを
実行している。このために、MCPUアクセス要求セ−
/ )リセット信号502がセット状態のときはその出
力信号“H”によりインバータ525を介してANDゲ
−)526を禁止しており、セットリセット回路502
がセット中のときは5CPUアクセス要求セットリセ−
2ト回路504がセット状態でも5CPUアクセス実行
セットリセット回路508がセットされないようにして
いる。
Furthermore, MCPUIO,! -3 CPUs 20 may request completely simultaneous access. In response to this access conflict, in the embodiment, priority is given to the access request from MCPUIO, and after the access operation of MCPUIO is executed, the access operation of 5 CPUs 20 is executed. For this purpose, the MCPU access request
/) When the reset signal 502 is in the set state, the output signal "H" inhibits the AND gate () 526 via the inverter 525, and the set reset circuit 502
When is being set, 5CPU access request set reset
The 5-CPU access execution set reset circuit 508 is prevented from being set even if the 2-to-1 circuit 504 is set.

外部メモリデータアクセス制御信号発生回路510は、
セットリセット回路506と508からの出力に結合し
、いずれかのセットリセット回路の出力がセット状態“
H”に変化すると、そのセット状態が示すCPUアクセ
スのオペレーションを一連のシーケンスで実行する。外
部メモリデータアクセス制御信号発生回路510から出
力される信号CEとOEは外部メモリ7からデータを出
力するための制御信号であり、信号MDLはMCPU外
部メモリデータラッチ80Mに外部メモリ90からのデ
ータをラッチするための制御信号であり、信号SDLは
5CPU外部メモリデータラッチ805に外部メモリ9
0からのデータをラッチするための制御信号である。外
部メモリデータアクセス制御信号発生回路510はアク
セスオペレーションの実行を終了するとEND信号を発
生する。このEND信号により、セット状態にあったア
クセス実行セットリセy ト回路はリセットされる。即
ち、END信号は低入力がセットリセット回路506の
出力に結合するANDゲート528と低入力がMCPU
リセット信号MRESに結合するORゲート514を介
してセットリセット回路506のリセット入力に結合し
、また低入力がセットリセット回路50Bの出力に結合
するANDゲート530と低入力が5CPUリセット信
号5RESに結合するORゲート518を介してセット
リセット回路508のリセット入力に結合する。
The external memory data access control signal generation circuit 510 includes:
is coupled to the outputs from set-reset circuits 506 and 508 such that the output of either set-reset circuit is in the set state "
When it changes to "H", the CPU access operation indicated by the set state is executed in a series of sequences.The signals CE and OE output from the external memory data access control signal generation circuit 510 are used to output data from the external memory 7. The signal MDL is a control signal for latching data from the external memory 90 into the MCPU external memory data latch 80M, and the signal SDL is a control signal for latching data from the external memory 90 into the 5 CPU external memory data latch 805.
This is a control signal for latching data starting from 0. The external memory data access control signal generation circuit 510 generates an END signal when the execution of the access operation is completed. This END signal causes the access execution set reset circuit that was in the set state to be reset. That is, the END signal is connected to an AND gate 528 whose low input is coupled to the output of the set-reset circuit 506 and whose low input is coupled to the output of the MCPU.
It is coupled to the reset input of the set-reset circuit 506 via an OR gate 514 that is coupled to the reset signal MRES, and an AND gate 530 whose low input is coupled to the output of the set-reset circuit 50B and whose low input is coupled to the 5CPU reset signal 5RES. It is coupled to the reset input of set-reset circuit 508 via OR gate 518 .

5CPUアクセス実行セットリセー、ト回路508の出
力はインバータ532を介してアドレス切り換え回路4
0に対するアドレス選択信号MSELを発生する。した
がって、アドレス切り換え回路40は、5CPU20の
アクセスオペレーションが実行中のときに、5CPU外
部メモリアクセス用アドレスラッチ305からの5CP
Uアトレスを選択し、その他の場合はMCPU外部メモ
リアクセス用アドレスラッチ30MからのMCPUアド
レスを選択する。
5 The output of the CPU access execution set reset and reset circuit 508 is sent to the address switching circuit 4 via the inverter 532.
An address selection signal MSEL for 0 is generated. Therefore, the address switching circuit 40 receives the 5CP from the 5CPU external memory access address latch 305 while the 5CPU 20 access operation is being executed.
The U address is selected, and in other cases, the MCPU address from the MCPU external memory access address latch 30M is selected.

第27図の場合、MCPUIOと5CPU20は″MC
PUオペL/−シHンf) r o m a”、“5C
PUオペレージ、ンのroma”に示すように同時に外
部メモリ90に対するアクセスを要求している。このr
 oma命令のオペレーションにおいて、MCPUIO
はアドレスバスMAにアドレス情報を送出し、信号M 
CP U −r o m aを出力してMCPU外部メ
モリアクセス用アドレスラー。
In the case of Figure 27, MCPUIO and 5CPU20 are "MC
PU operation
The PU operation requests access to the external memory 90 at the same time as shown in "roma".
In the operation of the oma instruction, the MCPUIO
sends address information to the address bus MA and outputs the signal M
Addresser for MCPU external memory access by outputting CPU roma.

チ30Mにアドレス情報をラッチさせ、同様に5CPU
20はアドレスバスSAにアドレス情報を送出し、信号
SCPU−romaを出力しテ5cPU外部メモリアク
セス用アドレスチッチ305にアドレス情報をラッチさ
せる6同時に発生するMCPU−roma信号とSCP
U−roma@号により、メモリ装置競合回避回路50
のMCPUアクセス要求セットリセット回路502と5
CPUアクセス要求セットリセット回路504は同時に
セットされる。これに対し、上述したMCPUアクセス
優先論理に従い、MCPUアクセス実行セットリセット
回路50Bがただちにセット状態に変化し、それにより
外部メモリデータアクセス制御信号発生回路510が外
部メモリ90に対するMCPUIOのアクセスオペレー
ジ、ンを実行する。この時点でアドレス切り換え回路4
0はMCPUIOからのアドレス情報を選択している。
The address information is latched on the chip 30M, and the 5CPU
20 sends the address information to the address bus SA, outputs the signal SCPU-roma, and causes the 5 cPU external memory access address switch 305 to latch the address information 6.
Memory device contention avoidance circuit 50 by U-roma@ issue
MCPU access request set reset circuits 502 and 5
The CPU access request set reset circuit 504 is set at the same time. On the other hand, according to the MCPU access priority logic described above, the MCPU access execution set reset circuit 50B immediately changes to the set state, thereby causing the external memory data access control signal generation circuit 510 to perform the MCPUIO access operation to the external memory 90. Execute. At this point, address switching circuit 4
0 selects address information from MCPUIO.

MCPUIOのアクセスオペレーションの期間を142
7図の左方の期間1で示す(なお、回路510は2相の
マスタークロー、りCKI、CK2で動作するが、第2
6図では図示を省略しである)、外部メモリデータアク
セス制御信号発生回路510は期間nでチップイネーブ
ル信号CEをローアクティブにし、期間nの後半の期間
mで出力イネーブル信号OEをローアクティブする。し
たがって、この期間mにおいて外部メモリ90からMC
PUIOが要求したデータが出力され、この期間m内に
外部メモリデータアクセス要求信号発生回路510から
発生する信号MDLにより、この出力データがMCPU
外部メモリデータラッチ80Mにラッチされる。これに
より、外部メモリデータアクセス要求信号発生回路51
0のMCPUIOのためのアクセスオペレージ璽ンは完
了するので、回路510はエンド信号ENDを出力する
。これにより、MCPUアクセス実行セ実行セラトリセ
フ506はリセットされ、代りに5CPUアクセス実行
セットリセット回路508がセットされる。これにより
信号MSELは5CPUアドレス選択を示す“L″レベ
ル変化し、アドレス切り換え回路40は5CPU20か
らのアドレスを選択して外部メモリ90をアドレッシン
グする。更に、5CPUアクセス実行セットリセット回
路508からの七−21信号に応答して外部メモリデー
タアクセス制御信号発生回路510が5CPU20のた
めのアクセスオペレーションを実行する。この期間を第
27図の右側の期間見で示す、このオペレージ、ンにお
いて外部メモリデータアクセス制御信号発生回路510
は信号CE゛をローアクティブにし、その後半の期間p
で信号OEをローアクティブにして5CPU20の要求
したデータを外部メモリ90から出力させ、その出力中
に信号SDLを発生してSCPU外部メモリデータラッ
チ805に5CPU20の要求したデータをラッチさせ
る。これにより、外部メモリデータアクセス制御信号発
生回路510の5CPU20のためのアクセスオペレー
ジ、ンは完了するので同回路510はエンド信号END
を出力して5CPUアクセス実行セットリセット回路5
08をリセット状態に戻す。
Set the period of MCPUIO access operation to 142
(Note that the circuit 510 operates with two-phase master claws, CKI, and CK2, but the second
(not shown in FIG. 6), the external memory data access control signal generation circuit 510 makes the chip enable signal CE low active during period n, and makes the output enable signal OE low active during period m in the latter half of period n. Therefore, during this period m, the MC is stored from the external memory 90.
The data requested by PUIO is output, and the signal MDL generated from the external memory data access request signal generation circuit 510 within this period m causes this output data to be sent to the MCPU.
It is latched into external memory data latch 80M. As a result, external memory data access request signal generation circuit 51
Since the access operation for MCPUIO 0 is complete, circuit 510 outputs an end signal END. As a result, the MCPU access execution set reset circuit 506 is reset, and the 5 CPU access execution set reset circuit 508 is set instead. As a result, the signal MSEL changes to "L" level indicating selection of the 5 CPU address, and the address switching circuit 40 selects the address from the 5 CPU 20 to address the external memory 90. Further, in response to the 7-21 signal from the 5 CPU access execution set reset circuit 508, the external memory data access control signal generation circuit 510 executes an access operation for the 5 CPU 20. This period is shown in the period view on the right side of FIG. 27. During this operation, the external memory data access control signal generation circuit 510
makes the signal CE゛ low active, and during the latter half of the period p
The signal OE is activated low to cause the data requested by the 5CPU 20 to be output from the external memory 90, and during the output, the signal SDL is generated to cause the SCPU external memory data latch 805 to latch the data requested by the 5CPU 20. As a result, the access operation for the 5 CPUs 20 of the external memory data access control signal generation circuit 510 is completed, so the circuit 510 outputs the end signal END.
Outputs 5CPU access execution set reset circuit 5
08 to the reset state.

これ以降、MCPUIOと5CPU20はそれぞれデー
タバスMD、SDに乗っている外部メモリデータラッチ
80M、805の出力データを読むことにより、要求し
たデータを得ることができる。
After this, MCPUIO and 5CPU 20 can obtain the requested data by reading the output data of external memory data latches 80M and 805 on data buses MD and SD, respectively.

このようにして各CPUl0.20はr oma命令(
外部メモリアクセス要求命令)を実行後。
In this way, each CPU10.20 executes the roma instruction (
After executing an external memory access request instruction).

メモリ装置競合回避回路50が両CPUのためのアクセ
スオペレージ、ンを実行する所定の期間2皇だけ待てば
要求したデータを得ることができ。
The requested data can be obtained by waiting a predetermined period during which the memory device contention avoidance circuit 50 executes access operations for both CPUs.

アクセス競合の問題が解消される。更に、待機時間が一
定(2文)なので、各CPUl0120はこの期間を他
の命令の実行に使用することができ、プログラム命令の
実行効率が最適化される。
The problem of access contention is resolved. Furthermore, since the waiting time is constant (2 statements), each CPU 10120 can use this period to execute other instructions, optimizing the execution efficiency of program instructions.

なお、MCPU−roma@号とSCPU−roma@
号のタイミング関係がその他のタイミング関係となる場
合については図示を省略しているが、いかなる場合でも
、各CPUl0120はr oma命令を実行後、所定
の期間2文待てばその時点で既に各CPUの外部データ
ラッチには要求したデータがラッチされているので、そ
のデータの入手が可能である。
In addition, MCPU-roma@ and SCPU-roma@
Cases in which the timing relationship of the number is another timing relationship are omitted from illustration, but in any case, after each CPU10120 executes the roma instruction, if it waits for two sentences for a predetermined period, each CPU's timing relationship has already been established. Since the requested data is latched in the external data latch, the data can be obtained.

くアドレス・データ変換ハードウェア(第28〜第32
図、141図)〉 一般に、CPUを含むマイクロコンピュータシステムに
おいて、データメモリにある原データから演算用メモリ
上に原データを変換したデータ(原データから抽出され
る所望の情報)を作成することかしばしば望まれる。特
にこの種のデータは変換はデータメモリの記憶容量を効
率的に使用したような場合にその補償として必要になる
。この目的のため、従来では、データメモリから演算用
メモリへの転送命令を実行して、データメモリの原デー
タを演算用メモリに移し、次に1以上の変換命令を実行
して、演算用メモリにあるデータをALUを介して変換
する。したがって、従来の場合、演算用メモリ上に所望
のデータを得るためのデータ変換手続に時間がかかり、
高速処理が要求されるアプリケーションにおける障害の
1つとなっている。
address/data conversion hardware (28th to 32nd
In general, in a microcomputer system including a CPU, converting the original data (desired information extracted from the original data) from the original data in the data memory to the calculation memory is a process. often desired. Particularly for this type of data, conversion is necessary to compensate for efficient use of the storage capacity of the data memory. For this purpose, conventionally, a transfer instruction from the data memory to the calculation memory is executed to move the original data in the data memory to the calculation memory, and then one or more conversion instructions are executed to transfer the original data from the data memory to the calculation memory. Converts the data in the ALU via the ALU. Therefore, in the conventional case, the data conversion procedure to obtain the desired data on the calculation memory takes time;
This is one of the obstacles in applications that require high-speed processing.

本実施例ではCPUl0120がデータメモリである外
部メモリ90から演算用メモリである内部RAM106
または206にデータを転送する命令(r oma命令
)を実行するだけで、所望の変換が施されたデータが内
部RAM106.206に読み込まれるようにして、デ
ータ変換処理の高速化を図っている。この目的を実現す
るため、CPUl0120と外部メモリ90との間のア
ドレス径路上にアドレス変換回路60が設けられ、また
外部メモリ90とCPUl0120との間のデータ径路
上にデータ変換回路70が設けられ、各変換回路60.
70はroma命令の実行時にCPUl0120から与
えられる制御信号に応答して所望の変換を実行する。
In this embodiment, the CPU 10120 is connected from the external memory 90, which is a data memory, to the internal RAM 106, which is a calculation memory.
Alternatively, simply by executing an instruction (roma instruction) to transfer data to the internal RAM 106 or 206, the desired converted data is read into the internal RAM 106 or 206, thereby speeding up the data conversion process. To achieve this purpose, an address conversion circuit 60 is provided on the address path between the CPU 10120 and the external memory 90, and a data conversion circuit 70 is provided on the data path between the external memory 90 and the CPU 10120. Each conversion circuit 60.
70 executes a desired conversion in response to a control signal given from CPU 10120 when executing the roma instruction.

第28図に外部メモリアクセス命令r omaのリスト
を示す、第1の命令romaoは変換なしの転送命令で
あり、これに対し、アドレス変換回路60はCPUl0
120から与えられる入力アドレスをそのまま出力アド
レスとして外部データメモリ90に通し、データ変換回
路70も外部データメモリ90からのデータ(16ビツ
トデータ)を無変換で通してCPUl0120に渡す。
FIG. 28 shows a list of external memory access instructions roma. The first instruction romao is a transfer instruction without conversion, whereas the address translation circuit 60
The input address given from the external data memory 90 is directly passed to the external data memory 90 as an output address, and the data conversion circuit 70 also passes the data (16-bit data) from the external data memory 90 to the CPU 10120 without conversion.

この無変換転送命令romaOではCPUl0120か
ら変換回路60.70に与えられる変換制御用の信号R
1,R2,R3はいずれもL”レベルとなる。
In this non-conversion transfer instruction romaO, the conversion control signal R given from the CPU10120 to the conversion circuit 60.70
1, R2, and R3 are all at L'' level.

第2の命令romalは特殊波形の読み出しに適した命
令である。この命令に対し、アドレス変換回路60はC
PUl0120から送られてきた入力アトレスの第13
ピツ)A12が“0”のときは下位12ビツトを無変換
で通すが第13ビツトA12が1″′のときは下位12
ビツトを反転させる。なお、アドレス変換回路60の出
力アドレスの第13ビツトは入力アドレスの第13ビツ
トA12の値にかかわらず“0″に固定される。
The second instruction romal is an instruction suitable for reading a special waveform. In response to this instruction, the address conversion circuit 60
The 13th input address sent from PUl0120
(Pitsu) When A12 is "0", the lower 12 bits are passed through without conversion, but when the 13th bit A12 is 1'', the lower 12 bits are passed through without conversion.
Invert the bits. Note that the 13th bit of the output address of the address conversion circuit 60 is fixed to "0" regardless of the value of the 13th bit A12 of the input address.

また、この命令に対し、データ変換回路70はCPUl
0120から送られてきた入力アドレスの第13ビツト
A12をCPUl0120に送るデータの第13ビツト
D12とするとともにA12が“l”のとき下位の12
ビツトデータを反転する形式で外部メモリ90からのデ
ータを変換する。したがって、外部メモリ90のアドレ
ス領域0000〜0FFFに第28図に示すような有効
データビー2ト数12の特殊波形データ(ooo。
In addition, in response to this instruction, the data conversion circuit 70
The 13th bit A12 of the input address sent from 0120 is set as the 13th bit D12 of the data sent to CPU10120, and when A12 is "L", the lower 12
The data from the external memory 90 is converted in a format that inverts the bit data. Therefore, the special waveform data (ooo) having 12 valid data beats (2 beats) as shown in FIG.

〜0FFF)があるとすると、CPUl0120がこの
命令を指定アドレス0000−IFFFの範囲について
繰り返し実行した場合に、アドレス変換回路60から出
力される外部メモリアドレスはいったん0000から0
FF−Fに進み、この間、データ変換回路70は外部メ
モリ90からのデータをそのまま通し、その後、アドレ
ス変換回路60の反転動作により、外部メモリ9oへの
アドレスは0FFFからooooに後進し、この間、デ
ータ変換回路70は外部メモリ9oから出力されるデー
タの下位12ビツトを反転し、第1゛3データピツ)D
12を“!”にして変換されたデータを出力する。結局
、CPUl0120がアドレスを0000〜LF F 
Fに動かして命令r。
~0FFF), when the CPU10120 repeatedly executes this instruction for the specified address range 0000-IFFF, the external memory address output from the address conversion circuit 60 will once change from 0000 to 0.
The process proceeds to FF-F, during which time the data conversion circuit 70 passes the data from the external memory 90 as it is, and then, due to the inversion operation of the address conversion circuit 60, the address to the external memory 9o is reversed from 0FFF to oooo, during this time, The data conversion circuit 70 inverts the lower 12 bits of the data output from the external memory 9o,
12 is changed to "!" and the converted data is output. In the end, CPU10120 changed the address from 0000 to LF F
Move to F and command r.

malを繰り返し実行した場合に、CPUl0120が
実際に受は取る波形は第28図のr omalの欄の右
方に示すような波形となる。この変換波形ぽ左方に示す
外部メモリ90内の原波形を所定の態様で延長した繰り
返し波形(アドレス、0FFF、データ0FFFの点に
ついて対称な波形)である、この結果、記憶容量の点に
一つぃていうと、゛変換波形のデータ自体を予め外部デ
ータメモリ90に記憶させる方式に比べ、波形データ記
憶容量が半分になる利点がある。この命令r omal
の場合、制御信号R1、R2、R3のうちR1のみが“
H″レベルなる。
When mal is repeatedly executed, the waveform actually received by the CPU 10120 is the waveform shown on the right side of the column romal in FIG. This converted waveform is a repetitive waveform (a waveform that is symmetrical about the address, 0FFF, and data 0FFF points) that is obtained by extending the original waveform in the external memory 90 shown on the left in a predetermined manner. In other words, compared to a method in which the converted waveform data itself is stored in advance in the external data memory 90, there is an advantage that the waveform data storage capacity is halved. This command r omal
In this case, only R1 among the control signals R1, R2, and R3 is “
It becomes H'' level.

第3の命令ROMA2は外部メモリデータの一部(半語
)の読み出しを指示する命令である。この命令の場合、
R2のみが“H″ルベルなる。
The third instruction ROMA2 is an instruction to read a part (half word) of external memory data. For this command,
Only R2 becomes "H" level.

外部データメモリ90の1アドレス(1語)当りの記憶
容量は16ビツトである。この命令roma2に対し、
データ変換回路70は、CPUl0120からのアドレ
スの第16ビツトA15が0”のときは、外部データメ
モリ90からの16ビツトデータのうち、下位の8ビツ
トを残し、上位の8ビツトを“0”にマスクする変換を
実行し、A15がl″のときは外部データメモリ90か
ら16ビー7トデータのうち、上位の8ビツトを下位8
ビツトにシフトする(残った上位8ビツトはマスク)変
換を実行する。また、データ変換回路70において入力
アドレスの第16ビツ)A15を制御信号として使用し
ているので、アドレス変換回路60ではA15の値にか
かわらず出力アドレスの第16ビツトを所定値〒0”に
マスクする。なお、この場合において外部データメモリ
90か6の16ビツト情帷の上位8ビツトと下位ビット
との関係は、1つのデータ(例えば位相データ)におけ
る上位データ部分(例えば整数S)と下位データ部分(
例えば小数部)のような関係であってもよいし、異なる
2種類の8ビツトデータ(例えばレートデータとレベル
データ)の各々であるような独立な関係であってもよい
The storage capacity of one address (one word) of external data memory 90 is 16 bits. For this command roma2,
When the 16th bit A15 of the address from the CPU 10120 is 0, the data conversion circuit 70 leaves the lower 8 bits of the 16-bit data from the external data memory 90 and sets the upper 8 bits to 0. When A15 is l'', the upper 8 bits of the 16-bit data from the external data memory 90 are converted to the lower 8 bits.
Shift to bits (remaining upper 8 bits are masked) conversion is executed. In addition, since the data conversion circuit 70 uses the 16th bit (A15) of the input address as a control signal, the address conversion circuit 60 masks the 16th bit of the output address to a predetermined value 〒0'' regardless of the value of A15. In this case, the relationship between the upper 8 bits and lower bits of the 16-bit information in the external data memory 90 or 6 is that the upper data part (for example, integer S) and the lower data part in one data (for example, phase data) part(
For example, it may be a relationship such as a decimal part), or it may be an independent relationship such as two different types of 8-bit data (for example, rate data and level data).

第4の命令ROMA3は外部メモリデータをシフトして
一部を読み出す命令である。この命令の場合、R3のみ
が“H″レベルなる。この命令に対し、データ変換回路
70は外部メモリ90からの16ビツトデータのうち、
bit15はそのままにして上位12ビツトのbit1
5〜bit゛4をbit14〜bit3にシフトし、下
位の3ビツトbit2〜bitOを0にマスクする変換
を行う、ここに、外部メモリ90の16ビツトデータの
うち上位12ビウトは例えばb f t 15を符号ビ
ットとする波形データであり、下位4ビツトは別のデー
タを表わす、この場合ζ゛上記変換ニヨリ、CPUl0
120は内部RAM106゜206上で使用するのに適
したフォーマ−2トの波形デー タを高速に読み取るこ
とができる。
The fourth instruction ROMA3 is an instruction to shift external memory data and read a part of it. In the case of this instruction, only R3 becomes "H" level. In response to this command, the data conversion circuit 70 converts the 16-bit data from the external memory 90 into
Leave bit 15 as is and use bit 1 of the upper 12 bits.
5 to bit 4 are shifted to bit 14 to bit 3, and the lower 3 bits bit 2 to bit O are masked to 0. Here, the upper 12 bits of the 16 bit data in the external memory 90 are, for example, b f t 15. is the waveform data with the sign bit as the sign bit, and the lower 4 bits represent other data. In this case, ζ
120 can read waveform data in a format suitable for use on the internal RAM 106 and 206 at high speed.

第29図にアドレス変換回路60のブロック図を示・す
、このアドレス変換回路60にはMCPUloまたは5
CPU20から7ドレスラツチ30M、30S、アドレ
ス切り換え回路40を介して入力される16ビツトのア
ドレスのうち、下位12ビヤト(b i t O〜bi
tll)が詳細を第30図に示す反転回路610に入力
される。この反転回路610は信号R1が命令roma
−1を表わす“l”でアγレスのA12が” 、!、 
”のときANDゲート612から−の信号により動作し
て入力されるアドレスの下位12ビツトを反転させる。
FIG. 29 shows a block diagram of the address translation circuit 60.
Of the 16-bit address input from the CPU 20 via the 7 address latches 30M and 30S and the address switching circuit 40, the lower 12 bits (bit O to bi
tll) is input to an inverting circuit 610 whose details are shown in FIG. This inverting circuit 610 inputs the signal R1 as the command roma.
A12 of Aγless is "l" which represents -1",!,
'', it is operated by a negative signal from the AND gate 612 to invert the lower 12 bits of the input address.

また、命令rom’alの実行時に“l”・となる信号
R1はインバータ602を介、して、ANDゲート60
4を禁止し、入力アドレスのA12の値にかかわらず出
力アドレスの対応ピッ)(bit−12)を′0”にす
−る、・入力アドレスの−AI−3とA14はそのまオ
出力フ′十゛レスの対応ビ、ット・(b、lit13.
bit14)として出力される。入力アドレスのA15
(MSB)はANDゲート608を介して出力アドレス
の対応ピッ)(bit15)となる、命令roma2の
実行中を表わす“1″の信号R2が発生しているとき、
この信号R2がインバータ606を介してANDゲート
608を禁止して出力アドレスのbit15(MSB)
を“0″にマスクする。
Further, the signal R1 which becomes "L" when the instruction ROM'AL is executed is passed through the AND gate 60 through the inverter 602.
4 is prohibited, and the corresponding bit (bit-12) of the output address is set to '0' regardless of the value of A12 of the input address. -AI-3 and A14 of the input address are output as is. '10-less corresponding bit (b, lit13.
bit14). Input address A15
(MSB) is the corresponding bit of the output address via the AND gate 608 (bit 15), when the signal R2 of "1" indicating that the instruction roma2 is being executed is generated.
This signal R2 inhibits the AND gate 608 via the inverter 606 and outputs bit 15 (MSB) of the address.
is masked to “0”.

したがってアドレス変換回路60は、S変換命令r o
 m a Oとシフト読み出し命令roma3に対して
はR1=”0″、R2;0”なので入力アドレスを出力
アドレスとしてそのまま通し、特殊波形読出し命令ro
malに対してはR1=“1″なので出力アドレスのb
it12を“0″にマスクし、A12=“1″の間尺転
回路610により入力アドレスの下位12ピツ)(bi
t。
Therefore, the address conversion circuit 60 uses the S conversion instruction r o
For m a O and shift read command roma3, R1="0", R2; 0", so the input address is passed as is as an output address, and the special waveform read command ro
Since R1="1" for mal, the output address b
It12 is masked to "0", and the lower 12 bits of the input address) (bi
t.

〜bitll)を反転して出力アドレスとする。~bitll) is inverted and used as the output address.

更に、一部読み出し命令roma2に対してはR2−“
l”なので出力アトレスのbit15をθ″′にマスク
する。このようにして、第28図に関して述へたアドレ
ス変換回路の機能が実現される。
Furthermore, for the partial read instruction roma2, R2-“
l'', so bit 15 of the output address is masked to θ'''. In this way, the function of the address conversion circuit described with reference to FIG. 28 is realized.

第31図にデータ変換回路70のブロック図を示し、第
32図にその詳細を示す、これらの図においてデータ入
力は第1図の外部メモリ90から供給されるデータであ
る。第32図において、入力データの上位8ビー2トに
結合する3状態ゲ一ト回路702と入力データの下位8
ビツトに結合する3状態ゲ一ト回路704は出力するデ
ータの下位8ビツトとして入力データのL位8ビy )
を選択するが、入力データの下位8ビツトを選択するか
を決めるためのものである。R2=″1″(r oma
2命令)でA15=1のとき、ANDゲート706の“
1”出力信号とその反転信号であるインバータ708の
出力信号“0″によりゲート回路702が導通し、ゲー
ト回路704がオフして入力データの上位8ビツトが出
力データの下位8ビツトとして選択される。その他の場
合は、ゲート回路702かオフし ゲート回路704が
導通するので入力データの下位8ビツトがそのまま出力
データの下位8ビツトとして出力される。更にR2=“
1”  (roma2命令)のときは、入力データの上
位8ビツトに結合するANDゲート回路710が禁止さ
れて出力データの上位8ビツトを“0”にマスクする。
FIG. 31 shows a block diagram of the data conversion circuit 70, and FIG. 32 shows its details. In these figures, data input is data supplied from the external memory 90 of FIG. In FIG. 32, a 3-state gate circuit 702 coupled to the upper 8 bits of the input data and a 3-state gate circuit 702 coupled to the lower 8 bits of the input data
The 3-state gate circuit 704 coupled to the bit outputs the L-order 8 bits of the input data as the lower 8 bits of the output data.
This is to determine whether to select the lower 8 bits of input data. R2=″1″(roma
2 instructions), when A15=1, the AND gate 706 “
1" output signal and its inverted signal, the output signal "0" of the inverter 708, makes the gate circuit 702 conductive, turns off the gate circuit 704, and selects the upper 8 bits of the input data as the lower 8 bits of the output data. In other cases, the gate circuit 702 is turned off and the gate circuit 704 is conductive, so that the lower 8 bits of the input data are output as they are as the lower 8 bits of the output data.Furthermore, R2="
1" (roma2 instruction), the AND gate circuit 710 that connects to the upper 8 bits of input data is inhibited and the upper 8 bits of output data are masked to "0".

即ち、R2=“1″のときはインバータ712とNOR
ゲート714を介して禁止信号がANDゲート回路71
Oに加わってANDゲート回路710における入力デー
タ上位8ビツトの通過が阻止される。また、ANDゲー
ト回路710における入力データの上位3ビツトと結合
するANDゲート素子はR1=“1″ (romal命
令)のときにNORゲート714を介して禁止され、出
力データの上位3ビツトをO”にマスクする。
That is, when R2="1", inverter 712 and NOR
The inhibit signal is passed through the gate 714 to the AND gate circuit 71
In addition to this, the upper 8 bits of the input data in the AND gate circuit 710 are prevented from passing through. Furthermore, the AND gate element connected to the upper 3 bits of the input data in the AND gate circuit 710 is inhibited via the NOR gate 714 when R1="1" (romal instruction), and the upper 3 bits of the output data are to mask.

EX−ORゲート回路716は入力データの下位12ビ
ツトを選択的に反転するための回路である。EX−OR
ゲート回路716はR1=“l”(romal命令)で
A12=1のとき、ANDゲート718からの反転信号
“1”により、下位12ビツトデータを反転し、その他
の場合は下位12ビツトデータをそのまま通す0回路7
10内のANDゲート素子を介して入力データのbit
12に結合する状態ゲート722はR1=“1”(ro
mal命令)のときに、信号R1に結合するインバータ
720を介して与えられる信号“0″によりオフし、代
りに、A12に結合する3状態ゲート724が信号R1
によって導通して出力データのbit12を発生する。
EX-OR gate circuit 716 is a circuit for selectively inverting the lower 12 bits of input data. EX-OR
When R1=“l” (romal instruction) and A12=1, the gate circuit 716 inverts the lower 12 bits of data according to the inversion signal “1” from the AND gate 718, and otherwise leaves the lower 12 bits of data unchanged. Pass 0 circuit 7
bits of input data through AND gate elements within 10
State gate 722 coupled to R1=“1”(ro
mal instruction), is turned off by signal "0" provided through inverter 720 coupled to signal R1, and instead tri-state gate 724 coupled to A12 switches off signal R1.
It becomes conductive and generates bit 12 of the output data.

シフトマスク回路726は選択的に入力されたデータの
bit15〜bit4を出力データのbit 14〜b
it3にシフトし、出力データのbit2〜bi10を
“0″にマスクするための回路であり、R3=“1″ 
(r oma3命令)のとき信号R3に結合するインバ
ータ728からの信号“1″によってこの変換を実行す
る。
The shift mask circuit 726 selectively converts bits 15 to 4 of the input data to bits 14 to b of the output data.
This is a circuit for shifting to it3 and masking bit2 to bi10 of the output data to "0", and R3="1"
This conversion is performed by a signal "1" from inverter 728 coupled to signal R3 when (roma3 instruction).

したがって、データ変換回路70は、無変換命令rom
ao (R1=R2=R3=“0″)のときは、入力さ
れる16ビツトデータをそのまま通し、特殊波形読み出
し命仝romal (R1=“1″)のときは入力アト
レスの−L位4ビット(bit15〜bft12)がo
ooo”(A12二〇のとき)か“0001″ (AI
2=1のとき)かによって、出力データの下位12ビツ
トをそのまま入力データの下位12ど一/ )とする(
A12=0のとき)か、或は、出力データの下位12ビ
ツトを入力データの下位12ビツトが反転されたデータ
となる(AI2=1)ようにデータ変換を行い、一部読
み出し命令roma2(R2−“1″)のときは出力デ
ータの上位8ビツトがオールゼロで、出力データの下位
8ビツトが入力データの下位8ビウトとなるように(A
15=0のとき)、或は、出力データの上位8ビツトが
オールゼロで、出力データの下位8ビツトが入力データ
の上位8ビツトとなる(A15=1のとき)ようにデー
タ変換を行い、シフト読み出し命令roma3 (R3
=1)+7)ときは出力データの下位3ビツト(bit
O−bit2)がオールゼロで、出力データのbit3
〜bj t 14が入力データのbi t4〜bjt1
5で、出力データのb i t 15 (MSB)が入
力データのbit15(MSB)となるようにデータ変
換を行う、このようにして第28図で述べたデータ変I
e!機能が達成されている。
Therefore, the data conversion circuit 70 converts the non-conversion instruction ROM
When ao (R1=R2=R3="0"), the input 16-bit data is passed through as is, and when the special waveform read command is romal (R1="1"), the -L-order 4 bits of the input address are passed through. (bit15-bft12) is o
ooo” (when A1220) or “0001” (AI
When 2 = 1), the lower 12 bits of the output data are used as they are, depending on which lower 12 bits of the input data.
When A12 = 0), or convert the lower 12 bits of the output data into data in which the lower 12 bits of the input data are inverted (AI2 = 1), and issue a partial read command roma2 (R2 -“1”), the upper 8 bits of the output data are all zeros, and the lower 8 bits of the output data are the lower 8 bits of the input data (A
15 = 0), or perform data conversion so that the upper 8 bits of the output data are all zeros and the lower 8 bits of the output data become the upper 8 bits of the input data (when A15 = 1), and shift Read command roma3 (R3
= 1) + 7), the lower 3 bits of the output data
O-bit2) is all zero, and bit3 of the output data
~bj t 14 is input data bit t4 ~ bjt1
In step 5, data conversion is performed so that bit 15 (MSB) of the output data becomes bit 15 (MSB) of the input data.In this way, the data conversion I described in FIG.
e! functionality has been achieved.

以上により、アドレス変換回路60とデータ変換回路7
0とを設けたことによる利点は明らかである。即ち、C
PUl0.20にとって、データメモリである外部メモ
リ90に対するアクセス命令r oznaを実行するだ
けで、回路60と70の変!i!Ill&能により、所
望の変換が施されたデータをただちに得ることがで5.
従来のように、外部メモリ90のデータを演算用メモリ
である内部RAM106.206にいったん取り込んだ
後に、ALU部108.208のようなALUを介して
変換を実行する必要がなく、処理が高速化される利点が
ある。
As described above, the address conversion circuit 60 and the data conversion circuit 7
The advantage of providing 0 is obvious. That is, C
For PU10.20, simply executing the access instruction rozna to the external memory 90, which is data memory, changes the circuits 60 and 70! i! 5. Data with the desired transformation can be obtained immediately by Ill& function.
Unlike conventional methods, there is no need to once import the data in the external memory 90 into the internal RAM 106.206, which is the calculation memory, and then execute conversion via an ALU such as the ALU unit 108.208, resulting in faster processing. There is an advantage that

なお、第28図に示したアクセス命令r o m aの
リストは例示にすぎず、拡張、変更は容易である。
Note that the list of access commands r o m a shown in FIG. 28 is merely an example, and can be easily expanded and changed.

<DACサンプリング(第33、第34図)〉本実施例
においてDAC100はMCPUIOと5CPU20が
生成したデジタル楽音信号をアナログ楽音信号に変換す
るものである。第5図の5−5に示すように、MCPU
IOはタイマインタラプト処理ルーチンのなかで、MC
PUIOと5CPU20が生成したデジタル楽音信号の
サンプルをDAC100にセットする。この処理5−5
の実行間隔は平均としてはタイマインタラプト発生部1
16の発生するインタラプト信号INTの発生間隔に等
しいが、実際の実行間隔はプログラム動作のために変動
する。したがって、処理5−5の実行間隔をD/A変換
の変換周期としてD/A変換を行ったとするとアナログ
楽音信号に大きな歪みが生じてしまう。
<DAC Sampling (FIGS. 33 and 34)> In this embodiment, the DAC 100 converts the digital musical tone signal generated by the MCPUIO and the 5 CPU 20 into an analog musical tone signal. As shown in 5-5 in Figure 5, the MCPU
IO is performed by MC in the timer interrupt processing routine.
A sample of the digital musical tone signal generated by the PUIO and the 5CPU 20 is set in the DAC 100. This process 5-5
The average execution interval of timer interrupt generator 1 is
16, but the actual execution interval varies due to program operations. Therefore, if D/A conversion is performed using the execution interval of process 5-5 as the conversion period of D/A conversion, a large distortion will occur in the analog musical tone signal.

第33図に右DAC100Rまたは左DAC100Lの
構成例を示す、第33図の(A)に示す構成では、処理
5−5の実行時に、MCPUIOのオペレージ、ン制御
回路112の制御の下に、内部RAM106内の波形加
算用レジスタが指足され、そこに記憶されている最新の
デジタル楽音データが取り出され、データバスに乗せら
れる。
FIG. 33 shows an example of the configuration of the right DAC 100R or the left DAC 100L. In the configuration shown in FIG. 33(A), when processing 5-5 is executed, the internal The waveform addition register in the RAM 106 is added, and the latest digital musical tone data stored therein is taken out and placed on the data bus.

そして、データバスにデジタル楽音データが乗っている
タイミングでラッチ1004のクロック入力にストロー
ブ用のプログラム制御信号がオペレーション制御回路1
12から与えられデータバス上のデータがセットされ、
ラッチ1004から新しいデジタル楽音データがD/A
変換器1002に入力される。したがって、第34S(
A)に示すように、D/A変換器1002に入力される
デジタル楽音データはプログラム制御のために不安定な
周期で切り換わることになる。D/A変換器1002の
変換周期(サンプリング周期)は非常に安定していなけ
れば、その変換において大きな歪みが発生する。
Then, at the timing when the digital musical tone data is on the data bus, a strobe program control signal is input to the clock input of the latch 1004 to the operation control circuit 1.
12 and the data on the data bus is set,
New digital musical tone data from latch 1004 is D/A
It is input to converter 1002. Therefore, the 34th S (
As shown in A), the digital musical tone data input to the D/A converter 1002 is switched at an unstable cycle due to program control. Unless the conversion period (sampling period) of the D/A converter 1002 is very stable, large distortions will occur in the conversion.

この問題は第33図(B)に示すような構成をとること
により解決される。すなわち、オペレーション制御回路
112からのプログラム制御信号によって制御されるソ
フト制御ラッチ1004と、デジタル楽音信号をアナロ
グ楽音信号に変換するD/A変換器1002との間に、
インタラプト発生部116からの正確なタイミング信号
であるインタラプト信号INTで制御されるインタラプ
ト制御ラッチ1006を設ける。インタラプト信号の発
生周期はクロック発振器の安定度に従うので極めて安定
である。ラー、チ1006の出力はインタラプト信号の
タイミングに同期して切り換わる。すなわち、インタラ
プト信号の発生周期がD/A変換器1002の変換(サ
ンプリング)周期となる。第33図(B)の構成に対す
るタイムチャートを第34図(B)に示す0図示のよう
に、ラッチ1004の出力が切り換わるタイミングはイ
ンタラプト処理に移行するタイミングのずれや、該イン
タラプト処理に要する時間(斜線部の長さ)によって変
動するがインタラプト信号で動作するラッチ1006が
あるのでD/A変換器1002の入力データが切り換る
タイミングはインタラプト信号と同期する。これにより
、第33図(A)の構成における歪み問題が解決される
This problem can be solved by adopting a configuration as shown in FIG. 33(B). That is, between the soft control latch 1004 controlled by the program control signal from the operation control circuit 112 and the D/A converter 1002 that converts the digital musical tone signal into an analog musical tone signal,
An interrupt control latch 1006 is provided which is controlled by an interrupt signal INT, which is a precise timing signal from the interrupt generating section 116. The generation period of the interrupt signal follows the stability of the clock oscillator, so it is extremely stable. The output of the driver and driver 1006 is switched in synchronization with the timing of the interrupt signal. That is, the generation cycle of the interrupt signal becomes the conversion (sampling) cycle of the D/A converter 1002. The timing chart for the configuration of FIG. 33(B) is shown in FIG. 34(B), and as shown in FIG. Although it varies depending on time (the length of the shaded part), since there is a latch 1006 that operates with the interrupt signal, the timing at which the input data of the D/A converter 1002 switches is synchronized with the interrupt signal. This solves the distortion problem in the configuration of FIG. 33(A).

以上で実施例の説明を絆えるがこの発明の範囲を逸脱す
ることなく種々の変形、変更が可能である。
Although the embodiments have been described above, various modifications and changes can be made without departing from the scope of the present invention.

[発明の効果] 以上詳細に説明したように、この発明のデジタルマイク
ロコンピュータでは、メインプログラムモードで実行さ
れるメインプログラムからインタラプト処理ルーチンに
渡すための複数のデータの書込処理をインタラプト信号
をマスクすることによって保証しているのでインタラプ
トルーチンは常に正しいデータを受けて正しい処理を実
行することができる。
[Effects of the Invention] As explained in detail above, in the digital microcomputer of the present invention, the interrupt signal is masked during the writing process of multiple data to be passed from the main program executed in the main program mode to the interrupt processing routine. This ensures that the interrupt routine always receives the correct data and executes the correct processing.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明を適用した電子楽器用処理装この全体
構成図 第2図は第1図のMCPUのブロー、り同第3図は第1
図の5CPUのブロック図、第4図はMCPUの実行す
るメインプログラムのフローチャート 第5図はMCPUの実行するインタラプト処理ルーチン
のフローチャート、 第6図は5CPUの実行するプログラムのフローチャー
ト、 第7図は音源処理のフローチャート、 第8図は時間の経過に沿う実施例の動作のプローチ1;
−ト、 第9図はチャンネル音源処理のフローチャート、 第10図は波形データを示す図、 第11図は音源処理用RAMテーブルを示す図、 第12図は5CPtJ動作開始終了機能に関係する回路
のブロック図、 第13図、第14図、$15図は第12図の回路の動作
のタイムチャート、 第16図はインタラプトマスク機能を有する回路のブロ
ック図、 第17図はインタラプトマスク方式によるエンヘロープ
設定処理のフローチャート 第18図は単一命令で複数のデータを転送する間インタ
ラプト信号によるメインプログラムの中断を禁止する機
能を有する回路のブロック図第19図は複数のデータを
単一命令で転送するのに適したRAMのメモリマツプ例
を示す図第20図は複数の転送命令による動作と単一の
転送命令による動作とを比較して示す図第21図は単一
転送命令方式によるエンヘロープ設定処理のフローチャ
ート 第22図は5CPUの停止モード利用によるMCPUか
らの5CPUアクセス機能を説明するのに用いたフロー
チャート、 第23図は5CPUに対する瞬時強制アクセス機能を有
するMCPUのブロー、り図、第24図は5CPUに対
する瞬時強制アクセス機能に適合する5CPUのブロッ
ク図 第25図はMCPUから5CPUの内部RAMにデータ
を書き込む場合の動作のタイムチャート 第26図は第1図のメモリ装置競合回避回路のブロー、
り図、 第27図は第26図の回路の動作のタイムチャート、 第28図は外部メモリからのデータを変換して取り込む
命令を含む外部メモリアクセス命令のリストを示す図、 第29図は第1図のアドレス変換回路のブロック図、 第30図は第29図の反転回路の回路図、第31図は第
1図のデータ変換回路のブロック図、 第32図はデータ変換回路の回路図、 第33図は第1図のDACのサンプリング周期が不安定
になる構成とサンプリング周期を安定化した構成とを比
較して示す図、 第34図はDACのサンプリング周期が不安定な場合の
タイムチャートと安定な場合のタイムチャートとを比較
して示す図である。 10・・・・・・MCPU  (CPU)116・・・
・・・インタラプト発生部(インタラプト発生手段) 114・・・・・・ROMアドレス制御部(CPUモー
ド制御手段) 102・・・・・・制御用ROM 112・・・・・・オペレーション制御回路150・・
・・・・マスク解除特機部 102.112.150・・・・・・(インタラプトマ
スク手段)
Fig. 1 is an overall configuration diagram of an electronic musical instrument processing device to which the present invention is applied.
Figure 4 is a flowchart of the main program executed by the MCPU. Figure 5 is a flowchart of the interrupt processing routine executed by the MCPU. Figure 6 is a flowchart of the program executed by the 5CPU. Figure 7 is the sound source. Processing flowchart, FIG. 8 is approach 1 of the operation of the embodiment over time;
- Figure 9 is a flowchart of channel sound source processing, Figure 10 is a diagram showing waveform data, Figure 11 is a diagram showing a RAM table for sound source processing, and Figure 12 is a diagram of the circuit related to the 5CPtJ operation start and end function. Block diagram: Figures 13, 14, and 15 are time charts of the operation of the circuit in Figure 12. Figure 16 is a block diagram of a circuit with an interrupt mask function. Figure 17 is envelope setting using the interrupt mask method. Processing flowchart Figure 18 is a block diagram of a circuit that has the function of prohibiting interruption of the main program due to an interrupt signal while multiple data are transferred using a single instruction. FIG. 20 is a diagram showing an example of a memory map of a RAM suitable for the following. FIG. 20 is a diagram showing a comparison between operations using multiple transfer instructions and operations using a single transfer instruction. FIG. 21 is a flowchart of envelope setting processing using the single transfer instruction method. Figure 22 is a flowchart used to explain the 5CPU access function from the MCPU using the 5CPU stop mode, Figure 23 is a flowchart of the MCPU with the instantaneous forced access function to the 5CPU, and Figure 24 is a flowchart for the 5CPU. A block diagram of the 5 CPUs that is compatible with the instantaneous forced access function. Figure 25 is a time chart of the operation when data is written from the MCPU to the internal RAM of the 5 CPUs. Figure 26 is a block diagram of the memory device contention avoidance circuit shown in Figure 1.
27 is a time chart of the operation of the circuit in FIG. 26, FIG. 28 is a diagram showing a list of external memory access instructions including instructions to convert and import data from external memory, and FIG. 1, FIG. 30 is a circuit diagram of the inversion circuit shown in FIG. 29, FIG. 31 is a block diagram of the data conversion circuit shown in FIG. 1, FIG. 32 is a circuit diagram of the data conversion circuit, Figure 33 is a diagram comparing the configuration in Figure 1 in which the DAC sampling cycle is unstable and the configuration in which the sampling cycle is stabilized. Figure 34 is a time chart when the DAC sampling cycle is unstable. It is a figure which compares and shows the time chart in a stable case. 10...MCPU (CPU)116...
... Interrupt generation section (interrupt generation means) 114 ... ROM address control section (CPU mode control means) 102 ... Control ROM 112 ... Operation control circuit 150.・
...Mask release special unit 102.112.150... (Interrupt mask means)

Claims (1)

【特許請求の範囲】 メインプログラムを実行するメインプログラムモードと
インタラプト処理ルーチンを実行するインタラプトモー
ドとを有するCPUと、 インタラプト信号を発生するインタラプト発生手段と、 前記インタラプト信号に応答して前記CPUで実行中の
メインプログラムを中断して前記CPUのモードを前記
インタラプトモードに切替制御するCPUモード制御手
段と、 を有するデジタルマイクロコンピュータにおいて、 前記CPUの前記メインプログラムモードにおいて複数
のデータをインタラプト処理用メモリに書き込み、前記
インタラプトモードにおいてこのインタラプト処理用メ
モリに記憶される前記複数のデータを参照する手段と、 前記メインプログラムモードにおいて前記手段によりイ
ンタラプト処理用メモリに対する前記複数のデータの書
込処理が実行されている間、前記インタラプト信号をマ
スクすることにより前記CPUモード制御手段の動作を
禁止して前記書込処理の中断を禁止するインタラプトマ
スク手段と、を有することを特徴とするデジタルマイク
ロコンピュータ。
[Scope of Claims] A CPU having a main program mode for executing a main program and an interrupt mode for executing an interrupt processing routine; interrupt generating means for generating an interrupt signal; and execution by the CPU in response to the interrupt signal. CPU mode control means for interrupting a main program in the CPU and controlling the mode of the CPU to be switched to the interrupt mode, the digital microcomputer having: a plurality of data stored in the interrupt processing memory in the main program mode of the CPU; means for writing and referring to the plurality of data stored in the interrupt processing memory in the interrupt mode; and writing processing of the plurality of data to the interrupt processing memory is executed by the means in the main program mode. interrupt masking means for inhibiting the operation of the CPU mode control means by masking the interrupt signal during the writing process, and for inhibiting interruption of the write processing.
JP2170163A 1990-06-29 1990-06-29 Digital microcomputer Pending JPH0460722A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2170163A JPH0460722A (en) 1990-06-29 1990-06-29 Digital microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2170163A JPH0460722A (en) 1990-06-29 1990-06-29 Digital microcomputer

Publications (1)

Publication Number Publication Date
JPH0460722A true JPH0460722A (en) 1992-02-26

Family

ID=15899853

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2170163A Pending JPH0460722A (en) 1990-06-29 1990-06-29 Digital microcomputer

Country Status (1)

Country Link
JP (1) JPH0460722A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5283386A (en) * 1991-08-30 1994-02-01 Casio Computer Co., Ltd. Musical-tone signal generating apparatus and musical-tone controlling apparatus including delay means and automatic reset means

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5283386A (en) * 1991-08-30 1994-02-01 Casio Computer Co., Ltd. Musical-tone signal generating apparatus and musical-tone controlling apparatus including delay means and automatic reset means

Similar Documents

Publication Publication Date Title
US5691493A (en) Multi-channel tone generation apparatus with multiple CPU&#39;s executing programs in parallel
US5319151A (en) Data processing apparatus outputting waveform data in a certain interval
US5584034A (en) Apparatus for executing respective portions of a process by main and sub CPUS
US6477177B1 (en) Multiple device access to serial data stream
JPS62115542A (en) Information processor
JP2797137B2 (en) Processing equipment for electronic musical instruments
JPH0460722A (en) Digital microcomputer
US4644841A (en) Electronic musical instrument
JPH0460746A (en) Digital microcomputer
US6314485B1 (en) Automatic status register
EP0376342B1 (en) Data processing apparatus for electronic musical instruments
JPH0460744A (en) Digital microcomputer
JPH0460723A (en) Digital microcomputer
JPH0460724A (en) Digital microcomputer
JPH0460725A (en) Digital microcomputer
JPH0460749A (en) Digital microcomputer
US6122697A (en) System for extending the width of a data bus
JP2797138B2 (en) Processing equipment for electronic musical instruments
JP2576613B2 (en) Processing equipment
JP3888236B2 (en) Program counter circuit
KR100324597B1 (en) Bit Stream Processor
JP2763655B2 (en) Semiconductor integrated circuit
JP2521535B2 (en) Data transfer circuit
JP3474347B2 (en) Instruction decoding unit of microcomputer
JPH03204695A (en) Musical sound synthesizing device