JPH0460744A - Digital microcomputer - Google Patents

Digital microcomputer

Info

Publication number
JPH0460744A
JPH0460744A JP2170165A JP17016590A JPH0460744A JP H0460744 A JPH0460744 A JP H0460744A JP 2170165 A JP2170165 A JP 2170165A JP 17016590 A JP17016590 A JP 17016590A JP H0460744 A JPH0460744 A JP H0460744A
Authority
JP
Japan
Prior art keywords
cpu
data
signal
address
sub
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
JP2170165A
Other languages
Japanese (ja)
Inventor
Koichiro Oki
広一郎 太期
Ryuji Usami
隆二 宇佐美
Kosuke Shiba
斯波 康祐
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 JP2170165A priority Critical patent/JPH0460744A/en
Publication of JPH0460744A publication Critical patent/JPH0460744A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To speed up access between CPU by providing a function discriminating, detecting or specifying the period of the stop state of sub-CPU on a main CPU-side in an electronic musical instrument and the like having plural CPU. CONSTITUTION:A master central processing unit (MCPU) 10, a slave central processing unit (SCPU) 20, a timer interruption generation means, a sub-CPU mode control means and a sub-CPU mode discrimination means are provided in the electronic musical instrument and the like. MCPU 10 controls the input/ output device and executes a sound source processing. SCPU 20 executes the sound source processing. MCPU 10 and SCPU 20 execute the sound source processing in parallel by timer interruption. SCPU 20 is shifted to a reset state when an operation terminates and transmits a termination signal to MCPU 10. MCPU 10 accesses to an internal memory by the termination signal while SCPU 20 stops and reads a waveform which SCPU 20 generates.

Description

【発明の詳細な説明】 [発明の技術分野] この発明はデジタルマイクロコンピュータに関し、特に
並列動作可能な複数のCPUを有するデジタルマイクロ
コンピュータに関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a digital microcomputer, and more particularly to a digital microcomputer having a plurality of CPUs that can operate in parallel.

[発明の背景] 複数のCPUを有するデジタルマイクロコンピュータは
既知である。一般に、CPUの複数化はコンピュータシ
ステムの性能を上げることをねらいとしている。残念な
がら、CPUの個数をN儒にしたからといって、システ
ムの性能なCPUが1個の場合のN倍に上げることはで
きない。
BACKGROUND OF THE INVENTION Digital microcomputers having multiple CPUs are known. Generally, the purpose of providing multiple CPUs is to improve the performance of a computer system. Unfortunately, even if the number of CPUs is increased to N, the performance of the system cannot be increased to N times that of a system with one CPU.

複数のCPUのデジタルマイクロコンピュータの性能を
低下させる原因の1つとして、CPU間のアクセスの問
題がある。
One of the causes of degrading the performance of a digital microcomputer with multiple CPUs is the problem of access between the CPUs.

従来においてCPU間のアクセスは次のようにして行わ
れる。まず、アクセスを要求するCPUが要求されるC
PUに対し、アクセス要求信号を送る。これに対し、ア
クセス要求信号を受けたCPUは実行中のオペレーショ
ンを完了し、しかる後、内部のメモリを外部の装置(こ
の場合、アクセスを要求したCPU)がアクセス可能な
状況に開放するとともに、アクセスを要求したCPUに
対し承認信号を送って停止状態に移行する。アクセスを
要求したCPUはこの承認信号を受けた後、相手のCP
Uの内部メモリに対する実際のアクセスオペレーション
を実行する。
Conventionally, access between CPUs is performed as follows. First, the CPU requesting access
Sends an access request signal to the PU. On the other hand, the CPU that receives the access request signal completes the operation being executed, and then releases the internal memory so that it can be accessed by an external device (in this case, the CPU that requested access). It sends an approval signal to the CPU that requested access and transitions to a stopped state. After receiving this approval signal, the CPU that requested access
Performs the actual access operation to U's internal memory.

したがって、従来のCPU間のアクセス方式はアクセス
の手続に時間がかかる問題が・ある、特に、CPU間で
高い頻度のアクセスが要求されるような環境では、アク
セス処理がネックとなってCPUの動作効率が著しく低
下してしまう。
Therefore, the conventional access method between CPUs has the problem that the access procedure takes a long time.Especially in an environment where frequent access between CPUs is required, access processing becomes a bottleneck for CPU operation. Efficiency will drop significantly.

[発明の目的] したがって、この発明の目的はCPU間のアクセスを高
速に処理可能な複数のCPUを有するデジタルマイクロ
コンピュータを提供することである。
[Object of the Invention] Therefore, an object of the present invention is to provide a digital microcomputer having a plurality of CPUs that can process access between CPUs at high speed.

[発明の構成、作用] この発明によれば、メインCPUと、少なくとも1つの
サブCPUと、動作開始信号を発生する動作開始信号発
生手段と、前記動作開始信号に応答して前記サブCPU
のモードを停止状態からプログラムを実行する動作状態
に切替制御し、前記プログラムの実行終了に応答して前
記サブCPUを再び停止状態に復帰制御するサブCPU
モード制御手段と、前記メインCPU内に設けられ、前
記サブCPUモード制御手段によって制御される前記サ
ブCPUのモードが停止状態にあるかどうかを判別する
サブCPUモード判別手段と、前記メインCPU内に設
けられ、前記サブCPUモード判別手段の判別により前
記サブCPUのモードが停止状態にある間において、前
記サブCPUの内部メモリをアクセスするサブCPUア
クセス手段とを有することを特徴とするデジタルマイク
ロコンピュータが提供される。
[Structure and operation of the invention] According to the present invention, a main CPU, at least one sub CPU, an operation start signal generating means for generating an operation start signal, and an operation start signal generating means for generating an operation start signal, and an operation start signal generating means for generating an operation start signal.
a sub-CPU that controls switching of the mode of the sub-CPU from a stopped state to an operating state in which a program is executed, and controls the sub-CPU to return to the stopped state in response to completion of execution of the program;
a mode control means, a sub CPU mode determination means provided in the main CPU and for determining whether the mode of the sub CPU controlled by the sub CPU mode control means is in a stopped state; and sub-CPU access means for accessing an internal memory of the sub-CPU while the mode of the sub-CPU is in a stopped state as determined by the sub-CPU mode discrimination means. provided.

この構成の基本的な特徴は、メインCPU側に、サブC
PUが停止状態である期間を判別する機能が設けられて
いることである。メインCPUはサブCPUが停止状態
のときにサブCPUの内部メモリをアクセスするので、
従来のように、サブCPUにアクセスを要求し、サブC
PUからのアクセス承認を待つ必要はなく、高速に(メ
インCPU自身の内部メモリをアクセスするのと同様の
仕方で)サブCPUの内部メモリをアクセスできる。
The basic feature of this configuration is that a sub CPU is installed on the main CPU side.
A function is provided to determine the period during which the PU is in a stopped state. Since the main CPU accesses the internal memory of the sub CPU when the sub CPU is in a stopped state,
As in the past, access is requested to the sub-CPU, and the sub-C
There is no need to wait for access approval from the PU, and the sub-CPU's internal memory can be accessed quickly (in the same manner as the main CPU's own internal memory is accessed).

好ましい構成例において、メインCPUと、少なくとも
1つのサブCPUと、所定時間の経過ごとにタイマイン
タラプト信号を発生するインタラプト発生手段と、前記
タイマインタラプト信号に応答して前記メインCPUに
おいて実行中のメインプログラムを中断して前記メイン
CPUのモードをインタラプト処理ルーチンを実行する
モードに切替制御し、前記インタラプト処理ルーチンの
実行終了に応答して中断されたメインプログラムを再開
して前記メインCPUのモードをメインプログラムを実
行するモードに復帰制御するメインCPUモード制御手
段と、前記タイマインタラプト信号に応答して前記サブ
CPUのモードを停止状態からプログラムを実行するモ
ードに切替制御し、前記プログラムの実行終了に応答し
て前記サブCPUのモードを再び停止状態に復帰制御す
るサブCPUモード制御手段と、前記サブCPUモード
制御手段内に設けられ、前記サブCPUのモードを表わ
す信号を発生するサブCPUモード信号発生手段と、前
記メインCPU内に設けられ、前記サブCPUモード信
号発生手段からの前記信号を受け取って前記サブCPU
のモードを検出するサブCPUモード検出手段と、前記
メインCPU内に設けられ、前記サブCPUモード検出
手段が前記サブCPUの停止状態を検出している間にお
いて、前記サブCPUの内部メモリをアクセスするサブ
CPUアクセス手段とを有することを特徴とするデジタ
ルマイクロコンピュータが提供される。
In a preferred configuration example, a main CPU, at least one sub-CPU, interrupt generation means for generating a timer interrupt signal every predetermined time period, and a main program being executed in the main CPU in response to the timer interrupt signal. The mode of the main CPU is switched to a mode for executing an interrupt processing routine, and in response to the completion of execution of the interrupt processing routine, the interrupted main program is restarted and the mode of the main CPU is changed to a mode for executing an interrupt processing routine. main CPU mode control means for controlling a return to a mode for executing a program; and a main CPU mode control means for controlling switching of a mode of the sub CPU from a stopped state to a mode for executing a program in response to the timer interrupt signal, and responding to completion of execution of the program. sub-CPU mode control means for controlling the mode of the sub-CPU to return to a stopped state again; and sub-CPU mode signal generation means, provided in the sub-CPU mode control means, for generating a signal representing the mode of the sub-CPU; , provided in the main CPU, receiving the signal from the sub CPU mode signal generating means and transmitting the signal to the sub CPU.
sub-CPU mode detection means for detecting a mode of the sub-CPU; and a sub-CPU mode detection means provided in the main CPU, accessing an internal memory of the sub-CPU while the sub-CPU mode detection means detects a stopped state of the sub-CPU. A digital microcomputer is provided, characterized in that it has a sub-CPU access means.

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

く概 要〉 本実施例はこの発明を電子楽器に適用したものである0
本実施例(第1〜第34図)は種々の特徴を含んでいる
。第1の特徴は、楽音信号を生成する音源としてプログ
ラムで動作する複数のマイクロコンピュータ処理装置(
CPU)を使用することであり、従来のような専用構造
のハードウェア音源は不要である。1つのCPUがメイ
ンCPUあるいはマスターCPU(10)として働き、
音源処理のみでなくアプリケーション(この場合、楽器
)に従う入力装置(鍵盤、機能キー等)、出力装置(D
AC等)を取り扱う(第4図、第5図)、他のCPUは
マスターCPUに対してサブCPUないしスレーブCP
U (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 that multiple microcomputer processing units (
CPU), and there is no need for a dedicated hardware sound source like in the past. One CPU acts as the main CPU or master CPU (10),
Input devices (keyboards, function keys, etc.) and output devices (D
AC, etc.) (Figures 4 and 5), and other CPUs are sub CPUs or slave CPUs for the master CPU.
It functions as U (20) and executes sound source processing (FIG. 6).Therefore, the burden of sound source processing is shared between each CPU.

第2の特徴はサブCPUが動作を開始し、終了するメカ
ニズムに関係しており、本実施例によれば、サブCPU
の動作は、マスターCPUに対して音源処理を要求する
タイマインタラプトを合図として開始し、その結果、マ
スターCPUとサブCPUにおいて音源処理が並行に実
行される。サブCPUの動作(音源処理)が終了すると
その終了信号によってサブCPUはリセット状態(停止
状S)に移行するとともにその終了信号がマスター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 timer 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 S) by the completion signal, and the completion signal is sent to the master CPU.
This feature allows the master CPU to effectively manage and keep track of the operating period of the sub-CPUs. 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 to be referenced in the interrupt processing routine (for example, envelope parameters such as an envelope target value and an envelope plate). 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 indicate correct behavior, and correct operation is guaranteed.

本実施例の第4の特徴はマスターCPUからスレーブC
PUに対するデータアクセス問題に関する。従来の複数
CPUマイクロコンピュータシステムでは、一般に、C
PU間のデータ転送は一連のシーケンスを通して行われ
、相当の時間を要する6代表的には、データのアクセス
を要求するCPUからアクセスが要求されるCPUに対
し、アクセス要求信号を送る。このアクセス要求信号に
対しアクセスが要求されるCPUは実行中のオペレーシ
ョンを完了した後に承認(アクノリッジ)信号を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.6 Typically, a CPU requesting data access sends an access request signal to the CPU to which access is requested. In response to this access request signal, the CPU to which access is requested completes the operation being executed, and then sends an acknowledge 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 is time-consuming and is not suitable for applications such as electronic musical instruments where high-speed processing is desired. 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) the pig is disclosed (Fig. 22), and as a second data access method, the master CPU accesses data from 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の特徴はデータ変換処理(シフト、反転
、一部取り出し等)の高速化に関する。
The sixth feature of this embodiment relates to speeding up data conversion processing (shifting, inversion, partial extraction, etc.).

従来においては、上述したCPU外部メモリのようなデ
ータメモリ内のデータから、CPU内部メモリ(5iF
算用メモリ)上に変換されたデータを得るために、転送
(リードアクセス)命令により、データメモリのデータ
を演算用メモリに移し、しかる後、変換命令により、演
算用メモリのデータをALUを介して変換する。所望の
データ変換を行うために複数の変換命令を実行する必要
もしばしば生じる。このように、従来においてはデータ
変換の処理に時間がかかるという問題があり、特に音源
処理のように高速処理が要求されるアプリケーションに
おいては大きな問題となる。これを解決するため、この
実施例によれば、データ・アドレス変換ハードウェア(
60,70)を設け、特殊な転送命令(変換付転送命令
)を実行することにより、その命令に応答するデータ・
アドレス変換ハードウェアを介して所望のデータ変換が
施5れたデータが演算用メモリ(106,206)に取
り込まれるようにしている。したがって、所望の変換デ
ータを得るのに、複数の命令を実行するのではなく単一
の命令を実行すればよく処理の高速化が図れる。
Conventionally, data in a data memory such as the above-mentioned CPU external memory is transferred to the CPU internal memory (5iF
In order to obtain the converted data on the calculation memory, a transfer (read access) command is used to move the data in the data memory to the calculation memory, and then a conversion command is used to transfer the data in the calculation memory to the calculation memory. Convert. 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 problem, this embodiment uses data address translation hardware (
60, 70), and by executing a special transfer instruction (transfer with conversion instruction), the data in response to that instruction can be transferred.
Data that has been subjected to desired data conversion via the address conversion hardware is loaded into the calculation memory (106, 206). 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.

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

各CPUl0120はプログラムを内蔵しており、それ
ぞれのプログラムに従って動作する1MCPUl0は音
源処理(第5図)以外にシステム全体の制御、例えばλ
カポート118、出力ポート120に接続される入力装
H(例えば鍵盤、機能キー等)からの入力情報の処理、
デジタル楽音信号をアナログ楽音信号に変換するDAC
looの制御等を行う(!$4図)、これに対し、5C
PU20は音源処理に専用される(第6図)。
Each CPU10120 has a built-in program, and 1MCPU10, which operates according to each program, controls the entire system in addition to sound source processing (Fig. 5), such as λ
processing of input information from an input device H (for example, a keyboard, function keys, etc.) connected to the port 118 and the output port 120;
DAC that converts digital musical tone signals to analog musical tone signals
loo control etc. (!$4 figure), whereas 5C
The PU 20 is dedicated to sound source processing (FIG. 6).

90は音源制御データ、波形データ等のデータ源として
のメモリである。データメモリ90はここでは、LSI
チップ(第1図の残りのデバイスを搭載している)に外
付けされたROMで構成されている。集積度が高ければ
、単一のLSIチップ上にデータメモリ90を内部メモ
リとして形成可能である。外部メモリ90はMCPU 
10と5CPU20に共用される。MCPUIOからの
アドレス情報はMCPUIOに結合するアドレスバスM
A、外部メモリアドレスチッチ30のMCPU外部メモ
リアドレスラッチ30M、アドレス切り換え回路40、
アドレス変換回路60を介して外部データメモリ90の
アドレス入力に加えられる。一方、5CPU20からの
アドレス情報は5CPU20に結合するアドレスバスS
A、5CPU外部メモリアドレスラッチ3O3、アドレ
ス切り換え回路40、アドレス変換回路60を通して外
部データメモリ90のアドレス入力に加えられる。外部
データメモリ90からMCPUIOへのデータ伝送径路
は外部データメモリ90のデータ出力、データ変換回路
70、外部メモリデータラッチ80のMCPU外部メモ
リデータラッチ80M、MCPUIOに結合するデータ
バスMDによって構成される。これに対し、外部データ
メモリ90から5CPU20へのデータ伝送径路は外部
データメモリ90のデータ出力、データ変換回路70.
3CPU外部メモリデータラッチ8゜S、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
10 and 5 CPU20. Address information from MCPUIO is transferred to address bus M that 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 the 5 CPU 20 is transferred to the address bus S connected to the 5 CPU 20.
It is applied to the address input of the external data memory 90 through the A, 5 CPU external memory address latch 3O3, address switching circuit 40, and address conversion circuit 60. The data transmission path from the external data memory 90 to the MCPUIO is constituted by the data output of the external data memory 90, the data conversion circuit 70, the MCPU external memory data latch 80M of the external memory data latch 80, and the data bus MD coupled to the MCPUIO. On the other hand, the data transmission path 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.
3 CPU external memory data latch 8°S, 5 CPU 20
It is constituted by a data bus SD coupled to the data bus SD.

メモリ装置競合回避回路5oはMCPUIOと5CPU
20の両CPUによる外部メモリ9oのアクセスを制御
し、その競合を回避するものである。メモリ装置競合回
避回路50はMCPUIOからの外部メモリアクセスを
要求する信号romaと5CPUからの外部メモリアク
セスを要求する信号romaの各々に応答してアドレス
切り換え回路40を制御してアドレス切り換え回路40
にMCPUIOからのアドレスと5CPU20からのア
ドレスのいずれかを外部メモリ90へのアドレスとして
選択させる。このためにメモリ装置競合回避回路50か
らの選択信号MSELによりアドレス切り換え回路40
は選択動作を行う、外部メモリ90へのアドレスが確定
するとメモリ装置競合回避回路50は外部メモリ90に
対するチー、プ選択信号GEと出力イネーブル信号OE
をアクティブにする。これにより外部メモリ90からデ
ータが出力され、データ変換回路70を通してそのデー
タが外部メモリラッチ80の入力バスに現われる。ここ
で、メモリ装置競合回避回路5゜はデータアクセスを要
求したCPUにデータを送るためにMCPU外部メモリ
データラッチ80M、5CPU外部メモリデータチッチ
SO5のいずれかを作動してデータをラッチさせる。こ
のためにMCPU外部メモリデータラッチ80Mはメモ
リ装置競合回避回路50からのラッチ信号MDLにより
ラッチ動作し、5CPU外部メモリデータラッチ80S
はメモリ装置競合回避回路50からのラッチ信号SDL
によりラッチ動作するようになっている。
The memory device conflict avoidance circuit 5o includes MCPUIO and 5CPU
This is to control access to the external memory 9o by both CPUs 20 and avoid 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.
selects either the address from MCPUIO or the address from 5CPU 20 as the address to external memory 90. For this purpose, the address switching circuit 40 receives the selection signal MSEL from the memory device conflict avoidance circuit 50.
When the address to the external memory 90 is determined, the memory device contention avoidance circuit 50 selects a select signal GE and an output enable signal OE for the external memory 90.
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 5° operates either the MCPU external memory data latch 80M or the 5CPU external memory data switch SO5 to latch the data in order to send the data to the CPU that has requested the data access. For this purpose, the MCPU external memory data latch 80M performs a latch operation based on 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のデータを変換したデータがCPUl0.
20に取り込まれるようにするための変換デバイスであ
る。アドレス変換回路60はアドレス切り換え回路40
を通ったアドレス即ち、CPU (MCPUIOか5C
PU20)から出力されたアドレス(論理アドレス)を
選択的に変更して外部データメモリ90に実際に入力さ
れるアドレスを形成するものであり、データ変換回路7
0は外部データメモリ9oがら出力されたデータを選択
的に変更してCPU(MCPUIOか5CPU20)に
実際に入力されるデータを形成するものである。各変換
回路6o、7oにおける変換の態様を指定するために、
制御信号が使用される。各CPUl0120において、
外部データメモリ90に対するデータアクセスは転送命
令を実行することで行われる。転送命令に基づいてCP
Uで生成される制御信号をMHI、MR2、MR3(M
CPUIOの場合)、SRI、SR2、SR3(SCP
U20の場合)で示しである。これらの信号は外部メモ
リアドレスラー7チ30、アドレス切り換え回路40を
通った後、信号R1、R2、R3と呼ばれる(MRi 
+LMRi→RfまたはSRi+LsRi+Ri)、変
換の態様を指定するため、制御信号R1,R2がアドレ
ス変換回路60に入力される。更に、データ変換回路7
0における変換の態様を特定するため、制御信号R1、
R2、R3とアドレス変換回路60からのアドレスピッ
)12の信号A12とアドレスビット15の信号A15
がデータ変換回路70に加えられる。アドレス変換回路
6oとデータ変換回路70の詳細については後述する。
The address conversion circuit 60 and the data conversion circuit 70 convert the data of the external data memory 90 into the CPU10.
This is a conversion device for importing into 20. The address conversion circuit 60 is the address switching circuit 40.
The address passed through the CPU (MCPUIO or 5C
The data conversion circuit 7 selectively changes the address (logical address) output from the PU 20) to form an address that is actually input to the external data memory 90.
0 selectively changes the data output from the external data memory 9o to form data actually input to the CPU (MCPUIO or 5CPU 20). In order to specify the conversion mode in each conversion circuit 6o, 7o,
Control signals are used. In each CPU10120,
Data access to external data memory 90 is performed by executing a transfer command. CP based on transfer instruction
The control signals generated at U are MHI, MR2, MR3 (M
CPUIO), SRI, SR2, SR3 (SCP
In the case of U20). These signals are called signals R1, R2, and R3 after passing through an external memory addressr 7ch 30 and an address switching circuit 40 (MRi
+LMRi→Rf or SRi+LsRi+Ri), control signals R1 and R2 are input to the address conversion circuit 60 to specify the conversion mode. Furthermore, the data conversion circuit 7
0, the control signal R1,
R2, R3, address bit 12 signal A12 from address conversion circuit 60, and address bit 15 signal A15
is added to the data conversion circuit 70. Details of the address conversion circuit 6o and the data conversion circuit 70 will be described later.

MCPUIOと5CPU20との間のインタフェースを
定めるため、両CPU間で#I数の信号が伝送される。
In order to define the interface between MCPUIO and 5 CPUs 20, #I signals are transmitted between both CPUs.

信号AはMCPUIOから5CPU20に送られる5C
PU20の処理開始を表わす信号、信号Bは5CPU2
0からMCPUIOに送られる5CPU20の処理終了
を表わす信号、MaはMCPUIOから5CPU20に
送られる5CPU20の内部メモリ(第3図の206)
のアドレス情報、信号CはMCPUIOから5CPU2
0に送られる5CFU20の内部メモリの読み書き制御
信号、Dinは5CPU20からMCPUIOに送られ
る5CPU20の内部メモリからの読出しデータ、D 
o+++はMCPUIOから5CPU20に送られる5
CPU20の内部メモリへの書き込みデータを表わす、
CPU間イフィンタフエース細については後述する。
Signal A is 5C sent from MCPUIO to 5CPU20
A signal indicating the start of processing of PU20, signal B is 5CPU2
0 to the MCPUIO indicating the end 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 Figure 3)
address information, signal C is from MCPUIO to 5CPU2
0 is the internal memory read/write control signal of the 5CFU20, Din is the read data from the internal memory of the 5CPU20 sent from the 5CPU20 to the MCPUIO, D
o+++ 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
CPUloから、右DAC100Rと左DAC100L
とから成るデジタルアナログ変換器(DAC)100に
送られ、アナログ楽音信号に変換されて外部に出力され
る。
As mentioned above, MCPUIO and 5 CPU
20, a digital musical tone signal is generated. The generated result is M
From CPUlo, right DAC100R and left DAC100L
The signal is sent to a digital-to-analog converter (DAC) 100 consisting of a digital-to-analog converter (DAC) 100, where it is converted into an analog 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を
介して指定されたアドレスにあるプログラム語(命令)
をインストラクション出カラー2チ102aを介して順
次出力していく、なお、具体的実施例では、プログラム
語長は28ビツトであり、プログラム語の一部が次に読
み出されるべきプログラム語を記憶するアドレスの下位
部(ページ内アドレス)としてROMアドレス制御部1
14に入力されるネタストアドレス方式となっているが
、代りにプログラムカウンタ方式を使用してもよい、R
AMアドレス制御部114は制御用ROM102からの
命令のオペランドがレジスタを指定している場合に、R
AM106内の対応するレジスタのアドレスを指定する
。RAM106は演算用メモリを構成するレジスタ群で
あり、汎用演算、フラグ演算、楽音の演算等に使用され
る。ALU部(加減算器及び論理演算部)108と乗算
器110は制御用ROMIO2からの命令が演算命令の
ときに用いられる。
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 an address for storing the program word to be read next. ROM address control unit 1 as the lower part (intra-page address) of
14, but the program counter method may be used instead.
When the operand of the instruction from the control ROM 102 specifies a register, the AM address control unit 114
Specifies the address of the corresponding register in AM106. 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、加減算器lO8、乗算器110により、演算
回路が構成される。オペレーション制御回路112は制
御用R0M2O3からの命令のオペコードを解読し、指
示されるオペレーションを実行するために、回路の各部
に制御信号(全体を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 lO8, and multiplier 110 constitute an arithmetic circuit. The operation control circuit 112 decodes the operation code of the command from the control R0M2O3 and sends control signals (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は次に行うメインプログラムの命令
のアドレスを退避(保持)し、楽音の生成が行われるイ
ンタラプト処理プログラム(サブルーチン)の先頭アド
レスを代りにセットする。これにより、インタラプト処
理プログラムが開始される。インタラプト処理プログラ
ムの最後にはリターン命令があるので、このリターン命
令がオペレーション制御回路112で解読された時点で
、ROMアドレス制御部114は退避してあったアドレ
スを再度セットし、メインプログラムに復帰する。更に
、インタラプト発生部116からの制御信号INTはD
AC100における楽音信号のデジタル/アナログ変換
サンプリング速度を定めるためにDAClooに供給さ
れる。なお、インタラプト発生部116は図の上ではM
CPUIOの内部要素として描いであるが、MCPUI
Oに対して現在行っている仕事を停止させ特別の処理を
要求するものであり、論理的にはMCPU 10の外部
要素(周辺装置)である。
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 in response to this signal, the ROM address control unit 114 saves (holds) the address of the next main program instruction, and returns the address to the beginning of the interrupt processing program (subroutine) in which musical tones are generated. Set the address instead. This starts the interrupt processing program. Since there is a return instruction at the end of the interrupt processing program, when this return instruction is decoded by the operation control circuit 112, the ROM address control section 114 sets the saved address again and returns to the main program. . Furthermore, the control signal INT from the interrupt generating section 116 is D.
It is supplied to DACloo to determine the digital/analog conversion sampling rate of musical tone signals in AC100. Note that the interrupt generation unit 116 is M in the diagram.
Although it is depicted as an internal element of CPUIO, MCPUI
It requests O to stop the work it is currently doing and perform special processing, and is logically an external element (peripheral device) of the MCPU 10.

クロック発生回路136はマスタークロック発生回路(
図示せず)からの2相のマスタークロックCKIとCK
2を受け、オペレーション制御回路112を初めとする
回路の各部に加える種々のタイミング信号(T1.T2
、T3、TlCK1、T2CK2、T3CK3等)を発
生する。
The clock generation circuit 136 is a master clock generation circuit (
2-phase master clocks CKI and CK from (not shown)
2, various timing signals (T1, T2) are applied to each part of the circuit including the operation control circuit 112.
, T3, TlCK1, T2CK2, T3CK3, etc.).

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

5CPUリセット制御部134は5CPU20の動作期
間を管理するためのデバイスである。この実施例に従い
5CPUリセ−2ト制御部134はインタラプト発生部
116からのインタラプト信号INTに応答して、5C
PU20の処理開始を示す信号Aを発生する。この信号
Aは5CPU20のROMアドレス制御部214(第3
図)に送られ、これによりROMアドレス制御部214
のアドレス更新動作が開始し、5CPU20の動作(音
源処理を含む)が開始する。5CPU20の動作が終了
すると5CPU20のオペレーション制御回路212か
ら処理終了を示す信号Bが発生し、この信号Bが5CP
Uリセット制御部134に送られる。これに対し、5C
PUリセット制御部134は5CPU20の動作を停止
するために信号Aを反転し、これにより5CPU20の
ROMアドレス制御部214の動作を停止させる、とと
もに、5CPU20が停止中であることを表わす5CP
U状態フラグ信号をオペレージ璽ン制御回路112に送
る。オペレーション制御回路112は制御用ROM10
2からの5CPU状態の検査命令の実行時に、この5C
PU状態フラグ信号を読むことにより、5CPU20の
状態を検出できる。
The 5CPU reset control unit 134 is a device for managing the operating period of the 5CPU 20. According to this embodiment, the 5CPU reset control unit 134 responds to the interrupt signal INT from the interrupt generation unit 116, and
A signal A indicating the start of processing by the PU 20 is generated. This signal A is the ROM address control unit 214 (third
ROM address control unit 214.
The address update operation starts, and the operation of the 5 CPU 20 (including sound source processing) starts. When the operation of the 5CPU 20 is completed, a signal B indicating the end of processing is generated from the operation control circuit 212 of the 5CPU 20, and this signal B is transmitted to the 5CP
It is sent to the U reset control unit 134. On the other hand, 5C
The PU reset control unit 134 inverts the signal A to stop the operation of the 5CPU 20, thereby stopping the operation of the ROM address control unit 214 of the 5CPU 20, and also outputs the 5CP signal indicating that the 5CPU 20 is stopped.
A U status flag signal is sent to the operation control circuit 112. The operation control circuit 112 is a control ROM 10
When executing the 5CPU status inspection command from 2, this 5C
By reading the PU 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のブロック図における要素102.1
02a、104.105.106.108.110.1
12.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.1 in the block diagram of MCPUIO in FIG.
02a, 104.105.106.108.110.1
This is an element corresponding to 12.114.122.124.136. However, the control ROM 202 of the 5 CPU 20 basically stores only a program for sound source processing, and allows the 5 CPU 20 to function as a processing device exclusively for sound source processing.

240は5CPU20の演算用メモリとしてのRAM2
06へ入力するデータをMCPUIOからのデータ(M
CPUIOからゲート130、データバスD OUT 
を通ったデータ)と5CPU20の生成(演算)したデ
ータ(ALU部208または乗算器210からのデータ
バスDB上のデータ)とから選択するRAMデータイン
切り換え部である。RAMデータイン切り換え部240
は信号Aによってその選択モードが制御され、信号Aが
“5CPU20動作中”を表わしているときには5CP
U20で演算したデータを選択し、信号Aが“5CPU
20停止中”を表わしているときにはMCPUIOから
のデータを選択する。
240 is RAM2 as a memory for calculation of 5CPU20
The data input to 06 is the data from MCPUIO (M
From CPUIO to gate 130, data bus D OUT
This is a RAM data-in switching unit that selects from data generated (computed) by the 5CPU 20 (data on the data bus DB from the ALU unit 208 or the multiplier 210). RAM data-in switching section 240
Its selection mode is controlled by signal A, and when signal A indicates "5CPU 20 in operation", 5CP
Select the data calculated by U20 and signal A is “5CPU
20 "Stopping", 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ではなく
MCPUIOのオペレージ、ン制御回路l12からのS
CPURAMリードライト信号を選択して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, signal A is "5CP"
When "U20 is stopped" is displayed, information from the MCPUIO on the bus Ma is transferred from the MCPUIO to the RAM 20 via the bus game) 128 (opened by signal A).
Select it as address 6. Similarly, the mode of the write signal switching unit 242 is controlled by the signal A,
When the signal A indicates "5 CPU 20 in operation", the RAM read/write signal from the operation control circuit 212 of the 5 CPU 20 is selected and coupled to the read/write input R/W of the RAM 206, and the signal A indicates "5 CPU 20 in operation".
When "stopped" is displayed, the S from the MCPUIO operation control circuit 112 instead of the 5CPU 20 is displayed.
Select CPURAM 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〜第11F
i!J)> 第4図はMCPUIOのメインプログラム(バックグラ
ンドプログラム)によるMCPUIOの動作を示すフロ
ーチャート、第5図はタイマインタラプト信号INTに
よって起動されるMCPUlOのインタラプト処理ルー
チンによるMCPUlOの動作を示すフローチャート、
第6図はタイマインタラプト信号INTによって起動さ
れる5CPU20のプログラムによる5CPU20の動
作を示すフローチャート、第7図はMCPUIOと5C
PU20のそれぞれが実行する音源処理のフローチャー
トである。
Multiple CPU sound source function (Figures 1 to 7, 9th to 11th
i! J)> FIG. 4 is a flowchart showing the operation of MCPUIO by the main program (background program) of MCPUIO, and FIG. 5 is a flowchart showing the operation of MCPUIO by the interrupt processing routine of MCPUIO activated by the timer interrupt signal 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−第3図に関して述べたように、本実施例の電子楽
器処理システムはMCPUIOと5CPU20とから成
る複数のCPUを備えており、両CPUが協働して電子
楽器のための処理を実行する。特にMCPUIOは、第
5図に示すようなインタラプト処理ルーチンにより音源
処理を行い5CPU20は第6図に示すようなプログラ
ムにより音源処理を行う、更にMCPUIOは第4図に
示すメインプログラムにより、システム全体の制御のた
めの種々のタスクを実行する。
As described with reference to FIGS. 1 to 3, 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. do. In particular, the MCPUIO processes sound sources using an interrupt processing routine as shown in FIG. 5, and the 5CPU 20 processes sound sources using a program as shown in FIG. Perform various tasks for control.

第4図のメインプログラムのフローにおいて、4−1は
電源投入時にシステムを初期化する処理であり、MCP
UIOはRAM106、RAM206のクリアや、リズ
ムテンポ等の初期値の設定等を行う、4−2でMCPU
IOは出力ボート120からキー走査のための信号を出
力し、W’ll、機能スイッチ等の入力装置の状態を入
力ポートil8から取り込むことにより、機能キー、1
!磐キーの状態をRAMI O6のキーバッファエリア
に記憶する。4−3では4−2で得た機能キーの新しい
状態と前回の状態とから、状態の変化した機能キーを識
別し、指示される機能の実行を行う(例えば、楽音番号
のセット、エンベロープ番号のセット、リズム番号のセ
ット等)、4−4では4−2で得たt11盤の最新の状
態と前回の状態とから、変化した!!(押鍵、離鍵)を
識別する0次の4−5で4−4の処理結果から、発音処
理4−9のためのキーアサイン処理を行う、4−6では
機能キーでデモ演奏キーが押鍵されたとき外部メモリ9
0から、デモ演奏データ(シーケンサデータ)を順次読
み出し、処理することにより1発音処理4−9のための
キーアサイン処理等を行う。
In the main program flow shown in Figure 4, 4-1 is a process to initialize the system when the power is turned on, and the MCP
UIO clears RAM106 and RAM206, sets initial values such as rhythm tempo, etc. MCPU at 4-2
IO outputs a signal for key scanning from the output port 120, and receives the status of input devices such as W'll and function switches from the input port il8, thereby scanning the function key 1.
! Store the state of the Iwa key in the key buffer area of RAMI O6. 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, and the instructed function is executed (for example, setting the musical tone number, setting the envelope number) set, rhythm number set, etc.), 4-4 has changed from the latest state of the t11 board obtained in 4-2 and the previous state! ! In the 0th order 4-5, which identifies (key press, key release), key assignment processing for the sound generation process 4-9 is performed from the processing result of 4-4.In 4-6, the demo performance key is assigned using the function key. External memory 9 when a key is pressed
By sequentially reading and processing demo performance data (sequencer data) from 0 to 1, key assignment processing and the like for one sound generation processing 4-9 are performed.

4−7ではリズムスタートキーが押鍵されたとき外部メ
モリ90からリズムデータを順次読み出し、発音処理4
−9のためのキーアサイン処理を行う、フロー−周タイ
マ処理4−8では、メインフローで必要なイベントのタ
イミングを知るために、フロー−周時間(これは、フロ
ーを一周する間に実行されたタイマインタラプトの回数
を計数することで得られる。この計数処理は後述のイン
タラプトタイマ処理5−2で行われる。)を基に演算ヲ
行い、エンベロープ用タイマ(エンベロープの演算周期
)やリズム用の基準値を得る0発音処理4−9では4−
5.4−6.4−7でセットされたデータから、実際に
楽音を発音させるための各種演算を行い、結果をRAM
106、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.
Flow-period timer processing 4-8 performs key assignment processing for Flow-period timer processing 4-8, which performs key assignment processing for Flow-period timer processing 4-8. This is obtained by counting the number of timer interrupts (this counting process is performed in interrupt timer processing 5-2, which will be described later). 0 sound processing to obtain the reference value In 4-9, 4-
5. From the data set in 4-6.4-7, perform various calculations to actually produce musical tones, and store the results in RAM.
106, set in the sound source processing register (FIG. 11) in the RAM 206. 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は実行中のメインプログラ
ムを中断し、第5図に示すインタラプト処理ルーチンを
実行し、5CPU20は第6図に示すプログラムを実行
する。ここにMCPUlOは第5図のフローにおいて楽
音信号を生成し、5CPU20は第6図のフローにおい
て楽音信号を生成するようになっている。
Interrupt signal INT from interrupt generation section 116
When this occurs, the MCPUIO interrupts the main program being executed and executes the interrupt processing routine shown in FIG. 5, and the 5CPU 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で各チャンネルに
対する楽音波形データを生成し、累算し、記憶する。従
来jよこの処理を音源回路ハードウェアで行っていた0
次のインタラプト処理タイマ処理5−2でMCPUIO
はインタラプトが一定時間ごとにかかることを利用して
、フロー−周計時用のタイマレジスタ(RAM106内
)を通過の都度、プラス1する。5−3でMCPUIO
は5CPU20の音源処理6−1が終了しているかどう
かを検査し、終了していれば、5−4に進んで、5CP
U20で生成されたRAM206上の楽音波形データを
RAM106内に読み込む。
Specifically, the MCPUIO generates, accumulates, and stores musical waveform data for each channel at 5-1. Previously, horizontal and vertical processing was performed using sound source circuit hardware.
MCPUIO in the next interrupt processing timer processing 5-2
takes advantage of the fact that interrupts occur at regular intervals, and increments the flow cycle timer register (in RAM 106) by 1 each time it passes. MCPUIO at 5-3
checks whether the sound source processing 6-1 of the 5CPU 20 has been completed, and if it has been completed, proceeds to 5-4 and processes the 5CP
The musical tone waveform data on the RAM 206 generated in U20 is read into the RAM 106.

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

音源処理5−1.6−1の詳細を第7図に示す、本例で
は、各CPU(MCPUIO1SCPU20)はそれぞ
れ8チャンネル分の楽音波形データを生成可能であり、
システム全体として16チヤンネル分の楽音波形データ
を生成可能としている。7−1で波形加算用RAM領域
(RAM106内、RAM206内)をり!、+7L、
7−2〜7−9で第1チヤンネルから第8チヤンネルま
での各チャンネル音源処理を順次実行する。各チャンネ
ル音源処理の最後で、チャンネルの楽音波形値が波形加
算用RAM領域のデータに加算される。
Details of the sound source processing 5-1.6-1 are shown in FIG. 7. In this example, each CPU (MCPUIO 1 SCPU 20) can generate musical waveform data for 8 channels,
As a whole, the system can generate musical waveform data for 16 channels. 7-1, remove the waveform addition RAM area (in RAM 106, RAM 206)! , +7L,
In steps 7-2 to 7-9, sound source processing for each channel from the first channel to the eighth channel is sequentially executed. At the end of each channel sound source processing, the tone waveform 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 (MCPUIO1SCPU
20)はチャンネル音源処理を実行する際に、そのチャ
ンネルに対する音源処理レジスタ群、即ち第11図に示
すように、エンベロープΔx用タイマー、目標エンベロ
ープ、エンベロープΔX、加減フラグ付エンベロープΔ
y、現在エンベロープ、アドレス加算値、ループアドレ
ス、エンドアドレス、スタートアドレス兼現在アドレス
を参照し、所望のレジスタを更新する。エンベロープは
振幅変調のために基本波形に付加すべきもので、全体と
していくつかのセグメント(ステップ)から成っている
。エンベロープΔX用タイマーとI[エンベロープとエ
ンベロープΔXと加減フラグ付エンベロープΔyは現在
進行中のエンベロープセグメントを定義するエンベロー
プパラメータでアリ、このエンベロープパラメータは、
MCPUIOのメインプログラム(第4図)の発音処理
4−9内において、エンベロープ値がセグメントの目標
値に到達の都度、更新される情報であり、インタラプト
処理ルーチン(第5図、第6図)ではこれらのエンベロ
ーフパラメータはエンベロープΔχ用タイマーを除いて
単に参照されるだけである。エンベロープΔXはエンベ
ローフッ演算周期を表わし、目標エンベロープは現セグ
メントにおけるエンベロープの目標値を表わし、加減フ
ラグ付エンベロープΔyは演算周期ごとのエンベロープ
の変化分を表わし、現在エンベロープは現在のエンベロ
ープ値を表わす、アドレス加算値、ループアドレス、エ
ンドアドレス及びスタートアドレス兼現在アドレスは外
部メモリ90に置かれる基本波形に対するアドレス情報
であり、スタートアドレスは基本波形メモリ(外部メモ
リ90内)のスタートアドレス、ループアドレスは基本
波形を繰り返し読み出す場合の戻り先のアドレス(第1
θ図ではスタートアドレスと同一)、エンドアドレスは
基本波形のエンドアドレスを表わし、現在アドレスは基
本波形の現在の位相を表わすアドレスであり、その整数
部が、基本波形メモリに現実に存在する記憶場所を表わ
し、その小数部が、この記憶場所からのずれを表わし、
アドレス加算値はタイマインタラプト処理ルーチンの時
間間隔ごとに現在アドレスに加算されるべき値で生成す
4楽音のピッチに正比例する。
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 (MCPUIO1SCPU
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. Envelope ΔX timer and I
In the sound generation process 4-9 of the MCPUIO main program (Figure 4), this information 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 only referenced, except for the timer for envelope Δχ. The envelope ΔX represents the envelope calculation cycle, 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. The addition value, loop address, 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 basic waveform Return destination address when repeatedly reading (first
(same as the start address in the θ diagram), the end address represents the end address of the basic waveform, the current address is the address representing the current phase of the basic waveform, and the integer part is the storage location that actually exists in the basic waveform memory. , the decimal part of which represents the deviation from this memory location,
The address addition value is directly proportional to the pitch of the four musical tones generated by the value to be added to the current address at each time interval of the timer interrupt processing routine.

詳細に述へると、9−1でエンベローフッ演算周期ΔX
と比較するためのタイマレジスタをインタラプトごとに
インクリメントし、9−2で△Xと一致したとき9−3
でエンベロープ変位分のデータΔyの加減算フラグ(符
号ビット)をテストしてエンベロープが上昇中か下降中
かを判別し、9−4.9−5でそれぞれ現在エンベロー
プの減算または加算を行う、9−6で現在エンベロープ
が目標エンベロープ値に達したかどうかをチエツクし、
達しておれば、現在エンベロープに目標レベルをセット
する。これによりメインプログラムの発音処理4−9で
次のエンベロープステップのデータがセットされること
になる。また発音処理4−9でゼロの現在エンベロープ
を読んだときには発音の終了として処理される。
In detail, in 9-1, the envelope foot calculation period ΔX
Increment the timer register for comparison with each interrupt, and when it matches △X in 9-2,
Test the addition/subtraction flag (sign bit) of the envelope displacement data Δy to determine whether the envelope is rising or falling, and subtract or add the current envelope in steps 9-4 and 9-5, respectively.9- At step 6, check whether the current envelope has reached the target envelope value,
If it has been reached, set the target level 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つアドレスの波形データを読み出し、
(整数部子小数部)で示される現在アドレスに対して想
定される波形値を補間で求めている。補間が必要な理由
は、タイマインタラプトによる波形サンプリング周期が
一定であり、アドレスの加算値(ピッチデータ)が楽器
への応用上、ある音域にわたるためである(音階音しか
出力しない楽器で音階音ごとに波形データを用意すれば
補間の必要はないが許容できない記憶容量の増大となる
)、補間による音色の劣化歪みは高音域の方が著しいた
め、原音の記録サンプリング周期より高速の周期で原音
を再生するのが好ましい、この実施例では原音(4−4
)再生の周期を2倍にしている(第10図)、シたがっ
て、アドレス加算値が0.5のとき、A4の音が得られ
るようになっている。この場合、A#4ではアドレス加
算値は0.529となり、A3のとき、lとなる。これ
らのアドレス加算値はピッチデータとして制御データ兼
波形外部メモリ90内に記憶されており、押鍵時には発
音処理4−9において、鍵に対応するピッチデータと選
択されている音色の波形スタートアドレス、波形エンド
アドレス及び波形ループアドレスがRAM106または
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 expected waveform value for the current address indicated by (integer part to decimal part) is obtained by interpolation. The reason why interpolation is necessary is that the waveform sampling period due to timer interrupt is constant, and the address addition value (pitch data) spans a certain range in application to musical instruments. (If waveform data is prepared for the original sound, there is no need for interpolation, but this would result in an unacceptable increase in storage capacity.) Since the timbre deterioration and distortion caused by interpolation is more pronounced in the high frequency range, it is necessary to record the original sound at a faster rate than the recording sampling rate of the original sound. In this embodiment, it is preferable to reproduce the original sound (4-4
) The playback cycle is doubled (Figure 10), so when the address addition value is 0.5, an A4 sound can be obtained. In this case, the address addition value is 0.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, and when a key is pressed, in the sound generation process 4-9, the pitch data corresponding to the key and the waveform start address of the selected tone, The waveform end address and the waveform loop address are set in corresponding registers of RAM 106 or RAM 206, ie, address addition value register, start address/current address register, end address register, and loop address register.

参考までに、第1O図に時間に対する補間波形データを
示す0図中、白丸は基本波形メモリの記憶場所にある波
形データ値、X印は補間値を含む出力サンプルを示して
いる。
For reference, in Figure 1O 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 containing interpolated values.

補間の方式はいろいろあるが、ここでは直線補間を採用
している。詳細に述べると、まず、9−8で現在アドレ
スにアドレス加算値を加算して新しい現在アドレスを得
る。9−9で現在アドレスとエンドアドレスを比較し、
現在アドレス〉エンドアドレスならば、9−10.9−
11により。
There are various interpolation methods, but here we use linear interpolation. In detail, first, in step 9-8, an address addition value is added to the current address to obtain a new current address. At 9-9, compare the current address and end address,
If current address>end address, 9-10.9-
By 11.

現在アドレスくエンドアドレスのときは9−12により
、物理上(番地上)または論理上(動作上)の次のアド
レスを計算し、9−14でその整数部により基本波形メ
モリをアクセスして次回波形データを得る。ループアド
レスは動作上エンドアドレスの次のアドレスである。す
なわち、第10図の場合、図示の波形は繰り返し読み出
される。したがって、現在アドレス=エンドアドレスの
ときは次のアドレスとしてループアドレスの波形データ
を読み出す(9−13)、9−15.9−16により、
現在アドレスの整数部で基本波形をアクセスして今回の
波形データを読み出す0次に、9−17で次回波形値か
ら今回波形値を減算し、9−18でその差に現在アドレ
スの小数部を乗算し、その結果を9−19で今回の波形
値に加えることにより、波形の直線補間値を求める。こ
の直線補間したデータに現在エンベロープ値を乗算して
チャンネルの楽音データ値を得(9−20)、それを波
形加算用レジスタの内容に加えて楽音データを累算する
(9−21)、このレジスタに累算されたデジタル楽音
データがタイマインタラプト処理ルーチン(第5図)の
5−5でDAClooに送出される。これに関連し、第
1図ではDAC100はステレオ出力を得るべく右DA
C100Rと左DAC100Lから成っている。
When the current address is the end address, the next physical (address) or logical (operational) address is calculated in steps 9-12, and the basic waveform memory is accessed using the integer part in steps 9-14, and the next address is accessed in steps 9-14. Obtain 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, read the waveform data of the loop address as the next address (9-13), 9-15.9-16,
Access the basic waveform using the integer part of the current address and read the current waveform data. Next, subtract the current waveform value from the next waveform value in steps 9-17, and add the decimal part of the current address to the difference in steps 9-18. By multiplying and adding the result to the current waveform value in step 9-19, a linearly interpolated value of the waveform is obtained. This linearly interpolated data is multiplied by the current envelope value to obtain the musical tone data value of the channel (9-20), and it is added to the contents of the waveform addition register to accumulate the musical tone data (9-21). The digital musical tone data accumulated in the register is sent to DACloo in step 5-5 of the timer interrupt processing routine (FIG. 5). In this regard, in FIG. 1 the DAC 100 is connected to the right DA to obtain stereo output.
It consists of C100R and left DAC100L.

この場合、MCPUIO,5CPU20の処理する音源
チャンネルの夫々を左右のDACのいずれに割り当てる
かを決めるようにするとよい、具体的には、各チャンネ
ル用の音源データとして内部RAM106.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 5CPUs 20. Specifically, the sound source data for each channel is stored on the internal RAM 106.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 a 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 5 CPU 20 are respectively transferred to the musical waveform data for the left DAC generated by the MCPUIO. Add the musical waveform data to the musical waveform data for the right DAC, and add the addition results for 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.

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

<5CPU動作開始・終了機能(第12〜第15図、第
2〜第6図、第8図)〉 未実施例ニヨレばMCPUIOは5CPU20の動作期
間を管理、把握する機能を有している。
<5CPU operation start/end function (FIGS. 12 to 15, FIGS. 2 to 6, and FIG. 8)> If not yet implemented, the MCPUIO has a function of managing and grasping the operation period of the 5CPU 20.

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

(ロ)SCPU20は動作(音S第理)を完了したとき
に、これに応答して停止状態に移行し、MCPUloi
、m動作完了信号を送り、MCPUIOのオペレーショ
ン制御回路112が参照する5cPU状態フラグを“5
CPU停止中”にセットする。
(b) When the SCPU 20 completes the operation (sound S process), it responds to this and shifts to the stopped state, and the MCPUloi
, m operation completion signal is sent, and the 5cPU status flag referred to by the operation control circuit 112 of MCPUIO is set to “5”.
Set to "CPU stopped".

第2図〜第6図を参照すると、MCPUloはメインプ
ログラム(第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の1’?OMアドレス制御部214
のアドレス更新動作が停止し、5CPU20は停止する
。また信号Bは“5CPU停止中”を示す信号としてM
CPUIOのオペレーション制御回路112に与えられ
る。MCPUIOのインタラプト処理ルーチン(第5図
)の5−3に示す5CPU状態検査命令を実行する際、
MCPUIOのオペレーション制御回路112は5CP
U状態フラグBを読む、フラグBが“5CPU停止中”
を示し、したがって、5CPU20での音源処理(第6
図)が完了しているときにMCPUIOは5−4に進ん
で5CPU20の生成した楽音波形データを読み込む。
Referring to FIGS. 2 to 6, MCPUlo 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 operation), upon completion of this program, the 5CPU 20 starts the operation control circuit 2.
12 generates an operation end 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 0 signal A, the PU reset control unit 134 inverts the 5 CPU 20's 1'? OM address control unit 214
The address update operation of 5 CPU 20 stops and the 5 CPU 20 stops. Also, signal B is M as a signal indicating "5 CPU is stopped".
It is given to the CPUIO operation control circuit 112. When executing the 5CPU status check command shown in 5-3 of the MCPUIO interrupt processing routine (Figure 5),
The operation control circuit 112 of MCPUIO is 5CP
Read U status flag B, flag B is “5 CPUs are stopped”
Therefore, the sound source processing by the 5th CPU 20 (6th
When step (FIG.) has been completed, the MCPUIO advances to 5-4 and reads the tone waveform data generated by the 5CPU 20.

MCPUIOは第5図のインタラプト処理ルーチン終了
時にオペレーション制御回路112からROMアドレス
制御部114にメインプログラムへの復帰コマンド信号
を与えて4中断していたメインプログラムに制御を戻す
MCPUIO gives a return command signal to the main program from the operation control circuit 112 to the ROM address control section 114 when the interrupt processing routine shown in FIG.

第8図に、時間の流れに沿う本実施例の動作の流れを示
す、A−Fはメインプログラムの断片である。5A〜5
Fは第5図のMCPUインタラプト処理ルーチンを表わ
し、6A〜6Fは第6図の5CPUインタラプト処理ル
ーチンを表わす0図示のように、インタラプト信号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.
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、CR2はMCPUIOと5CPU2
0におけるクロック発生回路136.236に入力され
る2相のマスタークロックであり、このマスタークロッ
クCK1、CR2からクロック発生回路136はMCP
UIO動作のための基本タイミングを与える3相のクロ
ックTl、T2、T3を生成する。この3相りUツクの
繰り返し周期がマシンサイクル(最短の命令実行時間)
を定める。クロックTlCK1、T2CK2、T3CK
3はそれぞれ、T1とCKI、T2とCR2、T3とC
R3の論理積信号である。オペレーションラッチ信号は
MCPUlOの制御用ROM102のインストラクショ
ン出力ラッチ102aにROM102からのインストラ
クションをラッチさせるための信号である。
Figure 12 shows in detail the configuration for realizing the operation start and end functions of the 5 CPUs mentioned above, and Figures 13 to 15 show time charts of the operations.In the time chart of Figure 13, CKI, CR2 are MCPUIO and 5CPU2
This is a two-phase master clock input to clock generation circuits 136 and 236 at 0, and from these master clocks CK1 and CR2, the clock generation circuit 136
Three-phase clocks Tl, T2, and T3 are generated that provide basic timing for UIO operations. The repetition period of this three-phase U-tsuku is a machine cycle (the shortest instruction execution time)
Establish. Clocks TlCK1, T2CK2, T3CK
3 are respectively T1 and CKI, T2 and CR2, T3 and C
This is an AND signal of R3. The operation latch signal is a signal for causing the instruction output latch 102a of the control ROM 102 of the MCPUIO to latch an instruction from the ROM 102.

第13図には図示しないが、5CPU20のクロック回
路236も同様のクロック信号を生成する(第3図、第
25図参照)、なお、MCPUIOと5CPtJ20に
共通のクロック発生回路を使用してもよい。
Although not shown in FIG. 13, the clock circuit 236 of the 5CPU20 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 5CPtJ20. .

第12図において、点線16の右側は5CPU20であ
り左側はMCPUIOである。左側の要素のうち、ラッ
チLl、ラッチL2、ゲート1142〜1154はMC
PUIO(第2図)のROMアドレス制御部114に含
まれる回路要素である。ラッチL1にはMCPUIOの
実行すべき次の命令のROM102アドレス情報AN 
(ROM102からの現命令に含まれる情報)がクロッ
クTICKIでラッチされる。メインプログラム(第4
図)の実行中、ラッチLlの出力は次アドレスBNとし
てMCPUIOのROMアドレスデコーダ104に入力
される。即ち、ラッチL1の出力はインバータ1144
.3状態インバータゲート1146(イネーブルされて
いる)を通ってROMアドレスデコーダ104へのアド
レス人力BNとなる。ここでインタラプト発生部116
からインタラプト信号INTが発生すると、この信号I
NTを受けるORゲート1154から、インバータ11
48を介してラッチL1の出力側にある3状態イン/ヘ
ータゲート1146をオフ(ハイインピーダンス)にす
る信号が加えられ、代りに ORゲート1154からの
信号により、割込入ロ/戻先アドレス選択ゲー)115
0の出力側にある3状態イン/−一タゲー)1152が
ゲート1150の出力をROMアドレスデコーダ104
のアドレス入力BNに通す0割込入ロ/戻先アドレス選
択ゲー)1150はインタラプト信号INTとラッチL
2からの出力信号を受けるNORゲート群で構成され、
“H”のインタラプト信号INT発生時に、インタラプ
ト処理ルーチン(第5図)の入口(エントリポイント)
を表わすオール“0”の信号を出力し、この信号は3状
態イン/曳タゲー)1152で反転ξれて、オール”1
”の信号BNとしてMCPUのROMアドレスデコーダ
104に入力される。そして次のオペレーシゴンラッチ
信号により、制御用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 Ll, latch L2, and gates 1142 to 1154 are MC
This is a circuit element included in the ROM address control unit 114 of the PUIO (FIG. 2). Latch L1 contains ROM102 address information AN of the next instruction to be executed by MCPUIO.
(information contained in the current instruction from ROM 102) is latched with clock TICKI. Main program (4th
During the execution of FIG. 2, the output of latch Ll is input to the ROM address decoder 104 of MCPUIO as the next address BN. That is, the output of latch L1 is output from inverter 1144.
.. The address input BN passes through tri-state inverter gate 1146 (enabled) to ROM address decoder 104. Here, the interrupt generation unit 116
When an interrupt signal INT is generated from
From the OR gate 1154 receiving NT, the inverter 11
48 is applied to turn off (high impedance) the tri-state input gate 1146 at the output of latch L1, and in turn, a signal from OR gate 1154 turns off the interrupt low/return address selection gate. )115
The 3-state input/-1 target gate) 1152 on the output side of the gate 1150 transfers the output of the gate 1150 to the ROM address decoder 104.
1150 is the interrupt signal INT and latch L passed through the address input BN.
It consists of a group of NOR gates that receive output signals from 2,
Entry point of the interrupt processing routine (Figure 5) when the "H" interrupt signal INT is generated.
It outputs a signal of all "0" representing
” is input to the ROM address decoder 104 of the MCPU as the signal BN. Then, the next operation latch signal causes the instruction to be sent from the control ROM 102.
The first instruction of the interrupt processing routine is fetched into the output latch 102a.
Control passes to the interrupt handling routine.

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

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

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

インタラプト信号INTは、クロックT2CK1のタイ
ミングでDフリップフロップ1342に取り込まれ、次
のクロックTICKIのタイミングでNANDゲー)1
344から反転されて出力され、R−Sプリップフロッ
プ1346をセットする。この結果、R−Sフリップフ
ロップ1346のQ出力、即ち信号Aが“H”から“L
”に切り換え、Q出力、即ち5CPU状態フラグが“L
”  (SCPU停止中を示す)から“H″ (SCP
U動作中を示す)に変化する。信号Aは、5CPU20
における次命令のアドレスSANをラッチするためのラ
ッチL3にリセット解除信号(ラッチL3のイネーブル
信号)として入力される。この結果、ラッチL3は次の
クロー2り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 T2CK1, and the NAND gate)1 is taken in at the timing of the next clock TICKI.
344 and is inverted and outputted, setting an R-S flip-flop 1346. As a result, the Q output of the R-S flip-flop 1346, that is, the signal A changes from "H" to "L".
”, and the Q output, that is, the 5 CPU status flag, becomes “L”.
” (indicates that the SCPU is stopped) to “H” (SCP
(U indicates in operation). Signal A is 5 CPU 20
It is input as a reset release signal (enable signal of latch L3) to latch L3 for latching the address SAN of the next instruction in . As a result, the latch L3 inputs the address of the first instruction of the 5 CPU program (FIG. 6) on the bus SAN to the ROM address decoder 204 of the 5 CPU 20 as SBN at the timing of the next claw 2 TlCK1. In this manner, 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が音源処理の最後の命令を実行する際、5
CPU20のオペレーション制御回路l12の内部で動
作終了信号(復帰コマンド信号)SRTが発生する。こ
の信号SRTはDフリツプフロップ2122にクロック
72CK 1のタイミングで取り込まれた後1次のTI
CKIのタイミング(次のダミー命令のラッチタイミン
グ)で動作するNANDゲート2124で反転され、ロ
ーパルスの動作終了信号Bとして5CPUリセット制御
部134のR−Sフリップフロップ1346をリセット
する。この結果、R−Sフリップフロップ1346の互
出力、即ち、信号Aは“L”から“H”に切り換り、Q
出力、即ち、5CPU状態フラグは5CPU動作中を示
す“H”から5CPU20停止中を示す“L”に切り換
る。“H”レベルの信号A(リセット信号)により、う
7チL3の動作は禁止され、ラッチし3出力、つまり、
アドレスデコーダ204の入力はダミー命令の(Nor
命令)のアドレスに固定される。このときラッチL3の
入力バスSANには5CPU音源処理プログラム(第6
図)の最初の命令のアドレス情報(Nor命令語に含ま
れる)が乗っている。
When the 5 CPU 20 executes the last command of sound source processing, the 5
An operation end signal (return command signal) SRT is generated inside the operation control circuit l12 of the CPU 20. This signal SRT is taken into the D flip-flop 2122 at the timing of clock 72CK1, and then the primary TI
It is inverted by the NAND gate 2124 operating at the CKI timing (latch timing of the next dummy instruction), and resets the R-S flip-flop 1346 of the 5 CPU reset control unit 134 as a low pulse operation end signal B. As a result, the output of the R-S flip-flop 1346, that is, the signal A switches from "L" to "H", and Q
The output, that is, the 5CPU status flag switches from "H" indicating that the 5CPU is in operation to "L" indicating that the 5CPU 20 is stopped. The “H” level signal A (reset signal) inhibits the operation of the second circuit L3, latches it, and outputs three outputs, that is,
The input of the address decoder 204 is the dummy instruction (Nor
(instruction) address. At this time, the input bus SAN of latch L3 is connected to the 5 CPU sound source processing program (6th
The address information (included in the Nor instruction word) of the first instruction in FIG.

MCPUIOはインタラプト処理ルーチン(第5図)の
5CPU状態検査命令5−3の実行時にオペレーション
制御回路112を介して5CPU状態フラグのレベルを
検査し、5CPUの停止中、即ち5CPU20の音源処
理の完了を確認してから、5CPU20の処理結果であ
る楽音波形データをRAM206からRAM106に読
み取る(5−4)、これによりMCPUIOは5CPU
20の正しい処理結果を効率よく得ることができる。
The MCPUIO checks the level of the 5CPU status flag via the operation control circuit 112 when executing the 5CPU status check instruction 5-3 of the interrupt processing routine (FIG. 5), and determines 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 the OR gate) 1654 and the inverter 1148 to temporarily turn off the address gate) 1146 on the output side of the latch Ll, and instead outputs the interrupt input logic connected to the latch L2.
The address gate (1152) on the output side of the return address selection gate (1150) is temporarily opened. At this point, the interrupter/return address selection gate (1150) is connected to the interrupted main It works as an inverter that inverts the address of the program's instructions and passes it through (this game)
The inverted output of 1150 is again inverted by signal pulse RT in a three-state gate 1152 which acts 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
UIOによる5CPU20の動作期間の管理を5CPU
リセット制御部134のような簡単な管理インターフェ
ース構成を設けることで効率よく、確実に行うことがで
きる。
As described above, the electronic musical instrument processing device of this embodiment has the MCP
5 CPUs manage the operation period of 5 CPUs 20 by UIO.
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 processing routine. Such multiple data must be updated in the main program before the main program is interrupted by the interrupt handling 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のタイマインタラプト処理ルーチン)に
渡す複数のデータカくあ6.エンベロープΔX(エンヘ
ロー7’演XM期) 、 加減フラク付エンベロープΔ
F(エンベロ−プ変化分)目標エンベロープから成るエ
ンベロープパラメータはその例である。データ源である
外部データメモリ90はエンベロープのセグメント(例
えばアタックセグメント、デイケイセグメント、サステ
ィンセグメント等)ごとにエンベロープパラメータを記
憶している。MCPUloのメインプログラムは発音処
理4−9において、押鍵(ノートオン)あるいはインタ
ラプト処理ルーチンのチャンネル音源処理(第9図)内
で検出されたエンベロープの目標値への到達(9−6,
9−7参照)に応答して所定のセグメントについてのエ
ンベロープパラメータ(新しい目標エンベロープ、エン
ベロープΔX1加減フラグ付エンベロープΔy)を外部
データメモリ90から取り出してMCPU内部RAM1
06(または5CPU内部RAM206)の対応するチ
ャンネル音源処理レジスタにセットすることによって複
数のデータから成るエンベロープパラメータを更新する
必要がある。このような複数のデータはインタラプト発
生部116からのインタラプト信411NTによってメ
インプログラムが中断される前に、メインプログラムに
おいて更新を完了させておかなければならない。
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). Data calculation 6. Envelope ΔX (Enhero 7' performance XM period), Envelope Δ with adjustment/subtraction
An example is an envelope parameter consisting of F (envelope change) target envelope. 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, in the sound generation process 4-9, reaches the target value of the envelope detected in the key press (note-on) or channel sound source processing (Figure 9) of the interrupt processing routine (9-6,
9-7), the envelope parameters (new target envelope, envelope Δy with addition/subtraction flag for envelope ΔX1) for a predetermined segment are retrieved from the external data memory 90 and stored in the MCPU internal RAM 1.
It is necessary to update the envelope parameter consisting of a plurality of data by setting it in the corresponding channel sound source processing register of 06 (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 411NT 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 method that utilizes the ability to execute multiple data transfers with one instruction.

インタラプトマスク方式(第16、第17、第2〜第7
図) この方式によれば、インタラプト発生部116からのイ
ンタラプトはメインプログラム、特に発音処理4−9に
おけるデータ更新命令群によって内部RAMのチャンネ
ル音源レジスタ群にデータをセットする間、マスクされ
て、MCPUIOの制御がメインプログラム(第4図)
からインタラプト処理ルーチン(第5図)に移るのが禁
止される。
Interrupt mask method (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 The main program is to control (Figure 4)
The transition 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で指定音源チ
ャンネルの現在エンベロープが目標エンベロープに到達
しているかどうかを調べる。到達すればMCPUIOは
17−2に進み、外部データメモリ90(第1図)から
、次のエンベロープパラメータに関するエンベロープパ
ラメータ、即ち、新しい目標エンベロープ、加減フラグ
付エンベロープΔy、エンベロープΔXを取り出し、内
fiRAM106内の転送バッファにモー2トする。
In FIG. 17, the MCPUIO checks in step 17-1 whether the current envelope of the designated sound source channel has reached the target envelope. If this is reached, the MCPUIO proceeds to step 17-2, retrieves the envelope parameters related to the next envelope parameters from the external data memory 90 (FIG. 1), that is, the new target envelope, the envelope Δy with addition/subtraction flag, and the envelope ΔX, and stores them in the internal fiRAM 106. mode into the transfer buffer.

ここに転送バッファはデータ源とデータ目的地との間の
中間的な記憶部でありインタラプト処理ルーチン(第9
図)によって参照されないRAM領域であるので、この
時点でのインタラプトマスクは不要である。転送バッフ
ァを設けた理由はデータ源であるメモリ90がMCPU
IOと5CPU20によって共用される外部メモリであ
り、そのデータアクセス時間が内部RAM相互のデータ
転送時間より長くなること等による。ブロック172の
機能は外部データメモリ90から内部RAM100への
複数のデータ転送命令を順次実行することで処理される
Here, the transfer buffer is an intermediate storage unit between the data source and the data destination, and is used by the interrupt handling 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. The function of block 172 is processed by sequentially executing a plurality of data transfer instructions from external data memory 90 to internal RAM 100.

転送バッファからチャンネル音源用レジスタ群(インタ
ラプト処理ルーチンにおいて参照される)へのデータ転
送はブロック17−4で実行される。このデータ転送中
にMCPUIOの制御がタイマインタラプト処理ルーチ
ン(第5図)に移行しないようにするため(あるいは5
CPU20の制御が第6図のプログラムに移行しないよ
うにするため)、MCPUloはブロック17−4に先
立ってブロック17−3でインタラプトをマスクする命
令を実行する。このインタラプトマスク命令の実行中に
、MCPUIOのオペレーション制御回路112からロ
ーアクティブのマスク信号MASKが発生する。このマ
スク信号MASKはインタラプト発生部116からのイ
ンタラプト信号INTをマスクして、インタラプト処理
ルーチン(第5図、第6図)への制御の移行を禁止する
ように作用する。この目的のため、第16図において、
インタラプト発生部116に結合するマスク解除特機部
150が設けられる。マスク解除特機部150は図示の
ように結合したR−Sフリップフロップ1502、AN
Dゲート1504、及びDフリップフロップ1506を
含む。
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 control of the CPU 20 from transferring to the program of FIG. 6), MCPUlo executes an interrupt masking instruction in block 17-3 prior to block 17-4. During execution of this interrupt mask command, a low active mask signal MASK is generated from the operation control circuit 112 of the MCPUIO. This mask signal MASK acts to mask the interrupt signal INT from the interrupt generating section 116 and prohibits control from shifting to the interrupt processing routine (FIGS. 5 and 6). For this purpose, in Figure 16,
A mask release special unit 150 coupled to the interrupt generating unit 116 is provided. The mask release special unit 150 includes an R-S flip-flop 1502 and an AN
It includes a D gate 1504 and a D flip-flop 1506.

マスク信号MASKがマスク解除を示す“H”レベルの
とき、インタラプト発生部116からのインタラプト信
号INTにより、R−Sフリップフロップ1502がセ
ットされ、その出力が“H″のMASKによりイネーブ
ルされているANDゲートを通って、Dフリップフロッ
プ1506にTICKIのタイミングで取り込まれ、こ
のDフリ、プフロップ1506の出力が、実際のインタ
ラプト信号A−INTとしてMCPUIOのROMアド
レス制御部114に入力される。その結果、5CPU動
作開始・終了機能のところで述べたように、ROMアド
レス制御部114のゲート1152からROMアドレス
デコーダ104にインタラプト処理ルーチン(第5図)
のエントリポイントのアドレスが入力されるとともに、
次のメインプログラム命令のアドレスがパスANからラ
ッチL2に退避されて、MCPUIOの制御がインタラ
プト処理ルーチンに移行し、メインプログラムは中断さ
れる。また、信号A−INTは5CPUリセット制御部
134に入力され、その結果、5CPU動作開始・終了
機能のところで述べたように5CPU20のプログラム
(第7図)動作が開始する。Dフリップフロップ150
6からのHレベルの出力はR−Sフリップフロー、プ1
502をリセットし、その結果、次のTICKIのタイ
ミングでDフリップフロー、プ1506の出力(マスク
解除特機部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 enabled by the "H" MASK. It passes through the gate and is taken into the D flip-flop 1506 at the timing of TICKI, and the output of the D flip-flop 1506 is input to the ROM address control unit 114 of the MCPUIO as the actual interrupt signal A-INT. As a result, as described in the 5 CPU operation start/end functions, an interrupt processing routine (see FIG. 5) is sent from the gate 1152 of the ROM address control unit 114 to the ROM address decoder 104.
The address of the entry point is entered, and
The address of the next main program instruction is saved from path AN to latch L2, control of MCPUIO is transferred to an interrupt processing routine, and the main program is interrupted. Further, the signal A-INT is input to the 5CPU reset control section 134, and as a result, the program (FIG. 7) operation of the 5CPU 20 is started as described in the 5CPU operation start/end function. D flip flop 150
The H level output from 6 is the R-S flip flow, P1
502 is reset, and as a result, the output of the D flip flow 1506 (output of the mask release special unit 150) is switched to the L level at the next TICKI timing.

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

したがって、ブロック17−4に示す転送命令群(及び
エンベロープΔχ用タイマーのクリア命令)の実行は、
実行の途中で、インタラプト発生部116からインタラ
プト信号INTが発生した場合にも中断されない、これ
により、インタラプト処理ルーチン(第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 is not interrupted (FIGS. 5 and 6).
can refer to envelope parameters that have been updated correctly, and can obtain correct calculation results (music waveform data).

しかる後、MCPUIOはブロック17−5に示すイン
タラプトマスク解除命令を実行する。この結果、オペレ
ーション制御回路112からマスク解除特機部150に
供給される信号MASKはマスク解除を示す“H”レベ
ルに切り換る。複数のデータ転送を含むブロック17−
4の実行中に、インタラプト発生部116からインタラ
プト信号が発生したような場合には、マスク解除特機部
150の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- containing multiple data transfers
4, if an interrupt signal is generated from the interrupt generation unit 116, the output of the R-S flip-flop 1502 of the mask cancellation special unit 150 causes an interrupt request to be issued after the mask cancellation command is executed. If accepted, the main program is interrupted as described above, and control is transferred to the interrupt processing routine.

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

単一の命令(ロング命令)で複数のデータ転送が可能な
CPUは例えば特公昭60−47612号に開示されて
おり、本実施例にこの技術が適用できる。特公昭60−
47612号によれば、ロング命令は連続するアドレス
にある複数のレジスタ間(例えばレジスタAO〜A3を
レジスタBO〜B3)の転送に適用可能である(ここに
レジスタとはRAMの1記憶場所を意味し、A、BはR
AMのアドレス上位、即ち行アドレスを表わし、0.3
はRAMのアドレス下位、即ち列アドレスを表わす)、
制御用ROM (本実施例の要素102に対応する)か
らのロング命令語にはソースレジスタの行アドレス(上
の例でいえばA)、ディスティネーションレジスタの行
アドレス(B)、最初のデータ転送に係るレジスタの列
アドレス(0)、最後のデータ転送に係るレジスタの列
アドレス(3)の情報が含まれる。RAMアドレス制御
部(本実施例の要素105に対応する)はロング命令の
実行に適するように構成され1列アドレスを最初の転送
の列アドレスから最後の転送の列アドレスまでデータ転
送の都度、lずつ更新するカウンタ(その出力がRAM
の列アドレス入力に順次加えられる)と、すべてのデー
タ転送が完了したことを検出するためカウンタ出力と最
後のデータ転送の列アドレス値とを比較し、一致したと
きにロング命令実行完了信号を発生する一致回路とを含
んでいる。
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, long instructions can be applied to transfer between multiple registers at consecutive addresses (e.g., registers AO to A3 to registers BO 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 source register row address (A in the above example), the destination register row address (B), and the first data transfer. The information includes the column address (0) of the register related to the last data transfer and 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 is configured to change one column address from the column address of the first transfer to the column address of the last transfer every time data is transferred. A counter that updates increments (its output is stored in RAM)
(sequentially added to the column address input of ) and the column address value of the last data transfer to detect that all data transfers have been completed. When they match, a long instruction execution completion signal is generated. and a matching circuit.

以下の説明において、本実施例の制御用ROM102の
メインプログラム内には上述したようなロング命令が含
まれるものとし、RAMアドレス制W部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 W units 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によるメインプログラムの中断を禁止する回路を含む
ハードウェアのブロック図を示し、第19図にロング命
令をエンベロープパラメータの転送に適用した場合のR
AMのメモリマツプを示し、第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 in Figure 19.
A memory map of AM is shown, and FIG. 20 shows a comparison of operations between a long instruction (single transfer instruction) and multiple transfer instructions.
FIG. 21 shows a flowchart related to envelope parameter transfer using a long instruction.

第18図において、インタラプト発生部116に転送終
了特機部152が結合している。この回路152はロン
グ命令の実行中、インタラプト信号によるメインプログ
ラムの中断を禁止する。転送終了特機部152は図示の
ように結合されたRSフリップフロップ1522、AN
Dゲート1524、Dフリップフロップ1526から成
り、Dフリップフロップ1526の出力(転送終了特機
部152の出力)が実際に作用するインタラプト信号A
−INTとしてROMアドレス制御部214と5CPU
リセット制御部134に結合している。ANDゲー)1
524に入力される信号〜LONGが“L”の間は、イ
ンタラプト発生部l16からインタラプト信号INTが
発生しても、Dフリップフロップ1526の出力は“L
”のままであり、ROMアドレス制御部214と5CP
Uリセット制御部134はインタラプト信号INTの作
用を受けない、ここに、信号〜LONGはロング命令の
実行中に“L″となる信号でありロング命令の実行完了
に伴ってRAMアドレス制御部104の一致回路から発
生するロング命令実行完了信号に応答して“H”に復帰
する。@号〜LONGのレベルが“H″のときには、イ
ンタラプト発生部116からのインタラプト信号INT
は転送終了時41!ts2を通ってROMアドレス制御
部214と5CPUリセット制御部134に作用し、M
CPUIOの制御をメインプログラム(第4図)からイ
ンタラプト処理ルーチン(第5図)に移行させ、5CP
U20のプログラム(第6図)動作を開始させる。
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 an RS flip-flop 1522 and an AN connected as shown in the figure.
Consisting of a D gate 1524 and a D flip-flop 1526, the output of the D flip-flop 1526 (output of the transfer end special unit 152) actually acts on the interrupt signal A.
- ROM address control unit 214 and 5 CPU as INT
It is coupled to the reset control section 134. AND game) 1
While the signal ~LONG input to the D flip-flop 1524 is "L", even if the interrupt signal INT is generated from the interrupt generating section l16, the output of the D flip-flop 1526 is "L".
”, and the ROM address control unit 214 and 5CP
The U reset control unit 134 is not affected by the interrupt signal INT. Here, the signal ~LONG is a signal that becomes “L” during the execution of a long instruction, and the RAM address control unit 104 is activated upon completion of execution of the long instruction. It returns to "H" in response to the long instruction execution completion signal generated from the matching circuit. When the level of @#~LONG is “H”, the interrupt signal INT from the interrupt generation unit 116
is 41 at the end of transfer! It acts on the ROM address control section 214 and the 5 CPU reset control section 134 through ts2,
The CPUIO control is transferred from the main program (Figure 4) to the interrupt processing routine (Figure 5), and the 5CP
The program operation of U20 (FIG. 6) is started.

エンベロープパラメータの更新に一命令方式を適用する
場合において、インタラプト処理ルーチン(第5図、第
6図)のチャンネル音源処理サブルーチン(第9図)が
参照し、メインプログラムのエンベロープ処理サブルー
チン(第21図)が設定(更新)するエンベロープパラ
メータはエンベロープΔχ用タイマー、新目標エンベロ
ープ、新エンヘローフΔx、 新加Hフラグ付エンベロ
ープΔyである0本実施例において、これらのエンベロ
ープパラメータのデータ源は外部メモリ9゜(第1図)
にある、エンベロープパラメータの更新の際に(21−
1)、外部データメモリ90から内部RAM106.2
06のチャンネル音源データ領域への直接の転送は望ま
しくないので、外部データメモリ90からのエンベロー
プパラメータはいったん内部RAM106内の転送用バ
ッファ領域に移しく2l−2)、次に、転送用バッファ
領域からチャンネル音源データ領域に移す(21−3)
When applying the one-instruction method to update envelope parameters, the channel sound source processing subroutine (Fig. 9) of the interrupt processing routine (Figs. 5 and 6) refers to the envelope processing subroutine (Fig. 21) of the main program. The envelope parameters set (updated) by (Figure 1)
When updating the envelope parameters in (21-
1), from external data memory 90 to internal RAM 106.2
Since direct transfer to the channel sound source data area of channel 06 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 from the transfer buffer area. Move to channel sound source data area (21-3)
.

この転送用バッファ領域からチャンネル音源データ領域
へのデータ転送処理21−3に上述したロング命令が使
用される。ロング命令を適用するために、転送用バッフ
ァ領域はRAM上の連続した領域であることを必要とし
、同様にエンベロープパラメータのチャンネル音源デー
タ領域も連続した領域であることを必要とする。この例
を第19図に示す、ここでは、エンベロープパラメータ
の転送用バッファ領域は、レジスタx4〜X7(7)連
続領域にマツピングされエンベロープパラメータについ
ての1チヤンネル音源データ領域はレジスタA4〜A7
の連続領域にマツピングされている。したがって、1チ
ヤンネルでエンベロープパラメータを更新する必要のあ
るときには、21−3で、レジスタx4〜x7をレジス
タA4〜A7に転送するロング命令を実行すればよい、
この命令が実行されている間は、上述したようにインタ
ラプト信号INTがインタラプト発生部116から発生
しても、転送終了特機部152のロング命令完了待機機
能により、ロング命令が終了するまではインタラプト信
号の作用がROMアドレス制御部114.5CPUリセ
ット制御制御部4に波及しない(第20図(B)参照)
、この結果、チャンネル音源データ領域のエンベロープ
パラメータが全て正しい更新値に変更された後にインタ
ラプト処理ルーチンが開始するので、その演算結果(楽
音波形データ)が正しい値を示し、誤りのない動作が保
証される。
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 envelope parameter transfer buffer area is mapped to the continuous area of registers x4 to X7 (7), and the 1-channel sound source data area for the envelope parameters is mapped to the registers A4 to A7.
mapped to a continuous area. Therefore, when it is necessary to update envelope parameters in one channel, it is sufficient to execute a long instruction to transfer registers x4 to x7 to registers A4 to A7 at 21-3.
While this instruction is being executed, even if the interrupt signal INT is generated from the interrupt generation unit 116 as described above, the long instruction completion wait function of the transfer end special unit 152 will not interrupt the interrupt until the long instruction is completed. The effect of the signal does not affect the ROM address control unit 114.5 CPU reset control control unit 4 (see FIG. 20(B)).
As a result, the interrupt processing routine starts after all the envelope parameters in the channel sound source data area have been changed to the correct update values, so the calculation result (music waveform data) shows the correct value and error-free operation is guaranteed. Ru.

これに対しもし、21−3に示す転送処理機能を複数の
転送命令(−命令ごとに1つのエンベロープパラメータ
を転送する)の実行によって果たそうとした場合には、
転送の途中で、例えば、第20図(A)に示すように転
送命令lの実行中にインタラプト信号INTが発生する
と次のマシンサイクルで転送命令2の代りにインタラプ
ト処理ルーチンの最初の命令が実行されてエンベロープ
転送処理は途中で中断されてしまう、この結果、インタ
ラプト処理ルーチンの処理結果(楽音波形データ)は誤
った値となってしまう。
On the other hand, if you try to perform the transfer processing function shown in 21-3 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. 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 instruction or an interrupt release instruction as shown in 7-3.17-5, and transfer processing can be executed in the shortest possible time without overhead.

変形例として、第18図に示すような転送終了特機部1
52の代りに、ロング命令の実行中、制御用ROM10
2.202からの命令をフェッチするインストラクショ
ン出力ラッチ102aの動作を禁止する手段を使用して
もよい、即ち、制御用ROM102からチー2チ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 for inhibiting the operation of the instruction output latch 102a that fetches instructions from the control ROM 102 may be used.
By the mode signal (indicating that the instruction is long) included in the long instruction word given via a,
If a circuit is provided in the operation control circuit 112 that prohibits the generation of the operation latch signal applied to the instruction output latches 102a and 202a and generates the operation latch signal in the next machine cycle in response to the execution completion signal of the long instruction. 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からSCPU20の内部RAM206
にデータを高速にアクセス(リードまたはライト)する
機能を有している。
<5 CPU access function from MCPU> The device of this embodiment has access from MCPUIO to internal RAM 206 of SCPU 20.
It has the ability to access (read or write) data at high speed.

この課題は一般に複数のCPU間のデータアクセス問題
として把えられている0ge来技術ではこの種のインタ
ーCPUデータアクセスに時間がかかる問題がある。従
来技術ではアクセスを要求するCPUからアクセスを要
求されるCPUに対し、要求信号を与える。アクセスを
要求されるCPUはこの要求信号に対し、ただちに要求
側CPUからのデータアクセスを許可する承認信号を発
生することはできず、実行中のオペレーションが完了す
るまで承認信号の発生を遅延させる。したがって、従来
のインターCPUデータアクセス方式は高速処理が要求
されるアプリケーションにおける障害の1つとなってい
る。
This problem is generally understood as a data access problem between a plurality of CPUs.In the 0GE technology, this kind of inter-CPU data access takes a long 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 permits data access from the requesting CPU, but delays generation of the acknowledge signal until the operation in progress is completed. Therefore, the conventional inter-CPU data access method has become one of the obstacles in applications requiring high-speed processing.

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

5cpu停止モ一ド利用方式(第22図、第2、第3図
) この方式は上述した5CPU動作開始・終了機能を利用
したものである。この機能により5CPU20のプログ
ラム(第6図)動作はMCPUIOにおけるインタラプ
ト処理ルーチン(第5図)の開始と同時に開始し、MC
PUIOのインタラプト処理ルーチンが終了する前に終
了する。したがって、MCPUIOにおいてメインプロ
グラム(第4図)が動作している間は5CPU20は停
止モード(リセット状態)にある、第2図に示すように
停止モード中では、リセット制御部134からの信号A
が“5CPU停止中”を示す“H″レベルなる。この信
号Aにより、5CPU20(第3図)ではROMアドレ
ス制御部214の動作が停止し、RAMアドレス制御部
204は5CPU20の制御用ROM202からのRA
Mアドレス八スへAではなく、MCPUIOからパスゲ
ート128を介してRAMアドレスバスMaに結合して
MCPUIOからの5CPU内部RAM206の指定ア
ドレスを受けるように動作モードが設定され、RAMデ
ータに切り換え部240は5CPU20(7)オペレー
ション結果(ALU部208出力または乗算器210出
方)を運ぶデータバスDBではなくMCPUIOからの
データを運ぶデータバスD OUTにRAM206(7
)データインヲ結合する動作モードに設定され、ライト
信号切り換えぼ242は5CPUオペレ一シヨン制御回
路212からのリード/ライト制御信号ではなくオペレ
ージ、ン制御回路112からのり一ド/ライト制御信号
CをRAM206のリード/ライト制御入力に結合する
動作モードに設定される。このように停止状態のとき、
5CPU20はMCPUlOによってデータアクセスが
可能な状態に置かれている。
5-CPU stop mode utilization method (FIGS. 22, 2, and 3) This method utilizes the 5-CPU operation start/end function described above. With this function, the program operation of the 5CPU 20 (Fig. 6) starts simultaneously with the start of the interrupt processing routine (Fig. 5) in the MCPUIO, and
It ends before the PUIO interrupt processing routine ends. Therefore, while the main program (FIG. 4) is operating in the MCPUIO, the 5 CPU 20 is in the stop mode (reset state). In the stop mode as shown in FIG.
goes to "H" level indicating "5 CPUs are stopped". This signal A stops the operation of the ROM address control unit 214 in the 5 CPU 20 (FIG. 3), and the RAM address control unit 204 controls the RAM address control unit 202 from the control ROM 202 of the 5 CPU 20.
The operating mode is set so that the designated address of the 5 CPU internal RAM 206 is received from the MCPUIO by coupling it to the RAM address bus Ma via the pass gate 128 from the MCPUIO, instead of A to the M address 8th, and the switching unit 240 to RAM data 5 CPU 20 (7) The RAM 206 (7) is connected to the data bus D OUT which carries data from MCPUIO instead of the data bus DB which carries the operation result (ALU unit 208 output or multiplier 210 output).
), and the write signal switch 242 selects the read/write control signal C from the operation control circuit 112 instead of the read/write control signal from the CPU operation control circuit 212. Set to operating mode coupled to read/write control input. When stopped like this,
The 5 CPU 20 is placed in a state where it can access data by the MCPUIO.

したがって、本実施例によれば、MCPUIOはメイン
プログラムにおいて5CPU20の内部RAM206を
自由にアクセスすることができる。この様子を第22図
に示す、5CPU20の停止状態(音源処理完了)の確
認、即ちMCPUオペレーション制御回路112におけ
る5CPUリセット制御部134からの5CPU状態フ
ラグの検査はMCPUIOのインタラプト処理ルーチン
(第5図)のなかで1回だけ行えばよい(53参照)、
いったん停止状態が確認されれば、次のインタラプト信
号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 5 CPU 20, that is, inspection of the 5 CPU status flag from the 5 CPU reset control unit 134 in the MCPU operation control circuit 112, is performed by the interrupt processing routine of the MCPUIO (see FIG. 5). ), you only need to do it once (see 53),
Once the stop state is confirmed, the MCPUIO can access the internal RAM 206 of the 5 CPU 20 by executing the - instruction without needing to confirm again until the next interrupt signal INT is generated. Therefore, the time required for data access to the five CPUs 20 is significantly reduced compared to the conventional case.

瞬時強制アクセス 式(第23〜第25図)この方式は
データアクセスのためにMCPUIOと5CPU20と
の間で従来のようなアクセスの要求と承認という手続を
踏むことなく、MCPUIOからの5CPUデ一タアク
セス時に5CPU20の動作を強制的に一時停止させ、
その間にMCPUIOが5CPU20の内部RAM20
6にアクセスするものである。この方式によれば。
Instant forced access method (Figures 23 to 25) This method allows 5 CPU data to be accessed from MCPUIO without going through the conventional procedure of requesting and approving access between MCPUIO and 5 CPU 20 for data access. Forcibly suspends the operation of 5 CPU 20 at the time of access,
Meanwhile, MCPUIO is 5 CPU 20 internal RAM 20
6. According to this method.

MCPUIOは任意のときに5CPU20の状態を調べ
る必要なしに5CPU20を高速に(−命令実行で)ア
クセスできる。
The MCPUIO can access the 5 CPUs 20 at high speed (by executing -instructions) without having to check the status of the 5 CPUs 20 at any time.

このような特徴を備えたMCPUIOのブロック図と5
CPU20のブロック図をそれぞれ第23図と第24図
に示す、なお、このMCPUと5CPUは上述した5C
PU動作開始終了機能に関する要素(第2図の5CPU
リセット制御回路134その他)を含むが第23図と第
24図では簡略化のため図示を省略しである。この場合
、リセット制御回路134からの5CPU動作起動/停
止信号Aは5CPU20 (第24図)のROMアドレ
ス制御部214にのみ供給すれば十分である。第23図
と第24図のMCPUIOと5CPU20の瞬時強制ア
クセスに関する動作のタイムチャートを第25図に示す
Block diagram of MCPUIO with such features and 5
The block diagrams of the CPU 20 are shown in FIGS. 23 and 24, respectively. This MCPU and 5CPU are the 5C
Elements related to the PU operation start/end function (5 CPUs in Figure 2)
23 and 24), but their illustration is omitted for simplification in FIGS. 23 and 24. 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). FIG. 25 shows a time chart of operations related to instantaneous forced access of the MCPUIO and 5 CPU 20 shown in FIGS. 23 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相のクロック信号STI、ST2、Sr1の一周
期でそのマシンサイクルが規定される。
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-on control circuit 112M of MCPUIO when a data access command 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
Three-phase clock signals T1, T2 . One cycle of T3 defines a machine cycle (the shortest one instruction execution time), and in the 5 CPU 20, one cycle of three-phase clock signals STI, ST2, and Sr1 from the clock generation circuit 236M defines the machine cycle. .

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

MCPUIOにおける5CPUアクセス命令実行中にオ
ペレーション制御回路112から出力される5CPUア
クセス信号りは、5CPU20のクロック発生回路23
6Mを停止させて5CPU20で実行中のオペレーショ
ンを停止させるとともに、その停止中にMCPUIOが
5CPU20の内部RAM20Bをアクセスできるよう
に、MCPUIOからの内部RAM206の指定アドレ
スに係るバスゲート128.5CPU内部RAM206
に対するアドレス制御部204、データイン切り換え部
240、及びライト信号切り換え部242の各動作モー
ドをMSCPU側”から“MCPU側”に切り換える機
能を有する。このために、5CPUアクセス信号はこれ
らの要素128.204.240.242の動作モード
を選択する制御入力にDフリー、プフロップ250とA
NDゲート252とから成る遅延回路を介して結合して
いる。このようなアクセス可能状態の下で、MCPUI
Oはバスゲート128、RAMアドレス制御部204を
介して5CPU内部RAM206をアドレッシングし、
リードアクセスの場合には5CPU内部RAM206か
ら出力されるデータをバスゲート132を介してMCP
U内部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 20, and to allow the MCPUIO to access the internal RAM 20B 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 ``MSCPU side'' to the ``MCPU side'' for the 5 CPU access signals. 204.240.242, D free, pflop 250 and A are used as control inputs to select the operating mode of 242.
The ND gate 252 is coupled to the ND gate 252 via a delay circuit. Under such accessible state, the MCPUI
O addresses the 5 CPU internal RAM 206 via the bus gate 128 and the RAM address control unit 204,
In the case of read access, the data output from the 5CPU internal RAM 206 is sent to the MCP via the bus gate 132.
The data is read into the U internal RAM 106, and in the case of write access, the write data is transferred to the data bus D OUT via the pass gate) 130, and then transferred to the 5 CPU internal RAM 206.
A write signal C is given to write data.

MCPUIOからの5CPUアクセス信号りによって5
CPU20のオペレーションを中断する場合に、オペレ
ーションの中間結果が失われないようにする必要があり
、5CPUアクセス信号りの解除後に、予め保持した中
間結果を用いて5CPU20がオペレーションの残りの
部分を実行できるようにする必要がある。このために、
5CPU内部RAM206のデータ出力を一時的に記憶
するラッチ206a、206bを設けている。ラッチ2
06aはRAM206からの演算数(@1オペランド)
を5TICKIのタイミングでラッチし、ラッチ206
bはRAM206からの被演算数(第2オペランド)を
5T2CK1のタイミングでチー2チする。
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 (@1 operand)
is latched at the timing of 5TICKI, and the latch 206
b checks the operand (second operand) from the RAM 206 at the timing of 5T2CK1.

第25図を参照して動作例を述べると、この例では、M
CPUloは5CPUアクセス信号りがハイアクティブ
レベルの間に5CPU20の内部RAM206に対する
ライトアクセスを実行している。MCPUloではこの
データ書込オペレーションの最初のタイムスロットTI
の間に、MCPU内部RAM106から転送データ(R
AM206に書き込むべきデータ)を取り出す0次のタ
イムスロットT2でMCPUIOは5CPU内部RAM
206をアドレー、シングする。最後のタイムスロット
T3でMCPUIOは5CPU内部RAM206にライ
ト信号Cを与えてRAM206にデータを書き込む、5
CPU20側にとってMCPUIOからの5CPUアク
セス信号りは5CPU20(7)オペレーション2がタ
イムスロットST2に移るときはアクティブに変化して
いる。このオペレーション2は5CPU20のRAM2
06にある被演算数と演算数をALU部208またハ乗
算器210で演算するような命令のオペレーションであ
り得る。MCPUloがらの5CPUアクセスタイムの
直前のタイムスロットテアルオヘIy −ジョン2の最
初のタイムスロッ)STI−t’5CPU20はRAM
I O6から演算数のデータを取り出し、そのデータを
クロー7りTICKIにより演算数ラッチ106aにラ
ッチしている0MCPUl0からの5CPUアクセス信
号りが発生しなければ、5CPU20は次のタイムスロ
ットST2でRAM106から被演算数を取り出して被
演算数ラッチlObにラッチし、最後のタイムスロット
ST3でALU部108または乗算器110で演算を実
行してRAM106の被演算数レジスタに書き込む、実
際には図示のようにオペレーション2の最初のタイムス
ロツ)STIに続いてMCPUIOからの5CPUアク
セス信号りが発生している。この場合、1つの対策はオ
ペレーション2の残り2つのタイムスロットST2とS
T3で実行すべき処理を5CPUアクセス信号りが除去
されるまで、即ちMCPUIOの5CPUアクセスオペ
レーシヨンが終了するまで中断することである。この方
式でもMCPUIOは5CPU20をアクセスするオペ
レーションを最短時間(MCPUIO(7)内fflR
AM106をアクセスするのと同じ時FIIJ)内に実
行できるが、5CPU20にとっては最適でjオなくM
CPUIOからの5CPUアクセスオペレーシヨンの都
度、5CPU20のオペレーションがタイムスロット3
つ分遅延されることになる。都合のよいことに、MCP
UIOの5CPUアクセスオペレーシヨンの最初のタイ
ムスロットTIで実行される処理は5CPU20に影響
を与えない処理である。この特徴を利用し、実施例では
MCPUIOから5CPUアクセス信号りが与えられて
も、MCPUloのタイムスロ、 トTlの間は、5C
PU20自身のオペレーションが継続できるようにして
、5CPU20の動作遅れをできるだけ短かくしている
。第25図の例でいえば、5CPU20はMCPU 1
0の5CPUデータ書込オペレーシヨンの最初のタイム
スロットT1の開に、RAM206かも被演算数のデー
タを取り出し、ラッチ206bにクロック5T2CK1
を与えて被演算数をラッチさせている。その後、5CP
Uクロック発生回路236の動作は5CPUアクセス信
号りが除去されるまで停止し、5CPU20は待ち状態
に置かれる。そしてこの待ち状態の間、5CPU20の
要素128.264.240,242は5CPU7クセ
ス信号りにより“MCPU側”に切り換えらn、MCP
Uloo)SCPUデータ書込オペレーションにおける
タイムスロッ)T2、T3に関する処理が実行されて5
CPU内部RAM206にMCPUIOからのデータが
書き込まれる。
An operation example will be described with reference to FIG. 25. In this example, M
CPUlo 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
During this period, transfer data (R
At the 0th 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 206 and writes data to RAM 206, 5
On the CPU 20 side, the 5CPU access signal from MCPUIO changes to active when the 5CPU 20 (7) operation 2 moves to time slot ST2. This operation 2 is 5 CPU 20 RAM 2
This may be an instruction operation in which the operands and operands in 06 are operated on by the ALU unit 208 or the multiplier 210. The timeslot just before the 5CPU access time of MCPUlo (the first timeslot of John 2) STI-t'5CPU20 is the RAM
If no 5CPU access signal is generated from 0MCPUl0, which takes out the data of the arithmetic operation from IO6 and latches the data into the arithmetic operation latch 106a using TICKI, the 5CPU20 will read the data from the RAM 106 in the next time slot ST2. The operand is taken out and latched into the operand latch lOb, and in the last time slot ST3, the operation is executed by the ALU unit 108 or the multiplier 110 and written to the operand register of the RAM 106.Actually, as shown in the figure. In the first time slot of operation 2), 5 CPU access signals from MCPUIO are generated following STI. In this case, one solution is to use the remaining two time slots ST2 and S of operation 2.
The process to be executed at T3 is suspended until the 5CPU access signal is removed, that is, until the 5CPU access operation of MCPUIO is completed. Even with this method, MCPUIO performs operations that access 5 CPUs 20 for the shortest time (fflR in MCPUIO (7)).
It can be executed within FIIJ at the same time as accessing AM106, but it is optimal for 5CPU20 and M
Every time there is a 5 CPU access operation from CPUIO, the 5 CPU 20 operation is in time slot 3.
There will be a delay of one minute. Conveniently, MCP
The process executed in the first time slot TI of the UIO 5CPU access operation is a process that does not affect the 5CPU 20. By utilizing this feature, in the embodiment, even if a 5CPU access signal is given from MCPUIO, the 5C
The operation delay of the 5 CPUs 20 is made as short as possible by allowing the PU 20 to continue its own operation. In the example of Fig. 25, 5 CPU 20 is MCPU 1
At the opening of the first time slot T1 of the 5CPU data write operation of 0, the RAM 206 also takes out the data of the operand, and the clock 5T2CK1
is given to latch the operand. After that, 5CP
The operation of the U clock generation circuit 236 is stopped until the 5CPU access signal is removed, and the 5CPU 20 is placed in a wait state. During this waiting state, the elements 128, 264, 240 and 242 of the 5CPU 20 are switched to the "MCPU side" by the 5CPU 7 access signal.
Uloo) Time slot in SCPU data write operation) Processing related to T2 and T3 is executed and 5
Data from MCPUIO is written to the CPU internal RAM 206.

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

第25図のタイムチャートに示すように、5cPU20
(7)動作がMCPUl 0から(7)SCPU7クセ
スオペレーシヨンの都度、中断される時間はタイムスロ
ット2つ分だけである。
As shown in the time chart of Figure 25, 5cPU20
(7) Each time an operation is accessed from MCPUl 0 to (7) SCPU7, the interruption is only for two time slots.

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

以上のように、瞬時強制アクセス方式によればMCPU
IOは5CPU20の内部RAM206に対するアクセ
スをMCPU自身のRAM106に対するアクセスと同
様に最短峙間内で実行でき、待ち時間命令を実行する必
要がない、更に、瞬時強制アクセス方式によれば、5C
PU20のオペレーションを途中で中断し、MCPUI
Oの5CPUアクセスオペレーシヨン後に、中断された
ところからオペレーションを再開できる。したがって、
MCPUIOは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 5CPU 20 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, the 5C
Interrupt the PU20 operation midway and open the MCPUI.
After O's 5 CPU access operations, the operation can be resumed from where it was interrupted. therefore,
MCPUIO does not need to check the status of 5CPU 20 before accessing 5CPU 20, and can freely access 5CPU 20 at any time, for example, during the included processing routine (FIG. 5).

く共用メモリアクセス競合解消機能(第26、第27図
、第1図)〉 ls1図において外部メモリ90は複数のCPU、Il
lちMCPUIOと5CPU20に共用されるデータメ
モリである。したがって外部データメモリ90に対する
複数のアクセス、即ち、MCPUIOからの外部データ
メモリ90アクセスと、5CPU20からの外部データ
メモリ90アクセスをサポートする手段が必要である。
Shared memory access conflict resolution function (Figures 26, 27, and 1) In Figure ls1, the external memory 90 is
It is a data memory shared by the MCPUIO and the 5 CPUs 20. Therefore, means for supporting multiple accesses to the external data memory 90, ie, accesses to the external data memory 90 from the MCPUIO and from the 5 CPUs 20, is required.

更に、外部データメモリ90を共用化する場合において
MCPUI oと5cptrzoとが外部データメモリ
90を同時にアクセスを試みることを許容するのが望ま
れる。MCPUloと5CPU20.!:(7)間で外
部データメモリ90に対する使用権(トークン)を交換
する機能を設けることにより、MCPUIOと5CPU
20が同時には外部データメモリ90をアクセスしない
ようにすることもできるが、トークンの手続は外部デー
タメモリアクセスのための準備時間を占めるので、外部
データメモリアクセスに要するトータルの時間が長くな
り、効率的でない、一方、MCPUIOと5CPU20
による外部データメモリ90の同時アクセスを許容する
場合、メモリ90自体は物理的に同時アクセス不能であ
るので、同時アクセスによるアクセス競合を解消する手
段が必要となる。
Furthermore, when the external data memory 90 is shared, it is desirable to allow MCPUI o and 5cptrzo to attempt to access the external data memory 90 at the same time. MCPUlo and 5CPU20. ! :(7) By providing a function to exchange usage rights (tokens) for the external data memory 90 between MCPUIO and 5CPU
20 may not access the external data memory 90 at the same time, but since the token procedure occupies the preparation time for accessing the external data memory, the total time required for accessing the external data memory becomes longer, which reduces efficiency. On the other hand, MCPUIO and 5CPU20
When allowing simultaneous access to the external data memory 90 by the external data memory 90, 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のアドレス入力に結合されており、外部
メモリ9oからのデータ出力はデータ変換回路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
外部メモリアドレスチッチ30S、アドレス切り換え回
路40、MCPU外部メモリデータラッチ80M、5C
PU外部メモリデータラッチ80Sが制御されるように
なっている。このメモリ装置競合回避回路5゜に上述し
たアクセスの競合を回避する機能が含まれている。
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 9o. 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 MCPU external memory address latch 30M is controlled by the memory device contention avoidance circuit 50 that receives the
External memory address switch 30S, address switching circuit 40, MCPU external memory data latch 80M, 5C
The PU external memory data latch 80S is controlled. This memory device conflict avoidance circuit 5° includes a function to avoid the above-mentioned access conflict.

第26図にメモリ装置競合回避回路5oのブロック図を
示し、第27図にアクセスの競合に対する動作のタイム
チャートを示す。
FIG. 26 shows a block diagram of the memory device conflict avoidance circuit 5o, 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図において
図示省略)が結合する。MCPUリセット信号MRES
はセットリセット回路(R−Sフリップフロップ)50
2とその出力に結合するセットリセット回路506をリ
セットし、信号MCPU−romaは、セットリセット
回路502をセットする。セットリセット回路502は
MCPUIOからのアクセス要求を一時記憶し、出力側
セ7トリセ?)回路506はセット状態において、MC
PUIOからのアクセス要求が受け付けられて外部メモ
リデータアクセス制御信号発生回路510を介してアク
セスのオペレーションが実行中であることを示す、同様
に5CPUリセット信号5RESはセットリセット回路
504とその出力に結合するセットリセット回路508
をリセットし、信号SCPU−romaはセットリセッ
ト回路504をセットする。セットリセット回路504
は5CPU20からのアクセス要求を一時記憶し、出力
側セットリセット回路508はセット状態において5C
PU20からのアクセス要求が受け付けられアクセスの
オペレーションが実行中であることを示す。
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. MCPU reset signal MRES
is set-reset circuit (R-S flip-flop) 50
2 and its output, and the signal MCPU-roma sets the set-reset circuit 502. The set/reset circuit 502 temporarily stores access requests from the MCPUIO, and output side set/reset? ) circuit 506 in the set state, the MC
Similarly, the 5CPU reset signal 5RES, which indicates that an access request from the PUIO has been accepted and an access operation is being executed via the external memory data access control signal generation circuit 510, is coupled to the set reset circuit 504 and its output. Set reset circuit 508
The signal SCPU-roma sets the set-reset circuit 504. Set reset circuit 504
temporarily stores the access request from the 5CPU 20, and the output side set reset circuit 508 outputs the 5C in the set state.
This indicates that the access request from the PU 20 has been accepted and the access operation is being executed.

詳細に述べると、MCPUアクセス要求セットリセット
回路502のセット状態の出力“H”は5CPUアクセ
ス実行セットリセット回路508がセット状態でないこ
とを条件として、即ち、5CPU20のアクセスオペレ
ーションが実行中でないことを条件として(値入力が5
08からのインバータ522を介した反転入力に結合す
るANDゲート524を介して)MCPUアクセス実行
セットリセット回路506をMCPUアクセス実行状態
にセットし、このMCPUアクセス実行セットリセット
回路506をセットする信号により、ORゲー)512
 (値入力がリセット信号MRESに結合する)を介し
てMCPUアクセス要求セットリセット回路502をリ
セットする。同様に、5CPUアクセス要求セットリセ
ット回路504のセット状態の出力“H″はMCPUア
クセス実行セットリセット回路506がセット状態でな
いことを条件として、即ちMCPUIOのアクセスオペ
レーションが実行中でないことを条件として(値入力の
1つが506からのインバータ520を介した反転入力
に結合するANDゲート526)を介して5CPUアク
セス実行セットリセット回路508を5CPUアクセス
実行状態にセットし、この5CPUアクセス実行セット
リセット回路508をセー7トする信号により、ORゲ
ート516 (値入力がリセット信号5RESに結合す
る)を介して5CPUアクセス要求セットリセット回路
504をリセットする1以上の構成により、片方(7)
CPU (例えば5CPU2o)からアクセス要求があ
っても、他方のCPU(MCPUIO)に関するアクセ
スオペレーションが実行中のときは、その実行が完了す
るまではアクセスを要求したCPU (SCPU20)
に関するアクセスオペレーションは実行されない、これ
により、アクセスの競合が基本的に回避される。
Specifically, the output “H” in the set state of the MCPU access request set reset circuit 502 is conditional on the condition that the 5 CPU access execution set reset circuit 508 is not in the set state, that is, on the condition that the access operation of the 5 CPU 20 is not being executed. as (value input is 5
A signal that sets the MCPU access execution set reset circuit 506 to the MCPU access execution state (via an AND gate 524 coupled to an inverting input via an inverter 522 from 08). OR game) 512
MCPU access request set reset circuit 502 (value input is coupled to reset signal MRES). Similarly, the output “H” in the set state of the 5CPU access request set reset circuit 504 is set on the condition that the MCPU access execution set reset circuit 506 is not in the set state, that is, on the condition that no MCPUIO access operation is being executed (value Sets the 5 CPU access execution set reset circuit 508 to the 5 CPU access execution state through an AND gate 526 ), one of whose inputs is coupled to an inverting input from 506 via an inverter 520 , and sets the 5 CPU access execution set reset circuit 508 to the 5 CPU access execution state. one or more configurations that reset the 5CPU access request set reset circuit 504 via the OR gate 516 (value input is coupled to the reset signal 5RES) by a signal that
Even if there is an access request from a CPU (for example, 5CPU2o), if an access operation related to the other CPU (MCPUIO) is being executed, the CPU that requested the access (SCPU20) will wait until the execution is completed.
No access operations are performed, which essentially avoids access conflicts.

更に、MCPUIOと5CPU20とが完全に同時にア
クセスを要求する場合がある。このアクセス競合に対し
、実施例では、MCPUIOからのアクセス要求を優先
させ、MCPUIOのアクセスオペレーションを実行し
てから、5CPU20のアクセスオペレーションを実行
している。このために、MCPUアクセス要求セットリ
セット回路502がセット状態のときはその出力信号″
H”によりインバータ525を介してANDゲート52
6を禁止しており、セットリセット回路502がセット
中のときは5CPUアクセス要求セットリセット回路5
04がセット状態でも5CPUアクセス実行セットリセ
ット回路508がセットされないようにしている。
Furthermore, MCPUIO and 5 CPUs 20 may request access completely simultaneously. 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 reason, when the MCPU access request set reset circuit 502 is in the set state, its output signal "
AND gate 52 via inverter 525 due to
6 is prohibited, and when the set reset circuit 502 is setting, 5 CPU access request set reset circuit 5
Even if 04 is set, the 5 CPU access execution set reset circuit 508 is prevented from being set.

外部メモリデータアクセス制御信号発生回路510は、
セットリセット回路506と508からの出力に結合し
、いずれかのセットリセット回路の出力がセット状態“
H”に変化すると、そのセット状態が示すCPUアクセ
スのオペレーションを一連のシーケンスで実行する。外
部メモリデータアクセス制御信号発生回路510から出
力される信号CEとOEは外部メモリ7からデータを出
力するための制御信号であり、信号MDLはMCPU外
部メモリデータラッチ80Mに外部メモリ90からのデ
ータをラッチするための制御信号であり、信号SDLは
SCPU外部メモリデータラッチ80Sに外部メモリ9
0からのデータをラッチするための制御信号である。外
部メモリデータアクセス制御信号発生回路510はアク
セスオペレーションの実行を終了するとEND信号を発
生する。このEND信号により、セット状態にあつたア
クセス実行セットリセット回路はリセットされる。即ち
、END信号は抽入力がセットリセ。
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 SCPU external memory data latch 80S.
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 resets the access execution set reset circuit that was in the set state. That is, the END signal is reset by the extraction input.

ト回路506の出力に結合するANDゲート528と抽
入力がMCPUリセット信号MRESに結合するORゲ
ート514を介してセットリセット回路506のリセッ
ト入力に結合し、また抽入力がセットリセット回路50
8の出力に結合するANDゲート530と抽入力が5C
PUリセット信号5RESに結合するORゲート518
を介してセットリセット回路508のリセット入力に結
合する。
An AND gate 528 is coupled to the output of the set reset circuit 506 and an extract input is coupled to the reset input of the set reset circuit 506 via an OR gate 514 whose extract input is coupled to the MCPU reset signal MRES.
AND gate 530 coupled to the output of 8 and the input input is 5C
OR gate 518 coupled to PU reset signal 5RES
to the reset input of the set-reset circuit 508.

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

第27図の場合、MCPUIOと5CPU20は“MC
PUオペレーションのroma、  “5CPUオペレ
ーシヨンのr o m a″に示すように同時に外部メ
モリ90に対するアクセスを要求している。このr o
ma命令のオペレーションにおいて、MCPUIOはア
ドレスバスMAにアドレス情報を送出し、信号MCPU
−romaを出力してMCPU外部メモリアクセス用ア
ドレスラッチ30Mにアドレス情報をラッチさせ、同様
に5CPU20はアドレスバスSAにアドレス情報を送
出し、信号SCPU−romaを出力しテ5CPU外部
メモリアクセス用アドレスチッチ30Sにアドレス情報
をラッチさせる。同時に発生するMCPU−roma信
号とSCPU−roma信号により、メモリ装置競合回
避回路50のMCPUアクセス要求セットリセット回路
502と5CPUアクセス要求セットリセット回路50
4は同時にセットされる。これに対し、上述したMCP
Uアクセス優先論理に従い、MCPUアクセス実行セッ
トリセット回路506がただちにセット状態に変化し、
それにより外部メモリデータアクセス制御信号発生回路
510が外部メモリ90に対するMCPUIOのアクセ
スオペレーションを実行する。この時点でアドレス切り
換え回路40はMCPUIOからのアドレス情報を選択
している。MCPUloのアクセスオペレーションの期
間を第27図の左方の期MsLで示す(なお、回路51
0は2相のマスタークロックCK1.CK2で動作する
が、第26図では図示を省略しである)、外部メモリデ
ータアクセス制御信号発生回路510は期間nでチー、
ブイネーブル信号CEをローアクティブにし1期間nの
後半の期間mで出力イネーブル信号OEをローアクティ
ブする。したがって、この期間mにおいて外部メモリ9
0からMCPU I Oが要求したデータが出力され、
この期間m内に外部メモリデータアクセス要求信号発生
回路510から発生する信号MDLにより、この出力デ
ータがMCPU外部メモリデークラッチ80Mにラッチ
される。これにより、外部メモリデータアクセス要求信
号発生回路510のMCPUIOのためのアクセスオペ
レーションは完了するので、回路510はエンド信号E
NDを出力する。これにより、MCPUアクセス実行セ
ー、トリセット回路506はリセットされ1代りに5C
PUアクセス実行セットリセット回路508がセットさ
れる。これにより信号MSELは5CPUアドレス選択
を示す“L”レベルに変化し、アドレス切り換え回路4
0は5CPU20からのアドレスを選択して外部メモリ
90をアドレッシングする。更に、5CPUアクセス実
行セットリセット回路508からのセット信号に応答し
て外部メモリデータアクセス制御信号発生回路510が
5CPU20のためのアクセスオペレーションを実行す
る。この期間を第27図の右側の期間文で示す、このオ
ペレーションにおいて外部メモリデータアクセス制御信
号発生回路510は信号CEをローアクティブにし、そ
の後半の期間PI信号OEをローアクティブにして5C
PU20の要求したデータを外部メモリ90から出力さ
せ、その出力中に信号SDLを発生して5CPU外部メ
モリデータラッチ803に5CPU20の要求したデー
タをラッチさせる。これにより、外部メモリデータアク
セス制御信号発生回路510の5CPU20のためのア
クセスオペレーションは完了するので同回路510はエ
ンド信号ENDを出力して5cPUアクセス実行セット
リセット回路508をリセット状態に戻す。
In the case of Fig. 27, MCPUIO and 5CPU20 are “MC
The PU operation roma requests access to the external memory 90 at the same time as shown in "5CPU operation roma". This r o
In the operation of the ma instruction, MCPUIO sends address information to the address bus MA and outputs the signal MCPUIO.
-roma to cause the MCPU external memory access address latch 30M to latch the address information, and similarly, the 5CPU 20 sends address information to the address bus SA, outputs the signal SCPU-roma, and sets the 5CPU external memory access address latch 30M. 30S to latch the address information. The MCPU access request set reset circuit 502 and the 5CPU access request set reset circuit 50 of the memory device contention avoidance circuit 50 are activated by the MCPU-roma signal and the SCPU-roma signal that are generated simultaneously.
4 are set at the same time. On the other hand, the MCP mentioned above
According to the U access priority logic, the MCPU access execution set reset circuit 506 immediately changes to the set state;
Thereby, the external memory data access control signal generation circuit 510 executes the MCPUIO access operation to the external memory 90. At this point, the address switching circuit 40 has selected the address information from MCPUIO. The period of the access operation of MCPUlo is indicated by the period MsL on the left side of FIG.
0 is the two-phase master clock CK1. CK2 (although not shown in FIG. 26), the external memory data access control signal generation circuit 510 operates with CK2 in period n,
The output enable signal CE is made low active, and the output enable signal OE is made low active during the second half period m of one period n. Therefore, during this period m, the external memory 9
The data requested by MCPU I O is output from 0,
This output data is latched into the MCPU external memory data latch 80M by the signal MDL generated from the external memory data access request signal generation circuit 510 within this period m. As a result, the access operation for MCPUIO of the external memory data access request signal generation circuit 510 is completed, so that the circuit 510 receives the end signal E.
Output ND. As a result, the MCPU access execution reset circuit 506 is reset and the 5C
The PU access execution set reset circuit 508 is set. As a result, the signal MSEL changes to the "L" level indicating selection of the 5 CPU address, and the address switching circuit 4
0 selects an address from the 5 CPU 20 to address the external memory 90. Further, in response to a set 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 by the period sentence on the right side of FIG. 27. In this operation, the external memory data access control signal generation circuit 510 makes the signal CE low active, and in the latter half of the period, the PI signal OE is made low active and 5C.
The data requested by the PU 20 is outputted from the external memory 90, and during the output, a signal SDL is generated to cause the 5CPU external memory data latch 803 to latch the data requested by the 5CPU 20. As a result, the access operation for the 5 CPU 20 of the external memory data access control signal generation circuit 510 is completed, so the circuit 510 outputs the end signal END and returns the 5 cPU access execution set reset circuit 508 to the reset state.

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

コノようにして各CPUl0120はr o m a命
令(外部メモリアクセス要求命令)を実行後、メモリ装
置競合回避回路50が両CPUのためのアクセスオペレ
ーションを実行する所定の期間2文だけ待てば要求した
データを得ることができ、アクセス競合の問題が解消さ
れる。更に、待機時間が一定(2交)なので、各CPU
l0120はこの期間を他の命令の実行に使用すること
ができ、プログラム命令の実行効率が最適化される。
In this way, after each CPU 10120 executes the r o m a instruction (external memory access request instruction), the memory device contention avoidance circuit 50 waits for a predetermined period of two sentences to execute the access operation for both CPUs. data can be obtained, and the problem of access contention is resolved. Furthermore, since the standby time is constant (2 cycles), each CPU
10120 can use this period to execute other instructions, optimizing the execution efficiency of program instructions.

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

くアドレス・データ変換/\−ドウエア(第28〜第3
2図、第1図)〉 一般に、CPUを含むマイクロコンピュータシステムに
おいて、データメモリにある原データから演算用メモリ
上に原データを変換したデータ(原データから抽出され
る所望の情報)を作成することがしばしば望まれる。特
にこの種のデータは変換はデータメモリの記憶容量を効
率的に使用したような場合にその補償として必要になる
。この目的のため、従来では、データメモリから演算用
メモリへの転送命令を実行して、データメモリの原デー
タを演算用メモリに移し、次に1以上の変換命令を実行
して、演算用メモリにあるデータをALUを介して変換
する。したがって、従来の場合、演算用メモリ上に所望
のデータを得るためのデータ変換手続に時間がかかり、
高速処理が要求されるアプリケーションにおける障害の
1つとなっている。
Address/data conversion/\-ware (28th to 3rd
In general, in a microcomputer system including a CPU, converted data (desired information extracted from the original data) is created on the calculation memory from the original data in the data memory. is 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 RAM 206, data that has been subjected to desired conversion is read into the internal RAM 106, 206, thereby speeding up data conversion processing. 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の命令r o m a Oは変換なしの転
送命令であり、これに対し、アドレス変換回路60はC
PUl0.20から与えられる入力アドレスをそのまま
出力アドレスとして外部データメモリ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 uses C
The input address given from PU10.20 is directly passed to the external data memory 90 as an output address, and the data conversion circuit 70 also converts the data from the external data memory 90 (
16-bit data) to the CPU10120 without conversion.
give it to

この無変換転送命令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が“O”のときは下位12ビー7トを無変
換で通すが第13ビツトA12がl″のときは下位12
ビツトを反転させる。なお、アドレス変換回路6oの出
力アドレスの第13ビツトは入力アトレスの第13ピツ
)A12の値にかかわらず“θ″に固足される。
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
When bit A12 is "O", 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 6o is fixed at "θ" regardless of the value of the 13th bit (A12) of the input address.

また、この命令に対し、データ変換回路70はCPUl
0120から送られてきた入力アドレスの第13ビツト
A12をCPUl0,20に送るデータの第13ビツト
012とするとともにAl1が“1″のとき下位の12
ビツトデータを反転する形式で外部メモリ90からのデ
ータを変換する。したがって、外部メモリ90のアドレ
ス領域0000〜0FFFに第28図に示すような有効
データビット数12の特殊波形データ(o o o 。
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 012 of the data sent to CPU10, 20, and when Al1 is "1", the lower 12
The data from the external memory 90 is converted in a format that inverts the bit data. Therefore, special waveform data (o o o) having 12 effective data bits as shown in FIG. 28 is stored in the address area 0000 to 0FFF of the external memory 90.

〜0FFF)があるとすると、CP[Jlo、20がこ
の命令を指定アドレス0000〜I FFFの範囲につ
いて繰り返し実行した場合に、アドレス変換回路60か
ら出力される外部メモリアドレスはいったん0000か
ら0FFFに進み、この間、データ変換回路70は外部
メモリ90からのデータをそのまま通し、その後、アド
レス変換回路60の反転動作により、外部メモリ90へ
のアドレスは0FFFからooooに後進し、この間、
データ変換回路70は外部メモリ9oかも出力されるデ
ータの下位12ビツトを反転し、第13データビツトD
12を1″にして変換されたデータを出力する。結局、
CPUl0120がアドレスを0000〜I FFFに
動かして命令r。
~0FFF), when CP[Jlo, 20 repeatedly executes this instruction for the specified address range 0000 to IFFF, the external memory address output from the address translation circuit 60 will once advance from 0000 to 0FFF. , During this time, the data conversion circuit 70 passes the data from the external memory 90 as is, and then, due to the inversion operation of the address conversion circuit 60, the address to the external memory 90 is reversed from 0FFF to oooo, and during this time,
The data conversion circuit 70 also inverts the lower 12 bits of the data output from the external memory 9o, and converts the 13th data bit D
12 to 1'' and output the converted data.In the end,
CPU10120 moves the address from 0000 to IFFF and executes the instruction r.

m a 1を繰り返し実行した場合に、CPUl012
0が実際に受け取る波形は第28図のrOnlLlの欄
の右方に示すような波形となる。この変換波形は左方に
示す外部メモリ90内の原波形を所定の態様で延長した
繰り返し波形(アドレス0FFF、データ0FFFの点
について対称な波形)である、この結果、記憶容量の点
についていうと、変換波形のデータ自体を予め外部デー
タメモリ90に記憶させる方式に比べ、波形データ記憶
容量が半分になる利点がある。この命令r o m a
lの場合、制御信号R1,R2、R3のうちR1のみが
“H”レベルになる。
When m a 1 is repeatedly executed, CPUl012
The waveform actually received by 0 is the waveform shown on the right side of the rOnlLl column in FIG. This converted waveform is a repetitive waveform (a waveform that is symmetrical about the address 0FFF and data 0FFF points) obtained by extending the original waveform in the external memory 90 shown on the left in a predetermined manner.As a result, in terms of storage capacity, This method has the advantage that the waveform data storage capacity is halved compared to a method in which the converted waveform data itself is stored in advance in the external data memory 90. This command r o m a
In the case of 1, only R1 among the control signals R1, R2, and R3 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”のときは、外部データ
メモリ9oからの16ビツトデータのうち、下位の8ビ
ツトを残し、上位の8ビツトを“0”にマスクする変換
を実行し、A15が“1″′のときは外部データメモリ
90から16ビツトデータのうち、上位の8ビツトを下
位8ビツトにシフトする(残った上位8ビツトはマスク
)変換を実行する。また、データ変換回路70において
入力アドレスの第16ビツトA15を制御信号として使
用しているので、アドレス変換回路60ではA15の値
にかかわらず出力アドレスの第16ビツトを所定値″θ
″にマスクする。なお、この場合において外部データメ
モリ90からの16ビー、ト情報の上位8ビツトと下位
ビットとの関係は、1つのデータ(例えば位相データ)
における上位データ部分(例えば整数部)と下位データ
部分(例えば小数m)のような関係であってもよいし、
異なる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 9o and converts the upper 8 bits to "0". ”, and when A15 is “1'', shift the upper 8 bits of the 16-bit data from the external data memory 90 to the lower 8 bits (the remaining upper 8 bits are masked). Execute. Furthermore, since the data conversion circuit 70 uses the 16th bit A15 of the input address as a control signal, the address conversion circuit 60 sets the 16th bit of the output address to a predetermined value "θ" regardless of the value of A15.
In this case, the relationship between the upper 8 bits and lower bits of the 16-bit information from the external data memory 90 is one data (for example, phase data).
The relationship may be between the upper data part (for example, the integer part) and the lower data part (for example, the decimal number m),
An independent relationship such as two different types of 8-bit data (for example, rate data and level data) may be used.

第4の命令ROMA3は外部メモリデータをシフトして
一部を読み出す命令である。この命令の場合、R3のみ
が“H″レベルなる。この命令に対し、データ変換回路
70は外部メモリ90からの16ビツトデータのうち、
bit15はそのままにして上位12ビツトのbit1
5〜bit4をbit14〜bit3にシフトし、下位
の3ビツトbit2〜bitOを0にマスクする変換を
行う、ここに、外部メモリ90の16ビツトデータのう
ち上位12ビツトは例えばbit15を符号ビットとす
る波形データであり、下位4ビツトは別のデータを表わ
す、この場合、上記の変換により、CPUl0120は
内部RAM106.206上で使用するのに適したフォ
ーマットの波形データを高速に読み取ることができる。
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.
Shift bits 5 to 4 to bits 14 to 3, and perform conversion to mask the lower 3 bits bits 2 to 0 to 0. Here, of the 16 bits of data in the external memory 90, the upper 12 bits, for example, set bit 15 as the sign bit. In this case, the above conversion allows CPU 10120 to quickly read waveform data in a format suitable for use on internal RAM 106.206.

第29図にアドレス変換回路60のブロック図を示す、
このアドレス変換回路60にはMCPUlOまたは5C
PU20からアドレスラッチ30M、30S、アドレス
切り換え回路40を介して入力される16ビツトのアド
レスのうち、下位12ビツト(b i t O〜bit
ll)が詳細を第30図に示す反転回路610に入力さ
れる。この反転回路610は信号R1が命令romal
を表わす“l”でアドレスのA12が“1″のときAN
Dゲー)612からの信号により動作して入力されるア
ドレスの下位12ビツトを反転させる。また、命令r 
omalの実行時に“l”となる信号R1はインバータ
602を介して、ANDゲート604を禁止し、入力ア
ドレスのA12の値にかかわらず出力アドレスの対応ビ
ット(bit12)を“ONにする。入力アドレスのA
l1とA14はそのまま出力アドレスの対応ピッ)(b
it13、bit14)として出力される。入力アトレ
スのA15(MSB)はANDゲート608を介して出
力アドレスの対応ビーアト(btt15)となる、命令
r o m a 2の実行中を表わす“l”の信号R2
が発生しているとき、この信号R2がインバータ606
を介してANDゲート608を禁止して出力アドレスの
bft15(MSB)を0″にマスクする。
FIG. 29 shows a block diagram of the address conversion circuit 60.
This address conversion circuit 60 includes MCPU1O or 5C.
Of the 16-bit address input from the PU 20 via the address latches 30M, 30S and the address switching circuit 40, the lower 12 bits (bit O~bit
ll) is input to an inverting circuit 610 whose details are shown in FIG. This inverting circuit 610 receives the signal R1 as the command romal.
When A12 of the address is “1” with “l” representing
It is operated by a signal from the D-game) 612 and inverts the lower 12 bits of the input address. Also, the command r
The signal R1, which becomes "L" when omal is executed, disables the AND gate 604 through the inverter 602, and turns the corresponding bit (bit 12) of the output address "ON" regardless of the value of A12 of the input address.Input address A of
l1 and A14 are the corresponding pins of the output address as they are) (b
it13, bit14). A15 (MSB) of the input address becomes the corresponding beat (btt15) of the output address via an AND gate 608, and a signal R2 of "1" indicating that the instruction r o m a 2 is being executed.
is occurring, this signal R2 is output to the inverter 606
and masks the output address bft15 (MSB) to 0''.

したがってアドレス変換回路6oは、無変換命令r o
maoとシフト読み出し命令r o m a 3に対し
てはR1=“0”、R2=“0″なので入力アドレスを
出力アドレスとしてそのまま通し、特殊波形読出し命令
romalに対してはR1=″l”なので出力アドレス
のbitlZt″θ″′にマスクし、A12=“l”の
間尺転回路610により入力アドレスの下位12ピツ)
(bit。
Therefore, the address conversion circuit 6o converts the non-conversion instruction r o
For mao and shift read command r o m a 3, R1 = "0" and R2 = "0", so the input address is passed through as the output address, and for the special waveform read command romal, R1 = "l". The lower 12 bits of the input address are masked in bitlZt″θ″′ of the output address, and the lower 12 bits of the input address are masked by the scale rotation circuit 610 of A12="l")
(bit.

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

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

第31図にデータ変換回路70のブロック図を示し、第
32図にその詳細を示す、これらの図においてデータ入
力はMIJ1図の外部メモリ9oから供給されるデータ
である。!@32図において、入力データの上位8ビツ
トに結合する3状態ゲ一ト回路702と入力データの下
位8ビツトに結合する3状態ゲ一ト回路704は出力す
るデータの下位8ビツトとして入力データの上位8ビツ
トを選択するが、入力データの下位8ビツトを選択する
かを決めるためのものである。R2=“l”(r om
a2命令)fA15=1のとき、ANDゲート706の
“l”出力信号とその反転信号であるインバータ708
の出力信号“0”により、ゲート回路702が導通し、
ゲート回路704がオフして入力データの上位8ビツト
が出力データの下位8ビツトとして選択される。その他
の場合は、ゲート回路702がオフし、ゲート回路70
4が導通するので入力データの下位8ビツトがそのまま
出力データの下位8ビツトとして出力される。更にR2
=“1″ (r o m a 2命令)のときは、入力
データの上位8ビツトに結合するANDゲート回路71
0が禁止されて出力データの上位8ビツトを0″にマス
クする。即ち、R2=“1″のときはインバータ712
とNORゲート714を介して禁止信号がANDゲート
回路71Oに加わってANDゲート回路710における
入力データ上位8ビー2トの通過が阻止される。また、
ANDゲート回路710における入力データの上位3ビ
ツトと結合するANDゲート素子はR1=“1″ (r
 oma 1命令)のときにNORゲート714を介し
て禁止され、出力データの上位3ビツトを“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 9o in FIG. MIJ1. ! @32 In the diagram, a 3-state gate circuit 702 that connects to the upper 8 bits of input data and a 3-state gate circuit 704 that connects to the lower 8 bits of input data output the input data as the lower 8 bits of the data. The upper 8 bits are selected, but this is for determining whether to select the lower 8 bits of input data. R2=“l”(rom
a2 instruction) When fA15=1, the “l” output signal of the AND gate 706 and the inverter 708 which is its inverted signal
The output signal “0” causes the gate circuit 702 to conduct.
Gate circuit 704 is turned off and the upper 8 bits of the input data are selected as the lower 8 bits of the output data. In other cases, gate circuit 702 is turned off and gate circuit 70
4 becomes conductive, so the lower 8 bits of the input data are output as they are as the lower 8 bits of the output data. Furthermore R2
When ="1" (r o m a 2 instruction), the AND gate circuit 71 connects to the upper 8 bits of the input data.
0 is prohibited and the upper 8 bits of the output data are masked to 0''.In other words, when R2="1", the inverter 712
A prohibition signal is applied to the AND gate circuit 71O via the NOR gate 714, and passage of the upper 8 beats 2 of the input data in the AND gate circuit 710 is prevented. Also,
The AND gate element connected to the upper 3 bits of the input data in the AND gate circuit 710 has R1="1" (r
oma1 instruction), it is inhibited via the NOR gate 714, and the upper three bits of the output data are masked to "0".

EX−ORゲート回路716は入力データの下位12ビ
ツトを選択的に反転するための回路である。EX−OR
ゲート回路716はR1=“l”(r o m a 1
命令)でA12=1+7)とき、ANDゲー)718か
らの反転信号“l”により、下位12ビツトデータを反
転し、その他の場合は下位12ビツトデータをそのまま
通す0回路710内のANDゲート素子を介して入力デ
ータのbit12に結合する状態ゲート722はR1=
“l”(r oma 1命令)のときに、信号R1に結
合するインへ−夕720を介して与えられる信号“O”
によりオフし1代りに、A12に結合する3状態ゲート
724が信号R1によって導通して出力データのbit
12を発生する。シフトマスク回路726は選択的に入
力されたデータのbit15〜bit4を出力データの
bit14〜bit3にシフトし、出力データのbit
2〜bi10を“0”にマスクするための回路であり、
R3=″l″ (r oma3命令)のとき信号R3に
結合するインバータ728からの信号“l”によってこ
の変換を実行する。
EX-OR gate circuit 716 is a circuit for selectively inverting the lower 12 bits of input data. EX-OR
The gate circuit 716 has R1="l" (r o m a 1
When A12=1+7) in the AND gate 718, the lower 12 bits of data are inverted, and in other cases, the AND gate element in the 0 circuit 710, which passes the lower 12 bits as is, is activated. State gate 722 is coupled to bit 12 of the input data via R1=
When “l” (roma 1 instruction), the signal “O” is applied via the input 720 which is coupled to the signal R1.
Instead, the three-state gate 724 coupled to A12 is turned on by the signal R1 and the bit of output data is turned off by R1.
12 is generated. The shift mask circuit 726 selectively shifts bits 15 to 4 of the input data to bits 14 to 3 of the output data.
This is a circuit for masking 2 to bi10 to “0”,
This conversion is performed by the signal "l" from inverter 728 coupled to signal R3 when R3="l" (roma3 instruction).

したがって、データ変換回路70は、無変換命令rom
aO(R1=R2=R3= ”0″)のときは、入力さ
れる16ビツトデータをそのまま通し、特殊波形読み出
し命令romal (R1−“l”)のときは入力アド
レスの上位4ビツト(bit15〜bit12)が“o
ooo″(A12=0のとき)か0001” (A12
=1のとき)かによって、出力データの下位12ビツト
をそのまま入力データの下位12ビツトとする(AI2
=0のとき)か、或は、出方データの下位12ど−、ト
を入力データの下位12ど?)が反転されたデータとな
る(AI2=1)ようにデータ変換を行い、一部読み出
し命令roma2(R2=″1″)のときは出力データ
の上位8ビツトがオールゼロで、出力データの下位8ビ
ツトが入力データの下位8ビツトとなるように(AI5
=Oのとき)、或は、出力データの上位8ビツトがオー
ルゼaで、出力データの下位8ビツトが入力データの上
位8ビツトとなる(AI5=1のと9)ようにデータ変
換を行い、シフト読み出し命令r oma3 (R3=
 1)のときは出力データの下位3ビーy)(bitO
〜b i t 2)がオールゼロで、出力データのbi
t3〜bit14が入力データのbi t4〜bit1
5で、出力データのb i t 15 (MSB)が入
力データのbi t 15(MSB)となるようにデー
タ変換を行う、このようにして第28図で述べたデータ
変換機能が達成されている。
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 romal (R1-"l") is, the upper 4 bits of the input address (bits 15 to 15) are passed through. bit12) is “o”
ooo'' (when A12=0) or 0001'' (A12
= 1), the lower 12 bits of the output data are used as the lower 12 bits of the input data (AI2
= 0), or the lower 12 of the output data and the lower 12 of the input data? ) is inverted data (AI2 = 1), and when the 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 bits are the lower 8 bits of the input data (AI5
=O), or perform data conversion so that the upper 8 bits of the output data are all zeros a, and the lower 8 bits of the output data are the upper 8 bits of the input data (AI5=1 and 9), Shift read command roma3 (R3=
1), the lower 3 bits of output data y)(bitO
~b it 2) are all zeros, and the output data bi
t3 to bit14 are input data bits t4 to bit1
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 function described in FIG. 28 is achieved. .

以上により、アドレス変換回路60とデータ変換回路7
0とを設けたことによる利点は明らかである。即ち、C
PUl012oにとって、データメモリである外部メモ
リ90に対するアクセス命令romaを実行するだけで
、回路60と70の変換機能により、所望の変換が施さ
れたデータをただちに得ることができ、従来のように、
外部メモリ90のデータを演算用メモリである内部RA
M106,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 the PU1012o, simply by executing the access command roma to the external memory 90, which is a data memory, the conversion function of the circuits 60 and 70 can immediately obtain the data that has undergone the desired conversion.
The data in the external memory 90 is transferred to the internal RA which is a calculation memory.
There is no need to perform conversion via an ALU such as the ALU unit 108, 208 after the data is once imported into the M106, 206, which has the advantage of speeding up the processing.

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

<DACサンプリング(第33、第34図)〉本実施例
においてDAC100はMCPUIOと5CPU20が
生成したデジタル楽音信号をアナログ楽音信号に変換す
るものである。第5図の5−5に示すように、MCPU
IOはタイマインタラプト処理ルーチンのなかで、MC
PUIOと5CPU20が生成したデジタル楽音信号の
サンプルをDAC:100にセットする。この処理5−
5の実行間隔は平均としてはタイマインタラプト発生部
116の発生するインタラプト信号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.
The sample of the digital musical tone signal generated by PUIO and 5CPU 20 is set to DAC:100. This process 5-
Although the execution interval of No. 5 is on average equal to the generation interval of the interrupt signal INT generated by the timer interrupt generation section 116, the actual execution interval varies due to the program operation. 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 left DAC 100L. In the configuration shown in FIG. 33(A), when processing 5-5 is executed, the internal RAM 106 is The waveform addition register is designated, and the latest digital tone data stored there is taken out and placed on the data bus.

そして、データバスにデジタル楽音データが乗つている
タイミングでラッチ1004のクロック入力にストロー
ブ用のプログラム制御信号がオペレション制御回路11
2から与えられデータバス上のデータがセットされ、ラ
ッチ1004から新しいデジタル楽音データがD/A変
換器1002に入力される。したがって、第34図(A
)に示すように、D/A変[1ii1002に入力され
るデジタル楽音データはプログラム制御のために不安定
な周期で切り換わることになる。D/All器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 11.
2, the data on the data bus is set, and new digital musical tone data is input from latch 1004 to D/A converter 1002. Therefore, Fig. 34 (A
), the digital musical tone data input to the D/A converter [1ii 1002 is switched at an unstable cycle due to program control. D/All device 1002
Unless the conversion period (sampling period) of 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図示のように
、チー2チ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 of 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 latch 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. As shown in FIG. 34(B), which is a time chart for the configuration of FIG. Although it varies depending on the time required for the change (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).

[変形例] 以上で実施例の説明を終えるがこの発明の範囲内で種々
の変形、変更が可能である。
[Modifications] This concludes the description of the embodiments, but various modifications and changes are possible within the scope of the present invention.

この発明はメインCPUと少なくとも1つのす:l’C
PUを有するデジタルマイクロコンピュータにおけるメ
インCPUがらサブCPUへのアクセスを高速化する技
術に関するものである。したがって、デジタルマイクロ
コンピュータが適用されるアプリケーション(実施例の
場合、電子楽器)は特に制限されない。
The invention comprises a main CPU and at least one CPU.
The present invention relates to a technology for speeding up access from a main CPU to a sub CPU in a digital microcomputer having a PU. Therefore, the application to which the digital microcomputer is applied (in the case of the embodiment, electronic musical instruments) is not particularly limited.

実施例ではメインCPUl0はサブCPU20が停止状
態にあることを判別するために、5CPUリセット制御
部30からの5CPUCPU状態量ペレーション制御回
路112で受けており、インタラプト処理ルーチン(第
5図)の5−3でこの5CPUCPU状態量CPU20
の停止状態を示すようになるまで待機している。しかし
ながら、メインCPUは必ずしも5CPUCPU状態量
けなくてもサブCPU20が停止状態にある期間を判別
ないし規定することができる0例えば、サブCPU20
がプログラム(第6図)の実行に要する最長時間を考慮
すれば、この最長時間の経過後はサブCPU20は停止
しているはずである。したがって、メインCPUl0か
らのサブCPU20の内部メモリに対するアクセスが上
記最長時間の経過後にしか発生しないようにすれば目的
は達せられる。具体的には、メインCPUにおいて例え
ば5−3の5CPU状態検出処理の代りに、最長時間が
経過するまでの待機ルーチンを実行すればよい。
In the embodiment, the main CPU 10 receives the 5CPU state quantity from the 5CPU reset control unit 30 in the operation control circuit 112 in order to determine that the sub CPU 20 is in the stopped state, and the interrupt processing routine (FIG. 5) 5 -3 means this 5 CPUCPU state quantity CPU20
Waiting until it shows a stopped status. However, the main CPU can determine or define the period in which the sub CPU 20 is in a stopped state without necessarily having to measure the state of the sub CPU 20.
Considering the longest time required to execute the program (FIG. 6), the sub CPU 20 should be stopped after the longest time has elapsed. Therefore, the purpose can be achieved if the access from the main CPU 10 to the internal memory of the sub CPU 20 occurs only after the above-mentioned maximum time has elapsed. Specifically, instead of the 5-CPU state detection process in 5-3, for example, a standby routine may be executed until the longest time elapses in the main CPU.

[発明の効果j 以上、詳細に述べたように、この発明によれば、メイン
CPU側にサブCPUの停止状態の期間を判別、検出あ
るいは規定する機能が設けられ、メインCPUはサブC
PUが停止状態にあるときにサブCPUの内部メモリに
対するアクセスを実行するので、従来のような時間のか
かるアクセス手続が不要となり、アクセスの高速化が実
現される。
[Effects of the Invention j As described in detail above, according to the present invention, the main CPU side is provided with a function of determining, detecting, or regulating the period in which the sub CPU is stopped, and the main CPU
Since the internal memory of the sub-CPU is accessed when the PU is in a stopped state, the conventional time-consuming access procedure is no longer necessary, resulting in faster access.

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

81図はこの発明を適用した電子楽器用処理装置の全体
構成図、 第2図は第1図のMCPUのブロック図、第3図は第1
図の5CPUのブロック図、第4図はMCPUの実行す
るメインプログラムのフローチャート、 第5図はMCPUの実行するインタラプト処理ルーチン
のフローチャート、 第6図は5CPUの実行するプログラムのフローチャー
ト、 J$7図は音源処理のフローチャート、第8図は時間の
経過に沿う実施例の動作のフローチャート、 第9図はチャンネル音源処理のフローチャート。 第1θ図は波形データを示す図、 第11図は音源処理用RAMテーブルを示す図、 第12図は5CPU動作開始絆了機能に関係する回路の
ブロック図、 第13図、第14図、第15図は第12図の回路の動作
のタイムチャート、 第16図はインタラプトマスク機能を有する回路のブロ
ック図、 第17図はインタラプトマスク方式によるエンベロープ
設定処理のフローチャート、 第18図は単一命令で複数のデータを転送する間インタ
ラプト信号によるメインプログラムの中断を禁止する機
能を有する回路のブロック図、第19図は複数のデータ
を単一命令で転送するのに適したRAMのメモリマー2
プ例を示す図、第20図は複数の転送命令による動作と
単一の転送命令による動作とを比較して示す図、第21
図は単一転送命令方式によるエンベロープ設定処理のフ
ローチャート、 第22図は5CPUの停止モード利用によるMCPUか
らの5CPUアクセス機能を説明するのに用いたフロー
チャート。 第23図は5CPUに対する瞬時強制アクセス機能を有
するMCPUのブロー、り図、第24図は5CPUに対
する瞬時強制アクセス機能に適合する5CPUのブロッ
ク図。 第25図はMCPUから5CPUの内fiRAMにデー
タを書き込む場合の動作のタイムチャート。 第26図は第1図のメモリ装置競合回避回路のブロック
図、 第27図は第26図の回路の動作のタイムチャート。 第28図は外部メモリからのデータを変換して取り込む
命令を含む外部メモリアクセス命令のリストを示す図、 第29図は第1図のアドレス変検回路のブロック図、 第30図は第29図の反転回路の回路図、第31図は第
1図のデータ変換回路のブロック図、 第32図はデータ変換回路の回路図、 !$33図は第1図のDACのサンプリング周期が不安
定になる構成とサンプリング周期を安定化した構成とを
比較して示す図。 第34図はDACのサンプリング周期が不安定な場合の
タイムチャートと安定な場合のタイムチャートとを比較
して示す図である。 206・・・・・・RAM (サブCPUの内部メモリ) カシオ計算機株式会社 IO・・・・・・MCPU(メインCPU)20・・・
・・・5CPU (サブCPU)116・・・・・・イ
ンタラプト発生部(動作開始信号発生手段、インタラプ
ト発生手段) 134・・・・・・5CPUリセット制御部214・・
・・・・ROMアドレス制御部134.214・・・・
・・(サブCPUモード制御手段) 114・・・・・・ROMアドレス制御部(メインCP
Uモード制御手段) 112・・・・・・オペレージ璽ン制御回路(サブCP
Uモード判別手段、サブCPUアク セス手段、サブCPUモード検出手 段)
Figure 81 is an overall configuration diagram of an electronic musical instrument processing device to which the present invention is applied, Figure 2 is a block diagram of the MCPU in Figure 1, and Figure 3 is a block diagram of the MCPU in Figure 1.
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, and Figure 4 is a flowchart of the main program executed by the MCPU. is a flowchart of sound source processing, FIG. 8 is a flowchart of the operation of the embodiment over time, and FIG. 9 is a flowchart of channel sound source processing. Fig. 1θ is a diagram showing waveform data, Fig. 11 is a diagram showing a RAM table for sound source processing, Fig. 12 is a block diagram of a circuit related to the 5 CPU operation start termination function, Figs. Figure 15 is a time chart 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 a flowchart of envelope setting processing using the interrupt mask method, and Figure 18 is a single instruction FIG. 19 is a block diagram of a circuit having a function of prohibiting interruption of the main program by an interrupt signal while transferring multiple pieces of data.
FIG. 20 is a diagram showing an example of a transfer command, and FIG.
The figure is a flowchart of envelope setting processing using the single transfer command method, and FIG. 22 is a flowchart used to explain the 5CPU access function from the MCPU using the 5CPU stop mode. FIG. 23 is a flowchart of an MCPU having an instantaneous forced access function for 5 CPUs, and FIG. 24 is a block diagram of 5 CPUs suitable for an instantaneous forced access function for 5 CPUs. FIG. 25 is a time chart of the operation when writing data from the MCPU to the fiRAM of the 5 CPUs. 26 is a block diagram of the memory device contention avoidance circuit of FIG. 1, and FIG. 27 is a time chart of the operation of the circuit of 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, FIG. 29 is a block diagram of the address modification circuit in FIG. 1, and FIG. Figure 31 is a block diagram of the data conversion circuit in Figure 1. Figure 32 is a circuit diagram of the data conversion circuit. Figure 33 is a diagram comparing a configuration in which the sampling cycle of the DAC shown in Figure 1 becomes unstable and a configuration in which the sampling cycle is stabilized. FIG. 34 is a diagram showing a comparison of a time chart when the sampling period of the DAC is unstable and a time chart when the sampling period is stable. 206...RAM (internal memory of sub CPU) Casio Computer Co., Ltd. IO...MCPU (main CPU) 20...
... 5 CPU (sub CPU) 116 ... Interrupt generation section (operation start signal generation means, interrupt generation means) 134 ... 5 CPU reset control section 214 ...
...ROM address control section 134,214...
...(Sub CPU mode control means) 114...ROM address control section (Main CPU mode control means)
U mode control means) 112...Operating control circuit (sub CP
U mode discrimination means, sub CPU access means, sub CPU mode detection means)

Claims (2)

【特許請求の範囲】[Claims] (1)メインCPUと、 少なくとも1つのサブCPUと、 動作開始信号を発生する動作開始信号発生手段と、 前記動作開始信号に応答して前記サブCPUのモードを
停止状態からプログラムを実行する動作状態に切替制御
し、前記プログラムの実行終了に応答して前記サブCP
Uを再び停止状態に復帰制御するサブCPUモード制御
手段と、 前記メインCPU内に設けられ、前記サブCPUモード
制御手段によって制御される前記サブCPUのモードが
停止状態にあるかどうかを判別するサブCPUモード判
別手段と、 前記メインCPU内に設けられ、前記サブCPUモード
判別手段の判別により前記サブCPUのモードが停止状
態にある間において、前記サブCPUの内部メモリをア
クセスするサブCPUアクセス手段と、 を有することを特徴とするデジタルマイクロコンピュー
タ。
(1) A main CPU, at least one sub-CPU, an operation start signal generation means for generating an operation start signal, and an operation state in which the mode of the sub CPU is changed from a stopped state to a program execution state in response to the operation start signal. and in response to the end of execution of the program, the sub CP
a sub-CPU mode control means for controlling the U to return to a stopped state; and a sub-CPU mode control means provided in the main CPU for determining whether the mode of the sub-CPU controlled by the sub-CPU mode control means is in a stopped state. CPU mode determining means; sub-CPU access means provided in the main CPU and accessing internal memory of the sub-CPU while the mode of the sub-CPU is in a stopped state as determined by the sub-CPU mode determining means; A digital microcomputer characterized by having the following.
(2)メインCPUと、 少なくとも1つのサブCPUと、 所定時間の経過ごとにタイマインタラプト信号を発生す
るインタラプト発生手段と、 前記タイマインタラプト信号に応答して前記メインCP
Uにおいて実行中のメインプログラムを中断して前記メ
インCPUのモードをインタラプト処理ルーチンを実行
するモードに切替制御し、前記インタラプト処理ルーチ
ンの実行終了に応答して中断されたメインプログラムを
再開して前記メインCPUのモードをメインプログラム
を実行するモードに復帰制御するメインCPUモード制
御手段と、 前記タイマインタラプト信号に応答して前記サブCPU
のモードを停止状態からプログラムを実行するモードに
切替制御し、前記プログラムの実行終了に応答して前記
サブCPUのモードを再び停止状態に復帰制御するサブ
CPUモード制御手段と、 前記サブCPUモード制御手段内に設けられ、前記サブ
CPUのモードを表わす信号を発生するサブCPUモー
ド信号発生手段と、 前記メインCPU内に設けられ、前記サブCPUモード
信号発生手段からの前記信号を受け取つて前記サブCP
Uのモードを検出するサブCPUモード検出手段と、 前記メインCPU内に設けられ、前記サブCPUモード
検出手段が前記サブCPUの停止状態を検出している間
において、前記サブCPUの内部メモリをアクセスする
サブCPUアクセス手段と、 を有することを特徴とするデジタルマイクロコンピュー
タ。
(2) a main CPU, at least one sub-CPU, an interrupt generating means that generates a timer interrupt signal every predetermined time period; and a main CPU that responds to the timer interrupt signal.
interrupting the main program being executed in U, switching the mode of the main CPU to a mode for executing an interrupt processing routine, and restarting the interrupted main program in response to the completion of execution of the interrupt processing routine; main CPU mode control means for controlling the mode of the main CPU to return to a mode for executing a main program;
sub-CPU mode control means for controlling switching of the mode of the sub-CPU from a stopped state to a mode for executing a program, and controlling the mode of the sub-CPU to return to the stopped state in response to completion of execution of the program; a sub-CPU mode signal generating means provided within the means and generating a signal representing the mode of the sub-CPU; and a sub-CPU mode signal generating means provided within the main CPU receiving the signal from the sub-CPU mode signal generating means and generating a signal representing the mode of the sub-CPU.
sub-CPU mode detecting means for detecting a mode of U; and sub-CPU mode detecting means provided in the main CPU, and accessing an internal memory of the sub-CPU while the sub-CPU mode detecting means detects a stopped state of the sub-CPU. A digital microcomputer characterized by comprising: a sub-CPU access means for accessing a sub-CPU;
JP2170165A 1990-06-29 1990-06-29 Digital microcomputer Pending JPH0460744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2170165A JPH0460744A (en) 1990-06-29 1990-06-29 Digital microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2170165A JPH0460744A (en) 1990-06-29 1990-06-29 Digital microcomputer

Publications (1)

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

Family

ID=15899891

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JPH0460744A (en)

Cited By (2)

* 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
WO2013136857A1 (en) * 2012-03-13 2013-09-19 日本電気株式会社 Data processing system, semiconductor integrated circuit, and control method thereof

Cited By (3)

* 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
WO2013136857A1 (en) * 2012-03-13 2013-09-19 日本電気株式会社 Data processing system, semiconductor integrated circuit, and control method thereof
JPWO2013136857A1 (en) * 2012-03-13 2015-08-03 日本電気株式会社 Data processing system, semiconductor integrated circuit and control method thereof

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
JPH0997064A (en) Automatic musical performance data processor
US5584034A (en) Apparatus for executing respective portions of a process by main and sub CPUS
JPH0460744A (en) Digital microcomputer
EP0376342B1 (en) Data processing apparatus for electronic musical instruments
US4644841A (en) Electronic musical instrument
JP2797137B2 (en) Processing equipment for electronic musical instruments
JPH0460724A (en) Digital microcomputer
JPH0460725A (en) Digital microcomputer
JPH0460722A (en) Digital microcomputer
JPH0460746A (en) Digital microcomputer
JPH0460723A (en) Digital microcomputer
JPH0460749A (en) Digital microcomputer
JP2797138B2 (en) Processing equipment for electronic musical instruments
JP2797142B2 (en) Processing equipment for electronic musical instruments
JPH11202866A (en) Method and device for musical sound generation
JPH07325581A (en) Musical sound generation device
JP2576616B2 (en) Processing equipment
JP2576613B2 (en) Processing equipment
JPS621030A (en) Counter circuit
JP3116447B2 (en) Digital signal processor
JP2595992B2 (en) Electronic musical instrument
Lowe et al. Digidesign's Sound Accelerator: Lessons Lived and Learned
JP2716131B2 (en) Tone generator