JPH0460746A - Digital microcomputer - Google Patents

Digital microcomputer

Info

Publication number
JPH0460746A
JPH0460746A JP2170162A JP17016290A JPH0460746A JP H0460746 A JPH0460746 A JP H0460746A JP 2170162 A JP2170162 A JP 2170162A JP 17016290 A JP17016290 A JP 17016290A JP H0460746 A JPH0460746 A JP H0460746A
Authority
JP
Japan
Prior art keywords
data
cpu
address
signal
access
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
JP2170162A
Other languages
Japanese (ja)
Inventor
Ryuji Usami
隆二 宇佐美
Kosuke Shiba
斯波 康祐
Koichiro Oki
広一郎 太期
Kazuo Ogura
和夫 小倉
Jun Hosoda
潤 細田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2170162A priority Critical patent/JPH0460746A/en
Publication of JPH0460746A publication Critical patent/JPH0460746A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain the digital microcomputer of plural CPU, in which the functions of respective CPU can sufficiently be used, by providing a CPU mode control means which responds to a parallel processing start signal, switch- controls the modes of respective CPU to the execution mode of a prescribed processing and realizes the parallel processing of plural CPU. CONSTITUTION:A memory device contention avoiding circuit 50 controls the access of an external memory 90 by MCPU 10 and SCPU 20 and avoids the contention. An address conversion circuit 60 and a data conversion circuit 70 set CPU 10 and 20 to fetch data obtained by converting data of the external data memory 90. MCPU 10 and SCPU 20 generate a digital musical signal. It is transmitted to a digital-analog converter DAC 100 composed of right DAC 10R and left DAC 100L from MCPU 10, is converted into an analog musical signal and is outputted to an external part.

Description

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

[発明の背景] 1つのCPUを有するデジタルコンピュータは既知であ
る。処理すべきデータ量が多い場合や、高速処理が要求
される用途では1つのCPUで単位時間内に処理可能な
データ量に限りがあるためにCPUを複数にして応用シ
ステムを実現することがしばしば行われる。
BACKGROUND OF THE INVENTION Digital computers with one CPU are known. When there is a large amount of data to be processed or in applications that require high-speed processing, there is a limit to the amount of data that can be processed within a unit time by one CPU, so application systems are often implemented using multiple CPUs. It will be done.

CPUを複数化することは基本的に処理能力の向上をね
らいとしている。残念ながらCPUの数をN個にしたか
らといって処理能力を1つのCPUの場合のN倍にする
ことはできない、ある種のデュアルCPUコンピュータ
では片方のCPUが動作中のときは他方のCPUが停止
している。これは極端な例であるが、複数CPUのマイ
クロコンピュータではCPU間のアクセス闇M等のため
に十分な並列処理が実現されていないのが現状である。
Having multiple CPUs basically aims to improve processing performance. Unfortunately, increasing the number of CPUs to N does not increase the processing power by N times that of a single CPU; in some dual-CPU computers, when one CPU is running, the other has stopped. Although this is an extreme example, the current situation is that in microcomputers with multiple CPUs, sufficient parallel processing cannot be realized due to access problems between the CPUs.

[発明の目的] したがってこの発明の目的は各CPUの機能を十分に利
用できるようにした複数CPUのデジタルマイクロコン
ピュータを提供することである。
[Object of the Invention] Accordingly, an object of the present invention is to provide a digital microcomputer with multiple CPUs that can fully utilize the functions of each CPU.

[発明の構成、作用] この発明によれば、複数のCPUと、並列処理開始信号
を発生する並列処理開始信号発生手段と、前記並列処理
開始信号に応答して、各CPUのモードを各CPUが分
担する所定の処理の実行モードに切換制御して、前記複
数のCPUによる並列処理を実現するCPUモード制御
手段とを有することを特徴とするデジタルマイクロコン
ピュータが提供される。
[Structure and operation of the invention] According to the present invention, a plurality of CPUs, a parallel processing start signal generating means for generating a parallel processing start signal, and a mode of each CPU is set to each CPU in response to the parallel processing start signal. There is provided a digital microcomputer characterized in that it has a CPU mode control means for realizing parallel processing by the plurality of CPUs by controlling switching to an execution mode of a predetermined process shared by the plurality of CPUs.

この構成によれば、並列処理開始信号を合図にme(7
) CP Uが各々に分担された処理をいつせいに開始
するので理想に近い並列性が得られ、デジタルマイクロ
コンピュータの性能が格段に向上する。
According to this configuration, me(7) is signaled by the parallel processing start signal.
) Since each CPU starts its assigned processing at the same time, near-ideal parallelism is achieved, and the performance of the digital microcomputer is greatly improved.

ある種の応用では周期的にマイクロコンピュータが定時
間処理、例えば入力装置からの入力を読んだり、データ
処理したり、あるいは出力装置に所望の処理信号あるい
は制御出力を与えるといった処理を実行する必要がある
0例えば、電子楽器のアプリケージ、ンに応用されるマ
イクロコンピュータは所定の周期で楽音信号のサンプル
を生成し、出力装置であるデジタルアナログ変換器にそ
のサンプルを出力する必要がある。この種の応用におい
ては、並列処理開始信号はタイマーのような手段から所
定の時間ごとに発生する信号となる。
Certain applications require a microcomputer to periodically perform a fixed-time process, such as reading input from an input device, processing data, or providing a desired processing signal or control output to an output device. For example, a microcomputer used in an electronic musical instrument application must generate samples of a musical tone signal at a predetermined period and output the samples to a digital-to-analog converter, which is an output device. In this type of application, the parallel processing start signal is a signal generated at predetermined time intervals from means such as a timer.

1つの好ましい構成例として、メインプログラムとイン
タラプト処理ルーチンとを内蔵するメインCPUと、前
記メインCPUの前記メインプログラムから割り当てら
れる処理を実行するためのプログラムを内蔵する少なく
とも1つのサブCPUと、所定時間の経過ごとにインタ
ラプト信号を発生するインタラプト発生手段と、前記イ
ンタラプト信号に応答して前記メインCPUにおいて実
行中の前記メインプログラムを中断して前記インタラプ
ト処理ルーチンを実行するモードに前記メインCPUの
モードを切替制御し、前記インタラプト処理ルーチンの
実行完了に応答して再び前記メインプログラムを実行す
るモードに前記メインCPUのモードを復帰制御するメ
インCPUモード制御手段と、前記インタラプト信号に
応答して前記前記サブCPUのモードを停止状態から前
記プログラムを実行するモードに切替制御し、前記プロ
グラムの実行完了に応答して前記サブCPUのモードを
停止状態に復帰制御するサブCPUモード制御手段とを
有することを特徴するデジタルマイクロコンピュータが
提供される。
One preferred configuration example includes a main CPU that includes a main program and an interrupt processing routine, at least one sub-CPU that includes a program for executing processing assigned by the main program of the main CPU, and a predetermined period of time. interrupt generating means for generating an interrupt signal every time a period of time elapses; and in response to the interrupt signal, the mode of the main CPU is set to a mode in which the main program being executed in the main CPU is interrupted and the interrupt processing routine is executed. main CPU mode control means for controlling switching and returning the mode of the main CPU to a mode in which the main program is executed again in response to completion of execution of the interrupt processing routine; Sub-CPU mode control means controls switching of the mode of the CPU from a stopped state to a mode in which the program is executed, and controls the mode of the sub-CPU to return to the stopped state in response to completion of execution of the program. A digital microcomputer is provided.

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

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

第2の特徴はサブCPUが動作を開始し、終了するメカ
ニズムに関係しており1本実施例によれば、サブCPU
の動作は、マスターCPUに対して音源処理を要求する
タイマインタラプトを合図として開始し、その結果、マ
スターCPUとサブCPUにおいて音源処理が並行に実
行される。サブCPUの動作(音源処理)が終了すると
その終了信号によってサブCPUはリセット状態(停止
状態)に移行するとともにその終了信号がマスターCP
Uに伝えられる(第8図、第16図)、この特徴により
、マスターCPUはサブCPUの動作期間を有効に管理
、把握できる。更に、この特徴により、高速処理が要求
される音源処理タスク(楽音信号のデジタルサンプルを
生成する仕事)を効率よく実行できる。
The second feature is related to the mechanism by which the sub-CPU starts and ends its operation, and according to this embodiment, the sub-CPU
The operation starts in response to a 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) by the end signal, and the end 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の方式として、複数のデータの
更新(転送)をメインプログラム中の単一命令で実行す
る方式が開示される(118図〜第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 that masks the interrupt and prohibits transition to the interrupt processing routine until the data update is completed ($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. 118 to 21). As a result, The processing results (samples of musical tone signals) of the interrupt processing routine show correct values, and correct operation is guaranteed.

本実施例のW44の特徴はマスターCPUからスレーブ
CPUに対するデータアクセス問題に関する。従来の複
数CPUマイクロコンピュータシステムでは、一般に、
CPU間のデータ転送は一連のシーケンスを通して行わ
れ、相当の時間を要する0代表的には、データのアクセ
スを要求するCPUからアクセスが要求されるCPUに
対し、アクセス要求信号を送る。このアクセス要求信号
に対しアクセスが要求されるCPUは実行中のオペレー
ションを完了した後に承認(アクノリッジ)信号をCP
Uに渡して停止状態となる。アクセス要求信号送信後、
承認信号が受信されるまでの間、要求側のCPUは待ち
状態になる。承認信号を受けて要求側のCPUは被要求
側のCPUの内部メモリに対し、実際のデータアクセス
を実行する。このように従来のCPU間データアクセス
方式は時間を要するので高速処理が望まれる電子楽器の
ようなアプリケーションには適さない、これを解決する
ため、本実施例では、li!1のデータアクセス方式と
して、上記第2の特徴を利用してサブCPUが停止状態
にあるときにマスターCPUがサブCPUの内部メモリ
(206)に対しデータをリード/ライト(アクセス)
する停止モード制御方式が開示され(第22図)、第2
のデータアクセス方式として待ち状態なしにマスターC
PUがサブCPUをデータアクセスする(サブCPUは
データアクセス中のみ強制的に停止状態にされる)瞬時
データアクセス方式とが開示される(第23図〜第25
図)。
The feature of W44 of this embodiment relates to the problem of data access from the master CPU to the slave CPU. In conventional multi-CPU microcomputer systems, generally,
Data transfer between CPUs is performed through a series of sequences and takes a considerable amount of time.Typically, a CPU requesting data access sends an access request signal to the CPU to which access is requested. In response to this access request signal, the CPU to which access is requested sends an acknowledge signal to the CP after completing the operation being executed.
Pass it to U and enter the stopped state. After sending the access request signal,
The requesting CPU remains in a wait state until the acknowledgment signal is received. Upon receiving the approval signal, the requesting CPU performs actual data access to the internal memory of the requested CPU. As described above, the conventional inter-CPU data access method takes time and is not suitable for applications such as electronic musical instruments where high-speed processing is desired.In order to solve this problem, in this embodiment, li! As data access method 1, the master CPU reads/writes (accesses) data to the internal memory (206) of the sub CPU when the sub CPU is in a stopped state by using the above second feature.
A stop mode control method is disclosed (Fig. 22), and the second
Master C as a data access method without waiting state
An instantaneous data access method in which a PU accesses data from a sub-CPU (the sub-CPU is forcibly stopped only during data access) is disclosed (Figs. 23 to 25).
figure).

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

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

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

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

メモリ装置競合回避回路50はMCPUIOと5CPU
20の両CPUによる外部メモリ90のアクセスを制御
し、その競合を回避するものである。メモリ装置競合回
避回路50はMCPUIOからの外部メモリアクセスを
要求する信号romaと5CPUからの外部メモリアク
セスを要求する信号romaの各々に応答してアドレス
切り換え回路40を制御してアドレス切り換え回路40
にMCPUIOからのアドレスと5CPU20からのア
ドレスのいずれかを外部メモリ90へのアドレスとして
選択させる。このためにメモリ装置競合回避回路50か
らの選択信号MSELによりアドレス切り換え回路40
は選択動作を行う、外部メモリ90へのアドレスが確定
するとメモリ装置競合回避回路50は外部メモリ90に
対するチップ選択信号GEとWカイネーブル信号OEを
アクティブにする。これにより外部メモリ90からデー
タが出力され、データ変換回路70を通してそのデータ
が外部メモリラッチ80の入力バスに現われる。ここで
、メモリ装置競合回避回路5゜はデータアクセスを要求
したCPUにデータを送るためにMCPU外部メモリデ
ータラ−2チ80M、5CPU外部メモリデータラッチ
80Sのいずれかを作動してデータをラッチさせる。こ
のためにMCPU外部メモリデータラッチ80Mはメモ
リ装置競合回避回路50からのラッチ信号MDLにより
チー2千動作し、5CPU外部メモリデータラッチ80
Sはメモリ装置競合回避回路50からのラッチ信号SD
Lによりラッチ動作するようになっている。
The memory device contention avoidance circuit 50 includes MCPUIO and 5 CPUs.
This system controls access to the external memory 90 by both CPUs 20 and avoids conflicts. The memory device conflict avoidance circuit 50 controls the address switching circuit 40 in response to the signal roma requesting external memory access from MCPUIO and the signal roma requesting external memory access from the 5 CPUs.
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.
performs a selection operation. When the address to the external memory 90 is determined, the memory device conflict avoidance circuit 50 activates the chip selection signal GE and the W key enable signal OE for the external memory 90. 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 2 80M or the 5 CPU external memory data latch 80S to latch the data in order to send the data to the CPU that has requested data access. . For this purpose, the MCPU external memory data latch 80M operates 2,000 times by the latch signal MDL from the memory device contention avoidance circuit 50, and the 5CPU external memory data latch 80M
S is a latch signal SD from the memory device contention avoidance circuit 50
L is used for latch operation.

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

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

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

<MCPU、!:5CPUの構成(第2、第3図)〉第
2図にMCPU 10の内部構造を示し、第3図に5C
PU20の内部構造を示す。
<MCPU,! :5CPU configuration (Figures 2 and 3)> Figure 2 shows the internal structure of the MCPU 10, and Figure 3 shows the 5C
The internal structure of PU20 is shown.

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

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

特に乗算器110は楽音波形の演算に使用しており、そ
のための最適化として第1と第2のデータ入力(例えば
16ビツトデータ)を乗算して入力と同じ長さ(16ビ
ツト)のデータを出力するようになっている。上記RA
M106、加減算器108、乗算器110により、演算
回路が構成される。オペレージマン制御回路112は制
御用ROM102からの命令のオペコードを解読し、指
示されるオペレーションを実行するために、回路の各部
に制御信号(全体をCNTRで示す)を送る。また条件
付分岐命令の実行の際にオペレーション制御回路112
はALU部10gからのステータス信号S(例えばオー
バーフロー信号、ゼロフラグ信号等)により分岐条件成
立を検出してROMアドレス制御部114を介してアド
レスを分岐先のアドレスにジャンプさせる。
In particular, the multiplier 110 is used to calculate musical waveforms, and as an optimization for this purpose, it multiplies the first and second data inputs (for example, 16-bit data) to obtain data of the same length (16 bits) as the input. It is designed to be output. Above RA
M106, adder/subtractor 108, and multiplier 110 constitute an arithmetic circuit. The operator control circuit 112 decodes the operation code of the command from the control ROM 102 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 10g, 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における楽音信号のデジタル/アナログ変換
サンプリング速度を定めるためにDAC100に供給さ
れる。なお、インタラプト発生部116は図の上ではM
CPUIOの内部要素として描いであるが、MCPUl
oに対して現在行っている仕事を停止させ特別の処理を
要求するものであり、論理的にはMCPU 10の外部
要素(周辺装W)である。
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 the DAC 100 in order to determine the digital/analog conversion sampling rate of the musical tone signal in the AC 100. Note that the interrupt generation unit 116 is M in the diagram.
Although it is depicted as an internal element of CPUIO, MCPUl
It is a request to o to stop the work it is currently doing and to perform special processing, and is logically an external element (peripheral W) of the MCPU 10.

クロック発生回路136はマスタークロック発生回路(
図示せず)からの2相のマスタークロックCKIとCK
2を受け、オペレーション制御回路112を初めとする
回路の各部に加える種々のタイミング信号(TI T2
、T3.TICK1、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 (TI T2
, T3. TICK1, T2CK2, T3CK3, etc.).

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

5CPUリセット制御部134は5CPU20の動作期
間を管理するためのデ/ヘイスである。この実施例に従
い5CPUリセット制御部134はインタラプト発生部
116からのインタラプト信号INTに応答して、5C
PU20の処理開始を示す信号Aを発生する。この信号
Aは5CPU20のROMアドレス制御部214(第3
図)に送られ、これによりROMアドレス制御部214
のアドレス更新動作が開始し、5CPU20の動作(音
源処理を含む)が開始する。5CPU20の動作が終了
すると5CPU20のオペレーション制御回路212か
ら処理終了を示す信号Bが発生し、この信号Bが5CP
Uリセット制御部134に送られる。これに対し、5C
PUリセ−7ト制御部134は5CPU20の動作を停
止するために信号Aを反転し、これにより5CPU20
のROMアドレス制御部214の動作を停止させる、と
ともに、5CPU20が停止中であることを表わす5C
PU状態フラグ信号をオペレーション制御回路112に
送る。オペレーション制御回路112は制御用ROM1
02からの5CPU状態の検査命令の実行時に、この5
CPU状態フラグ信号を読むことにより、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 5 CPU 20.
5C, which stops the operation of the ROM address control unit 214 and indicates that the 5CPU 20 is stopped.
A PU status flag signal is sent to the operation control circuit 112. The operation control circuit 112 is a control ROM1
When executing the 5 CPU status inspection command from 02, this 5
By reading the CPU status flag signal, 5CPU20
can detect the state of

第3図の5CPU20のブロック図において要素202
.202a、204.205.206.208.212
.214.222.224.236はそれぞれ、第2図
のMCPU 10のブロック図における要素102.1
02a、104105.106、tOS、110.11
2.114.122.124.136に対応する要素で
ある。ただし、5CPU20の制御用ROM202には
基本的に音源処理のためのプログラムのみが記憶されて
おり、5CPU20を音源処理専用の処理装置として機
能させている。
In the block diagram of the 5 CPU 20 in FIG.
.. 202a, 204.205.206.208.212
.. 214.222.224.236 are respectively elements 102.1 in the block diagram of MCPU 10 in FIG.
02a, 104105.106, tOS, 110.11
This is an element corresponding to 2.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動作中”を表わしているときには5C
PU20で演算したデータを選択し、信号Aが“5CP
U20停止中”を表わしているときにはMCPUIOか
らのデータを選択する。
240 is RAM2 as a memory for calculation of 5CPU20
The data input to 06 is the data from MCPUIO (M
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 inspection section 240
Its selection mode is controlled by signal A, and when signal A indicates "5CPU20 in operation", 5C is selected.
Select the data calculated by PU20, and signal A is “5CP”.
When "U20 is stopped" is displayed, data from MCPUIO is selected.

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

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

く複数CPU音源機能(第1〜第7図、第9〜第11図
)〉 第4図はMCPUIOのメインプログラム(バックグラ
ンドプログラム)によるMCPUIOの動作を示すフロ
ーチャート、第5図はタイマインタラプト信号INTに
よって起動されるMCPUlOのインタラプト処理ルー
チンによるMCPUloの動作を示すフローチャート、
第6図はタイマインタラプト信号INTによって起動さ
れる5CPU20のプログラムによる5CPU20の動
作を示すフローチャート、第7図はMCPUIOと5C
PU20のそれぞれが実行する音源処理のフローチャー
トである。
Multiple CPU sound source function (Figures 1 to 7, Figures 9 to 11)> Figure 4 is a flowchart showing the operation of MCPUIO by the MCPUIO main program (background program), and Figure 5 is the timer interrupt signal INT. A flowchart showing the operation of MCPUlo by the interrupt processing routine of MCPUlo started by
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を備えており5両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 the 5 CPUs work together to execute processing for the electronic musical instrument. do. In particular, the MCPUIO processes the sound source using an interrupt processing routine as shown in Figure 5, the 5CPU 20 processes the sound source using a program as shown in Figure 6, and the MCPUIO processes the entire system using the main program shown in Figure 4. Perform various tasks for control.

第4図のメインプログラムのフローにおいて。In the flow of the main program shown in FIG.

4−1は電源投入時にシステムを初期化する処理であり
、MCPUIOはRAM106、RAM206のクリア
や、リズムテンポ等の初期値の設定等を行う、4−2で
MCPUIOは出力ボート120からキー走査のための
信号を出力し、W@。
4-1 is a process to initialize the system when the power is turned on, and the MCPUIO clears the RAM 106 and RAM 206, sets initial values such as rhythm tempo, etc. In 4-2, the MCPUIO performs key scanning from the output board 120. Outputs the signal for W@.

機能スイッチ等の入力装置の状態を入力ポートl18か
ら取り込むことにより、機能キー、li盤主キー状態を
RAM106のキーバッファエリアに記憶する。4−3
では4−2で得た機能キーの新しい状態と前回の状態と
から、状態の変化した機能キーを識別し、指示される機
能の実行を行う(例えば、楽音番号のセット、エンベロ
ープ番号のセット、リズム番号のセット等)、4−4で
は4−2で得た鍵盤の最新の状態と前回の状態とから、
変化した鍵(押鍵、離鍵)を識別する0次の4−5で4
−4の処理結果から1発音処理4−9のためのキーアサ
イン処理を行う、4−6では機能キーでデモ演奏キーが
押鍵されたとき外部メモリ90から、デモ演奏データ(
シーケンサデータ)を順次読み出し、処理することによ
り、発音処理4−9のためのキーアサイン処理等を行う
By taking in the status of an input device such as a function switch from the input port 118, the status of the function key and the main key of the Li board is stored in the key buffer area of the RAM 106. 4-3
Now, from the new state of the function key obtained in 4-2 and the previous state, identify the function key whose state has changed and execute the instructed function (for example, set musical tone number, set envelope number, Rhythm number set, etc.), 4-4 uses the latest keyboard state obtained in 4-2 and the previous state,
Identify the changed key (key press, key release) 4 in 0th order 4-5
Key assignment processing for 1 sound processing 4-9 is performed from the processing result of -4. In 4-6, when the demo performance key is pressed with the function key, the demo performance data (
By sequentially reading and processing the sequencer data), key assignment processing and the like for the 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内の音源処理レジスタ(811図
)にセットする。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 (811) 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図に示すプログラムを実行
する。ここにMCPUIOは第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で各チャンネルに
対する楽音波形データを生成し、累算し、記憶する。従
来はこの処理を音源回路/\−ドウエアで行っていた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. Conventionally, this processing was performed in the sound source circuit/\-ware.
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はMCPUIOの生成した
楽音波形データと5CPU20で生成した楽音波形デー
タをDACI OOに出力する。
Then, at 5-5, the MCPUIO outputs the musical tone waveform data generated by the MCPUIO and the musical tone waveform data generated by the 5CPU 20 to the DACI OO.

音源処理5−1.6−1の詳細を第7図に示す、本例で
は、各CPU(MCPUIO1SCPU20)はそれぞ
れ8チャンネル分の楽音波形データを生成可能であり、
システム全体として16チヤンネル分の楽音波形データ
を生成可能としている。7−1で波形加算用RAM領域
(RAMI06内、RAM206内)をクリアし、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. Clear the waveform addition RAM area (RAMI06, RAM206) in 7-1, and
In steps 2 to 7-9, sound source processing for each channel from the first channel to the 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(MCPUIO1SCPU2
0)はチャンネル音源処理を実行する際に、そのチャン
ネルに対する音源処理レジスタ群、即ち第11図に示す
ように、エンベロープΔx用タイマー、目標エンベロー
フ、エンベロープΔX、加減フラグ付エンベロープΔy
、現在エンベロープ、アドレス加算値、ループアドレス
、エンドアドレス、スタートアドレス兼現在アドレスを
参照し、所望のレジスタを更新する。エンベロープは振
幅変調のために基本波形に付加すべきもので、全体とし
ていくつかのセグメント(ステップ)から成っている。
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 (MCPUIO1SCPU2
0) is a group of sound source processing registers for that channel when executing channel sound source processing, that is, as shown in FIG.
, refer to the 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.

エンベロープΔX用タイマーと目標エンベロープとエン
ベロープΔXと加減フラグ付エンベロープΔyは現在進
行中のエンベロープセグメントを定義するエンベロープ
処理メ−1であ4J、このエンベロープパラメータは、
MCPUIOのメインプログラム(第4図)の発音処理
4−9内において、エンベロープ値がセグメントの目標
値に到達の都度、更新される情報であり、インタラプト
処理ルーチン(第5図、第6図)ではこれらのエンベロ
ープパラメータはエンヘロープΔχ用タイマーを除いて
単に参照されるだけである。エンベロープΔXはエンベ
ロープの演算周期を表わし、目標エンベロープは現セグ
メントにおけるエンベロープの目標値を表わし、加減フ
ラグ付エンベロープΔyは演算周期ごとのエンベロープ
の変化分を表わし、現在エンベロープは現在のエンベロ
ープ値を表わす、アドレス加算値、ループアドレス、エ
ンドアドレス及びスタートアドレス兼現在アドレスは外
部メモリ90に置かれる基本波形に対するアドレス情報
であり、スタートアドレスは基本波形メモリ(外部メモ
リ90内)のスタートアドレス、ループアドレスは基本
波形を繰り返し読み出す場合の戻り先のアドレス(第1
O図ではスタートアドレスと同一)、エンドアドレスは
基本波形のエンドアドレスを表わし、現在アドレスは基
本波形の現在の位相を表わすアドレスであり、その整数
部が、基本波形メモリに現実に存在する記憶場所を表わ
し、その小数部が、この記憶場所からのずれを表わし、
アドレス加算値はタイマインタラプト処理ルーチンの時
間間隔ごとに現在アドレスに加算されるべき値であり、
生成する楽音のピッチに正比例する。
The timer for the envelope ΔX, the target envelope, the envelope ΔX, and the envelope Δy with addition/subtraction flag are the envelope processing parameters 4J that define the envelope segment currently in progress.
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 calculation cycle of the envelope, the target envelope represents the target value of the envelope in the current segment, the envelope Δy with addition/subtraction flag represents the change in the envelope for each calculation cycle, and the current envelope represents the current envelope value. The address addition value, loop address, end address, and start address/current address are address information for the basic waveform placed 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 Return destination address (first
The end address is the end address of the basic waveform, the current address is the address that represents the current phase of the basic waveform, and the integer part is the memory 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 the value to be added to the current address at each time interval of the timer interrupt processing routine,
Directly proportional to the pitch of the musical note being generated.

詳細に述べると、9−1でエンベロープの演算周期ΔX
と比較するためのタイマレジスタをインタラプトごとに
インクリメントし、9−2でΔXと一致したとき9−3
でエンベロープ変位分のデータΔyの加減算フラグ(符
号ビット)をテストしてエンベロープが上昇中か下降中
かを判別し、9−4.9−5でそれぞれ現在エンベロー
プの減算または加算を行う、9−6で現在エンベロープ
が目標エンベロープ値に達したかどうかをチエツクし、
達しておれば、現在エンベロープに目標レベルをセット
する。これによりメインプログラムの発音処理4−9で
次のエンベロープステップのデータがセットされること
になる。また発音処理4−9でゼロの現在エンベロープ
を読んだときには発音の終了として処理される。
To explain in detail, in 9-1, the envelope calculation period ΔX
Increment the timer register for comparison with ΔX at each interrupt, and when it matches ΔX at 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倍にしている(第1O図)、シたが
って、アドレス加算値が0.5のとき、A4の音が得ら
れるようになっている。この場合、A#4ではアドレス
加算値は0.529となり、A3のとき、lとなる。こ
れらのアドレス加算値はピッチデータとして制御データ
兼波形外部メモリ90内に記憶されており、押鍵時には
発音処理4−9において、Ilに対応するピッチデータ
と選択されている音色の波形スタートアドレス、波形エ
ンドアドレス及び波形ループアドレスが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 the timer interrupt is constant, and the added value of the address (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 timbre deterioration and distortion due to interpolation are more pronounced in the high frequency range, the original sound is recorded 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 (Fig. 1O). Therefore, 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 Il and the waveform start address of the selected tone, The waveform end address and the waveform loop address are set in the 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.

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

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

この場合、MCPUIO1SCPU20の処理する音源
チャンネルの夫々を左右のDACのいずれに割り当てる
かを決めるようにするとよい、具体的には、各チャンネ
ル用の音源データとして内部RAM106,206上に
1選択DAC指示データをもたせ、また、2つの波形加
算用領域、即ち、左DAC用波形加算用領域と左DAC
用波形加算用領域を設ける。また、7−1に対応するス
テップで左右のDAC用の各波形加算用領域をクリアし
、9−20の処理の後、処理チャンネルに割り当ててい
るDACを選択DAC指示データから判別し、対応する
波形加算用領域に処理チャンネルの楽音波形データを加
算する。そして、MCPUIOのインタラプト処理ルー
チン(第5図)のステップ5−4に対応するステップで
、5CPU20の生成した左DAC用楽音波形データと
右DAC用東音波形データとをそれぞれMCPUIOで
生成した左DAC用楽音波形データと右DAC#11楽
音波形データに加算し、加算結果である左DAC用と右
DAC用の楽音波形データを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 1 SCPU 20. Specifically, one selected DAC instruction data is stored on the internal RAM 106, 206 as the sound source data for each channel. 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 sound waveform data for the left DAC and the east sound waveform data for the right DAC generated by the 5 CPU 20 are transferred to the left DAC generated by the MCPUIO. add the music waveform data for the left DAC and the right DAC #11 music waveform data, and send the addition results, the music waveform data for the left DAC and right DAC, to the left DAC 100L and right DAC 100R, respectively, in steps corresponding to 5-5. .

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

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

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

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

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

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

第8図に、時間の流れに沿う本実施例の動作の流れヲ示
す、A−Fはメインプログラムの断片である。5A〜5
Fは第5図のMCPUインタラプト処理ルーチンを表わ
し、6A〜6Fは第6FgJの5CPUインタラプト処
理ルーチンを表わす0図示のように、インタラプト信号
INTが発生すると、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 5th CPU interrupt processing routine in the 6th FgJ. Processing starts in each CPU10120, and parallel processing of sound sources is performed.

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

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

第12図において、点線16の右側は5CPU20であ
り左側はMCPUIOである。左側の要素のうち、ラッ
チL1.ラッチL2.ゲートl!42〜1154はMC
PUIO(第2図)のROMアドレス制御部114に含
まれる回路要素である。ラッチLlにはMCPUIOの
実行すべき次の命令のROM102アドレス情報AN 
(ROM102からの現命令に含まれる情報)がクロッ
クTICKIでラッチされる。メインプログラム(第4
v!J)の実行中、ラッチL1の出力は次アドレスBN
としてMCPUIOのROMアドレスデコーダ104に
入力される。即ち、ラッチL1の出力はインバータ11
44.3状態インバータゲ−)1146(イネーブルさ
れている)を通ってROMアドレスデコーダ104への
アドレス入力BNとなる。ここでインタラプト発生部1
16からインタラプト信号INTが発生すると、この信
号INTを受けるORゲート1154から、インバータ
1148を介してラッチLlの出力側にある3状態イン
バータゲー)1146をオフ(ハイインピーダンス)に
する信号が加えられ1代りに、ORゲート1154から
の信号により、割込入ロ/戻先アドレス選択ゲー)11
50の出力側にある3状態インバータゲー)1152が
ゲート1150の出力をROMアドレスデコーダ104
のアドレス入力BNに通す6割込入ロ/戻先アドレス選
択ゲー)1150はインタラプト信号INTとラッチL
2からの出力信号を受けるNORゲート群で構成され、
′H″のインタラプト信号INT発生時に、インタラプ
ト処理ルーチン(第5図)の入口(エントリポイント)
を表わすオール“0”の信号を出力し、この信号は3状
態インバータゲー)1152で反転されて、オール“l
”の信号BNとしてMCPUのROMアドレスデコーダ
104に入力される。そして次のオペレージ璽ンラッチ
信号により、制御用ROM102からインストラクショ
ン出カラー、チ102aにインタラプト処理ルーチンの
最初の命令がフェッチされる0以上により、MCPUI
Oの制御がインタラプト処理ルーチンに移る。
In FIG. 12, the right side of the dotted line 16 is the 5 CPU 20, and the left side is the MCPUIO. Among the elements on the left, latch L1. Latch L2. Gate l! 42-1154 are MC
This is a circuit element included in the ROM address control unit 114 of the PUIO (FIG. 2). The latch Ll 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
v! During execution of J), the output of latch L1 is the next address BN.
The address is input to the ROM address decoder 104 of the MCPUIO. That is, the output of latch L1 is output from inverter 11.
44.3-state inverter) 1146 (enabled) and becomes the address input BN to the ROM address decoder 104. Here, interrupt generation part 1
When an interrupt signal INT is generated from 16, a signal is applied from an OR gate 1154 receiving this signal INT to turn off (high impedance) the 3-state inverter 1146 on the output side of the latch L1 via an inverter 1148. Instead, a signal from the OR gate 1154 is used to select the interrupt address/return destination address (11).
A three-state inverter (gate) 1152 on the output side of gate 1150 converts the output of gate 1150 to ROM address decoder 104.
6 interrupt input BN/return destination address selection game) 1150 is the interrupt signal INT and latch L
It consists of a group of NOR gates that receive output signals from 2,
When the interrupt signal INT of 'H' is generated, the entrance (entry point) of the interrupt processing routine (Fig. 5)
This signal is inverted by a 3-state inverter (1152) and outputs an all-0 signal representing
” is input to the ROM address decoder 104 of the MCPU as a signal BN. Then, in response to the next operation latch signal, an instruction is output from the control ROM 102 and the first instruction of the interrupt processing routine is fetched from the control ROM 102 to the chip 102a. , MCPUI
Control of O is transferred to the interrupt processing routine.

更に、インタラプト発生部116からのインタラプト信
号INTはクロック72CK2のタイミングでANDゲ
ー)1142を通り、ラッチ信号としてラッチL2を動
作させる。これにより、ラッチL2はバスAN上にある
メインプログラムの次命令のアドレスをラッチ(退避)
してメインプログラムを中断させる。
Furthermore, the interrupt signal INT from the interrupt generating section 116 passes through the AND gate (1142) at the timing of the clock 72CK2, and operates the latch L2 as a latch signal. As a result, latch L2 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 generating 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”)、なお1図示しな
いが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. It consists of an R-S flip-flop 1346. During main program execution, R-S flip-flop 1346
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” (SCPU
動作中を示す)に変化する。@号Aは、5CPU20に
おける次命令のアドレスSANをラッチするためのラッ
チL3にリセット解除信号(ラッチL3のイネーブル信
号)として入力される。この結果、ラッチL3は次のク
ロックTlCK1のタイミングでバスSANに乗ってい
る5CPUプログラム(第6図)の最初の命令のアドレ
スをSBNとして5CPU20のROMアドレスデコー
ダ204に入力する。このようにして、インタラプト発
生部116からのインタラプト信号INTに応答して5
CPU20の動作が開始し。
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 output, 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”.
” (indicating SCPU is stopped) to “H” (SCPU
(indicating that it is in operation). @ No. A 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 5 CPU 20. 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 clock TlCK1. In this way, in response to the interrupt signal INT from the interrupt generating section 116,
The operation of the CPU 20 starts.

第6図に示す音源処理が実行される。The sound source processing shown in FIG. 6 is executed.

5CPU20が音源処理の最後の命令を実行す68.5
CPU20のオペレーション制御回路l12の内部で動
作終了信号(復帰コマンド信号)SRTが発生する。こ
の信号SRTはDフリップ70ツブ2122にりaツク
T2CK 1のタイミングで取り込まれた後、次のTI
CKIのタイミング(次のダミー命令のラッチタイミン
グ)で動作するNANDゲー)2124で反転され、ロ
ーパルスの動作終了信号Bとして5CPUリセット制御
部134のR−Sフリップフロップ1346をリセット
する。この結果、R−Sフリップフロップ1346のQ
出力、即ち、信号Aは“L”から“H″′に切り換り、
Q出力、即ち、5CPU状態フラグは5CPU11作中
を示す“H″から5CPU20停止中を示す“L”に切
り換る。′H”レベルの信号A(リセット信号)により
、ラッチL3の動作は禁止され、ラッチL3出力、つま
り、アドレスデコーダ204の入力はダミー命令の(N
o?命令)のアドレスに固定される。このときラッチL
3の入力バスSANには5CPU音#lL理プログラム
(第6rIIJ)の最初の命令のアドレス情報(NOP
命令語に含まれる)が乗っている。
5 CPU 20 executes the last instruction of sound source processing 68.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 in by the D-flip 70 block 2122 at the timing of a-tuck T2CK1, and then the next TI
It is inverted by the NAND gate (NAND game operating at the CKI timing (latch timing of the next dummy instruction)) 2124 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 Q of the R-S flip-flop 1346 is
The output, that is, the signal A switches from "L" to "H'',
The Q output, that is, the 5 CPU status flag switches from "H" indicating that the 5 CPU 11 is in operation to "L" indicating that the 5 CPU 20 is stopped. The operation of the latch L3 is prohibited by the 'H' level signal A (reset signal), and the output of the latch L3, that is, the input of the address decoder 204 is
o? (instruction) address. At this time, latch L
3 input bus SAN contains address information (NOP
(included in the command word) is on board.

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 included processing routine (FIG. 5), and checks the level of the 5CPU status flag while the 5CPU is stopped, that is, the sound source processing of the 5CPU 20 is completed. After confirming that, 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). As a result, the MCPUIO
20 correct processing results can be efficiently obtained.

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

以上のように、本実施例の電子楽器処理装置は、MCP
UIOによる5CPU20の動作期間の管理を5CPU
リセット制御部134のようなlII車な管理インター
フェース構成を設けることで効率よく、確実に行うこと
ができる。
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 suitable management interface configuration such as the reset control unit 134, this can be done efficiently and reliably.

く複数データ転送〉 CPUを用いたある種のアプリケージ曹ンでは、CPU
はメインプログラム(第1のプログラム)の実行におい
て複数のデータを更新し、インタラプト処理ルーチン(
第2のプログラム)の実行において、その処理の目的の
ためにこれら複数のデータを参照する。これはメインプ
ログラムからインタラプト処理ルーチンへデータを渡す
問題である。このような複数のデータは、インタラプト
処理ルーチンによってメインプログラムが中断される前
に、メインプログラムにおいて全てのデータ奄更新しな
ければならない、メインプログラムが複数のデータの一
部だけを更新した時点で中断されてインタラプト処理ル
ーチンにCPUの制御が移ってしまうとインタラプト処
理ルーチンの処理結果は誤ったものになる。
Multiple data transfers> In some types of application software using the CPU, 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 the main program is interrupted when only a part of the multiple data has been updated. If the CPU control is transferred to the interrupt processing routine, the processing result of the interrupt processing routine will be incorrect.

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

このような複数のデータ転送(更新)の問題を解決する
ために、本実施例では2つの解決手段を開示する。第1
の解決手段はデータ更新の間、インタラプトをマスクし
てメインプログラムのデータ更新命令群の実行が中断さ
れないようにするインタラプトマスク方式であり、第2
の解決手段は複数のデータ転送を一命令で実行する機能
を利用した一命令方式である。
In order to solve this 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に
おけるデータ更新命令群によって内部1?AMのチャン
ネル音源レジスタ群にデータをセットする間、マスクさ
れて、MCPUIOの制御がメインプログラム(第4図
)からインタラブト処理ルーチン(第5図)に移るのが
禁止される。
Interrupt mask method (16th, 17th. 2nd to 7th
(Figure) According to this method, an interrupt from the interrupt generation unit 116 is generated by an internal 1? While data is being set in the AM channel sound source register group, it is masked and the control of the MCPUIO is prohibited from being transferred from the main program (FIG. 4) to the interrupt processing routine (FIG. 5).

第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を取り出し、内
llRAM106内の転送バッファにセットする。
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 for the next envelope segment 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 RAM 106. transfer buffer.

ここに転送バッファはデータ源とデータ目的地との間の
中間的な記憶部でありインタラプト処理ルーチン(JF
! 9 rI!J)によって参照されないRAM領域で
あるので、この時点でのインタラプトマスクは不要であ
る。転送バッファを設けた理由はデータ源であるメモリ
90がMCPUIOと5CPU20によって共用される
外部メモリであり、そのデータアクセス時間が内部RA
M相互のデータ転送時間より長くなること等による。ブ
ロック17−2の機能は外部データメモリ90から内部
RAM100への複数のデータ転送命令を順次実行する
ことで処理される。
Here, the transfer buffer is an intermediate storage unit between the data source and the data destination, and the interrupt processing routine (JF
! 9rI! Since this is a RAM area that is not referenced by J), an interrupt mask is not required at this point. The reason for providing the transfer buffer is that the data source memory 90 is an external memory shared by the MCPUIO and 5 CPUs 20, and the data access time is limited to the internal RA.
This is due to the fact that the data transfer time is longer than the data transfer time between the M units. The function of block 17-2 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でインタラプトをマスクする命
令を実行する。このインタラプトマスク64の実行中に
、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. While this interrupt mask 64 is being executed, a low active mask signal MASK is generated from the MCPUIO operation control circuit 112. 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
D game) 1504 and a D flip-flop 1506.

マスク信号MASKがマスク解除を示す“H″レベルと
き、インタラプト発生部116からのインタラプト信号
INTにより、R−Sフリップフロップ1502がセッ
トされ、その出力がH”のMASKによりイネーブルさ
れているANDゲートを通って、Dフリップフロップ1
506にTICKIのタイミングで取り込まれ、このD
フリップフロップ1506の出力が、実際のインタラプ
ト信号A−I NTとしてMCPU 10のROMアド
レス制御部114に入力される。その結果、5CPU動
作MMI−H了*#!、(1)ところで述へたように、
ROMアドレス制御部114のゲー)1152からRO
Mアドレスデコーダ104にインタラプト処理ルーチン
(第5図)のエントリポイントのアドレスが入力される
とともに、次のメインプログラム命令のアドレスがバス
ANからラッチL2に退避されて、MCPUIOの制御
がインタラプト処理ルーチンに移行し、メインプログラ
ムは中断される。また、信号A−INTは5CPUリセ
ット制御部134に入力され、その結果、5CPU動作
開始・終了機能のところで述べたように5CPU20の
プログラム(第7図)動作が開始する。Dフリップフロ
ップ1506からのHレベルの出力はR−Sフリップフ
ロップ1502をリセットし、その結果、次のTICK
Iのタイミングで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 connects the AND gate enabled by the "H" MASK. Through, D flip-flop 1
506 at the timing of TICKI, this D
The output of the flip-flop 1506 is input to the ROM address control section 114 of the MCPU 10 as an actual interrupt signal A-I NT. As a result, 5 CPU operation MMI-H completed*#! , (1) As mentioned earlier,
ROM address control unit 114 game) 1152 to RO
The address of the entry point of the interrupt processing routine (FIG. 5) is input to the M address decoder 104, and the address of the next main program instruction is saved from bus AN to latch L2, and control of MCPUIO is transferred to the interrupt processing routine. The main program will be 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. The H level output from D flip-flop 1506 resets R-S flip-flop 1502, so that the next TICK
At the timing of I, the output of the D flip-flop 1506 (
The output of the mask release special unit 150) is switched to L level.

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

したがって、ブロック17−4に示す転送命令群(及び
エンベロープΔχ用タイマーのクリア命令)の実行は、
実行の途中で、インタラプト発生1!1116からイン
タラプト信号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 interrupt occurrence 1!1116 during execution, it will not be interrupted.
As a result, the interrupt processing routine (Figures 5 and 6)
(Figure) can refer to correctly updated letter envelope parameters and 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 execution of this mask cancellation command. Acceptance is 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のアドレス下位、即ち列アドレスを表わす)、
制御用1’lOM (本実施例の要素102に対応する
)からのロング命令語にはソースレジスタの行アドレス
(上の例でいえばA)、ディスティネーションレジスタ
の行アドレス(B)、最初のデータ転送に係るレジスタ
の列アドレス(0)、最後のデータ転送に係るレジスタ
の列アドレス(3)の情報が含まれる。RAMアドレス
制御部(本実施例の要素105に対応する)はロング命
令の実行に適するように構成され、列アドレスを最初の
転送の列アドレスから最後の転送の列アドレスまでデー
タ転送の都度、lずっ更新するカウンタ(その出力がR
AMの列アドレス入力に順次加えられる)と、すべての
データ転送が完了したことを検出するためカウンタ出力
と最後のデータ転送の列アドレス値とを比較し、一致し
たときにロング命令実行完了信号を発生する一致回路と
を含んでいる。
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 (for example, registers AO to A3 to registers BO to B3) (here, a 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 1'lOM (corresponding to element 102 in this embodiment) contains the source register row address (A in the above example), the destination register row address (B), and the first Information about the column address (0) of the register related to the data transfer and the column address (3) of the register related to the last data transfer is included. The RAM address control section (corresponding to element 105 in this embodiment) is configured to be suitable for long instruction execution, and changes the column address from the column address of the first transfer to the column address of the last transfer, l, for each data transfer. A counter that updates continuously (its output is R
(sequentially added to the column address input of AM) and the column address value of the last data transfer to detect that all data transfers have been completed. When they match, the long instruction execution completion signal is output. and a matching circuit that generates a match.

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

第18図にロング命令の実行中、インタラプト信号IN
Tによるメインプログラムの中断を禁止する回路を含む
ハードウェアのブロック図を示し、第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はロン
グ命令の実行中、インタラプト信号によるメインプログ
ラムの中断を禁止する。転送終了時aI!部152は図
示のように結合されたR−Sフリップ7+ff−/プ1
522、ANDゲート1524、Dフリップフロップ1
526から成り、Dフリップフロップ1526の出力(
転送終了特機部152の出力)が実際に作用するインタ
ラプト信号A−I NTとしてROMアドレス制御部2
14と5cpuリセット制御部134に結合している。
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. At the end of transfer aI! The portion 152 is connected to the R-S flip 7+ff-/pu1 as shown.
522, AND gate 1524, D flip-flop 1
526, and the output of the D flip-flop 1526 (
The output of the transfer end special unit 152) is sent to the ROM address control unit 2 as the interrupt signal A-INT that actually acts.
14 and 5 are coupled to the CPU reset control unit 134.

ANDゲー)1524に入力される信号〜LONGがL
”の間は、インタラプト発生部l16からインタラプト
信号ZNTが発生しても、Dフリップフロップ1526
の出力はL”のままであり、ROMアドレス制御部21
4と5CPUリセット制御部134はインタラプト信号
INTの作用を受けない、ここに、信号〜LONGはロ
ング命令の実行中に“L″となる信号であり、ロング命
令の実行完了に伴ってRAMアドレス制御部104の一
致回路から発生するロング命令実行完了信号に応答して
“H”に復帰する。信号〜LONGのレベルが“H”の
ときには、インタラプト発生部116からのインタラプ
ト信号INTは転送終了特機部152を通ってROMア
ドレス制’111g214ト5CPU!Jセy トf1
111部1341.:作用し、MCPUIOの制御をメ
インプログラム(第4図)からインタラプト処理ルーチ
ン(第5図)に移行させ、5CPU20のプログラム(
第6図)動作を開始させる。
AND game) Signal input to 1524 ~ LONG is L
”, even if the interrupt signal ZNT is generated from the interrupt generation unit l16, the D flip-flop 1526
The output of the ROM address control unit 21 remains at L”.
4 and 5 The CPU reset control unit 134 is not affected by the interrupt signal INT. Here, the signal ~LONG is a signal that becomes "L" during execution of a long instruction, and RAM address control is performed upon completion of execution of the long instruction. It returns to "H" in response to the long instruction execution completion signal generated from the coincidence circuit of section 104. When the level of the signal ~LONG is "H", the interrupt signal INT from the interrupt generation section 116 passes through the transfer end special section 152 to the ROM address system '111g214to5CPU! J Sey to f1
111 part 1341. :Acts to transfer the control of MCPUIO from the main program (Fig. 4) to the interrupt processing routine (Fig. 5), and transfers the control of MCPUIO from the main program (Fig. 4) to the interrupt processing routine (Fig.
Figure 6) Start the operation.

エンベロープパラメータの更新に一命令方式を適用する
場合において、インタラプト処理ルーチン(第5図、第
6図)のチャンネル音源処理サブルーチン(第9図)が
参照し、メインプログラムのエンベロープ処理ザブルー
チン(第21図)が設定(更新)するエンベa−プパラ
メータはエンベロープΔχ用タイマー、新目標エンベc
r−フ。
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. ) is set (updated) by envelope parameters such as envelope Δχ timer, new target envelope c
r-fu.

jエンベロープΔx、1llo11フラグ付エンベロー
プΔyである0本実施例において、これらのエンベロー
プパラメータのデータ源は外部メモリ90(第1 図)
にある、エンベロープパラメータの更新の際に(21−
1)、外部データメモリ90から内部RAM106.2
06のチャンネル音源データ領域への直接の転送は望ま
しくないので、外部データメモリ90かものエンベロー
プパラメータはいったん内部RAM10B内の転送用バ
ッフγ領域に移しく2l−2)、次に、転送用バッファ
領域からチャンネル音源データ領域に移す(21−3)
j envelope Δx, 1llo11 flagged envelope Δy, 0. In this embodiment, the data source for these envelope parameters is the external memory 90 (FIG. 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 of the external data memory 90 are temporarily transferred to the transfer buffer γ area in the internal RAM 10B (2l-2), and then transferred to the transfer buffer area. Move from to channel sound source data area (21-3)
.

この転送用バッファ領域からチャンネル音源データ領域
へのデータ転送処理21−3に上述したロング命令が使
用される。ロング命令を適用するために、転送用バッフ
γ領域はRAM上の連続した領域であることを必要とし
、同様にエンベロープパラメータのチャンネル音源デー
タ領域も連続した領域であることを必要とする。この例
を第19図に示す、ここでは、エンベa−プパラメータ
の転送用バッファ領域は、レジスタX4〜x7の連続領
域にマツピングされエンベロープパラメータについての
1チヤンネル音源データ領域はレジスタA4〜A7の連
続領域にマツピングされている。したがって、1チヤン
ネルでエンベロープパラメータを更新する必要のあると
きには、21−3で、レジスタx4〜x7をレジスタA
4〜A7に転送するロング命令を実行すればよい、この
命令が実行されている間は、上述したようにインタラプ
ト信号INTがインタラプト発生部11Bから発生して
も、転送終了特機部152のロング命令完了待機機能に
より、ロング命令が終了するまではインタラプト信号の
作用がI’lOMアドレス制御部114.5CPUリセ
ット制御部134に波及しない(第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 a continuous area of registers X4 to x7, and the one-channel sound source data area for envelope parameters is mapped to a continuous area of registers A4 to A7. mapped to the area. Therefore, when it is necessary to update the envelope parameters in one channel, registers x4 to x7 are transferred to register A in 21-3.
4 to A7. While this instruction is being executed, even if the interrupt signal INT is generated from the interrupt generation section 11B as described above, the long instruction of the transfer end special section 152 is executed. Due to the instruction completion wait function, the effect of the interrupt signal does not affect the I'lOM address control unit 114.5 CPU reset control unit 134 until the long instruction is completed (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つのエンベロープパラメータ
を転送する)の実行によって果たそうとした場合には、
転送の途中で1例えば、第209(A)に示すように転
送命令lの実行中にインタラプト信号INTが発生する
と次のマシンサイクルで転送命令2の代りにインタラプ
ト処理ルーチンの最初の命令が実行されてエンベロープ
転送処理は途中で中断されてしまう、この結果、インタ
ラブ)ILJIルーチンの処理結果(楽音波形データ)
は誤った値となってしまう。
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),
For example, if an interrupt signal INT occurs during the execution of transfer instruction 1 as shown in No. 209 (A) during transfer, the first instruction of the interrupt processing routine is executed instead of transfer instruction 2 in the next machine cycle. As a result, the envelope transfer process is interrupted midway.As a result, the processing result of the interlab) ILJI routine (music waveform data)
will be 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からの命令をフェッチするインストラクシ、
ン出カラー2千102aの動作を禁止する手段を使用し
てもよい、即ち、制御用ROM102からラッチ102
aを介して与えられるロング命令語に含まれるモード信
号(命令がロングであることを示している)によって、
インストラクション出力ラッチ102a、202aに加
えるオペレーションラッチ信号の発生を禁止し、ロング
命令の実行完了信号に応答して次のマシンサイクルでオ
ペレーションラッチ信号を発生する回路をオペレージ、
ン制御回路112内に設ければ、インタラプト信号IN
Tがロング命令の実行中に発生しても制御用ROM10
2.202からインタラプト処理ルーチンの最初の命令
語はロング命令の実行が終了するまではインストラクシ
ョン出力ラッチ102a、202aにフェッチされない
(したがって実行もされない)ので実施例と同様の効果
が得られる。
As a modified example, a transfer termination special unit 1 as shown in FIG.
52, the control ROM 10 is used during execution of a long instruction.
2. An instruction that fetches instructions from 202,
A means for inhibiting the operation of the latch 102a 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,
Prohibits the generation of the operation latch signal applied to the instruction output latches 102a and 202a, and operates the circuit that generates the operation latch signal in the next machine cycle in response to the long instruction execution completion signal.
If provided in the interrupt signal IN control circuit 112, the 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から5CPU20の内部RAM206
にデータを高速にアクセス(リードまたはライト)する
機能を有している。
<Function for accessing 5 CPUs from MCPU> The device of this embodiment accesses the internal RAM 206 of 5 CPUs 20 from MCPUIO.
It has the ability to access (read or write) data at high speed.

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

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

5CPU停 モード利用方式(第22図、第2、第3図
) この方式は上述した5CPU動作開始・終了機能を利用
したものである。この機能により5CPU20のプログ
ラム(第6図)動作はMCPUIOにおけるインタラプ
ト処理ルーチン(第5図)の開始と同時に開始し、MC
PUIOのインタラプト処理ルーチンが終了する前に終
了する。したがって、MCPUIOにおいてメインプロ
グラム(第4図)が動作している間は5CPU20は停
止モード(リセット状t!i)にある、第2図に示すよ
うに停止モード中では、リセット制御部134からの信
号Aが“5CPU停止中”を示す“H”レベルになる。
5CPU stop mode utilization method (FIGS. 22, 2, and 3) This method utilizes the above-mentioned 5CPU operation start/end function. 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 5CPU 20 is in the stop mode (reset state t!i). In the stop mode as shown in FIG. Signal A becomes "H" level indicating "5 CPU is stopped".

この信号Aにより、5CPU20(第3図)ではROM
7ドレス制御部214の動作が停止し、RAMアドレス
制御部204は5CPU20の制御用ROM202から
のRAMアドレスバスSAではなく、MCPUIOから
バスゲート128を介してRAMアドレスバスMaに結
合してMCPUIOからの5CPU内部RAM206の
指定アドレスを受けるように動作モードが設定され、R
AMデータに切り換え部240は5CPU20のオペレ
ーション結果(ALU部208出力または乗算器210
出力)を運ぶデータバスDBではなくMCPUIOから
のデータを運ぶデータバスD OUT にRAM206
のデータインを結合する動作モードに設定され、ライト
信号切り換え部242は5CPUオペレ一シヨン制御回
路212からのリード/ライト制御信号ではなくオペレ
ーション制御回路112からのリード/ライト制御信号
CをRAM206のリード/ライト制御入力に結合する
動作モードに設定される。このように停止状態のとき、
5CPU20はMCPUloによってデータアクセスが
可能な状態に置かれている。
This signal A causes the 5 CPU 20 (Fig. 3) to read the ROM
The operation of the 7-address control unit 214 is stopped, and the RAM address control unit 204 connects to the RAM address bus Ma from MCPUIO via the bus gate 128 instead of the RAM address bus SA from the control ROM 202 of the 5CPU 20. 5 The operating mode is set to receive the designated address of the CPU internal RAM 206, and the R
The AM data switching unit 240 receives the operation result of the 5 CPU 20 (ALU unit 208 output or multiplier 210
RAM 206 on the data bus D OUT which carries data from MCPUIO instead of the data bus DB which carries data (output).
The write signal switching unit 242 uses the read/write control signal C from the operation control circuit 112 instead of the read/write control signal from the 5 CPU operation control circuit 212 to read the data from the RAM 206. / set to the operating mode coupled to the light control input. When stopped like this,
The 5 CPU 20 is placed in a state where it can access data by MCPUlo.

したがって、本実施例によれば、MCPUIOはメイン
プログラムにおいて5CPU20の内部RAM206を
自由にアクセスすることかでさる。この様子を第22図
に示す、5CPU20の停止状L!i(音源処理完了)
の確認、即ちMCPUオペレーション制W回路!12に
おける5CPUリセット制御部134からの5CPU状
態フラグの検査はMCPUIOのインタラプト処理ルー
チン(第5図)のなかで1回だけ行えばよい(5−3参
照)、いったん停止状態が確認されれば、次のインタラ
プト信号INTが発生するまで、再度の確認をする必要
なしに、−命令の実行で、MCPUIOはSCPυ20
の内部RAM20Bをアクセスできる。したがって、従
来に比べ、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, which shows the stoppage L! of the 5 CPU 20. i (sound source processing complete)
Confirmation of MCPU operation control W circuit! The check of the 5CPU status flag from the 5CPU reset control unit 134 in step 12 only needs to be performed once in the MCPUIO interrupt processing routine (Fig. 5) (see 5-3); once the stopped state is confirmed, Until the next interrupt signal INT occurs, without the need for confirmation again, - upon execution of the instruction, the MCPUIO
The internal RAM 20B can be accessed. Therefore, the time required for data access to the 5 CPUs 20 is significantly reduced compared to the prior art.

瞬 強制アクセス 式 第23〜N425図)この方式
はデータアクセスのためにMCPUIOと5CPU20
との間で従来のようなアクセスの要求と承認という手続
を踏むことなく、MCPUIOからの5CPUデ一タア
クセス時に5CPU20の動作を強制的に一時停止させ
、その間にMCPUIOが5CPU20の内部RAM2
06にアクセスするものである。この方式によれば、M
CPU 10は任意のときに5CPU20の状態を調べ
る必要なしに5CPU20を高速に(−命令実行で)ア
クセスできる。
Instant forced access formula Figures 23 to N425) This method uses MCPUIO and 5CPU20 for data access.
When MCPUIO accesses 5CPU data, the operation of 5CPU20 is forcibly suspended, without going through the conventional procedure of requesting and approving access between the MCPUIO and
06. According to this method, M
The CPU 10 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)
The reset control circuit 134 and others) are not shown in FIGS. 23 and 24 for the sake of simplicity. 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の一周
期でマシンサイクル(最短の一命令実行時間)が規定さ
れ。
When using the instantaneous forced access method, MCPUIO and 5CPU20 are separate clock generation circuits 136.236
Requires M. 5 Clock generation circuit 23 of CPU 20
6M stops its operation in response to a high active 5CPU access signal output from the operation control circuit 112M of MCPUIO when a data access instruction to 5CPU 20 is executed. In this regard, MCPUI
The clock generation circuit 136 of the CPU 20 and the clock generation circuit 236M of the 5 CPU 20 use a common two-phase master clock signal C.
K1. Although it receives CK2, the timing of the output clock is independent. In MCPUIO, clock generation circuit 1
A machine cycle (the shortest one instruction execution time) is defined by one period of the three-phase clock signals T1, T2, and T3 from 36.

方、5CPU20ではクロック発生回路236Mからの
3相のクロック信号STI、Sr1、Sr1の一周期で
そのマシンサイクルが規定される。
On the other hand, in the 5 CPU 20, a machine cycle is defined by one period of the three-phase clock signals STI, Sr1, and Sr1 from the clock generation circuit 236M.

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

MCPUIOにおける5CPUアクセス命令実行中にオ
ペレーション制御回路112から出力される5CPUア
クセス信号りは、5CPU20のクロック発生回路23
6Mを停止させて5CPU20で実行中のオペレーショ
ンを停止させるとともに、その停止中にMCPUIOが
5CPU20の内部RAM206をアクセスできるよう
に、MCPUIOからの内部RAM206の指定アドレ
スに係るバスゲート128.5CPU内部RAM206
に対するアドレス制御部204、データイン切り換え部
240.及びライト信号切り換え部242の各動作モー
ドを“5CPU側”から“MCPUIII″に切り換え
る機能を有する。このために、5CPUアクセス信号は
これらの要素128.204.240.242の動作モ
ードを選択する制御入力にDフリップフロップ250と
ANDゲート252とから成る遅延回路を介して結合し
ている。このようなアクセス可能状態の下で、MCPU
 10はバスゲート128、RAMアドレス制御部20
4を介して5CPU内部RAM206をアドレッシング
し、リードアクセスの場合には5CPU内部RAM20
6から出力されるデータをバスゲート132を介してM
CPU内部RAM106に読み込み、ライトアクセスの
場合には、バスゲー)130を介して書き込みデータを
データバスD 0LITに乗せ、5CPU内部RAM2
06にライト信号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 operation being executed by the 5 CPU 20 by stopping the 6M, and to allow the MCPUIO to access the internal RAM 206 of the 5 CPU 20 during the stop, the bus gate 128.
address control unit 204, data-in switching unit 240. It also has a function of switching each operation mode of the write signal switching unit 242 from "5CPU side" to "MCPUIII". To this end, the 5 CPU access signal is coupled via a delay circuit consisting of a D flip-flop 250 and an AND gate 252 to a control input that selects the operating mode of these elements 128, 204, 240, 242. Under such an accessible state, the MCPU
10 is a bus gate 128 and a RAM address control section 20
Addresses the 5 CPU internal RAM 206 via the 5 CPU internal RAM 206 via the
The data output from 6 is passed through bus gate 132 to M
The data is read into the CPU internal RAM 106, and in the case of write access, the write data is transferred to the data bus D0LIT via the bus game) 130, and the data is transferred to the CPU internal RAM 2.
A write signal C is given to 06 to write data.

MCPUIOからの5CPUアクセス信号りによって5
CPU20のオペレージ、ンを中断する場合に、オペレ
ージ、ンの中間結果が失われないようにする必要があり
、5CPUアクセス信号りの解除後に、予め保持した中
間結果を用いて5CPU20がオペレージ、ンの残りの
部分を実行できるようにする必要がある。このために、
5CPU内部RAM206のデータ出力を一時的に記憶
するう、チ206a、206bを設けている。ラッチ2
06aはRAM206からの演算数(w41オペランド
)を5TICKIのタイミングでラッチし、ラッチ20
6bはRAM206からの被演算数(第2オペランド)
を5T2CK1のタイミングでラッチする。
5 CPU access signal from MCPUIO
When interrupting the operation of the CPU 20, it is necessary to prevent the intermediate results of the operation from being lost. I need to be able to do the rest. For this,
5CPU internal RAM 206 data output is temporarily stored, and chips 206a and 206b are provided. latch 2
06a latches the operation number (w41 operand) from RAM206 at the timing of 5TICKI, and
6b is the operand from RAM 206 (second operand)
is latched at the timing of 5T2CK1.

第25図を参照して動作例を述べると、この例では、M
CPUIOは5CPUアクセス信号りがハイアクティブ
レベルの間に5CPU20の内部RAM206に対する
ライトアクセスを実行している。MCPUloではこの
データ書込オペレーションの最初のタイムスロットTI
の間に、MCPU内部RAM106から転送データ(R
AM206に書き込むべきデータ)を取り出す0次のタ
イムスロットT2fMCPU10は5CPU内部RAM
206を7ドレツシングする。最後のタイムスOy )
 T 3 ? M CP U 10は5CPU内部RA
M20Bにライト信号Cを与えてRAM206にデータ
を書き込む、5CPU20偏にとってMCPU 10カ
らの5CPUアクセス信号D t* s cPU20の
オペレージ、ン2がタイムスロットST2に移るときは
アクティブに変化している。このオペレーション2は5
CP020のRAM206にある被演算数と演算数をA
LU部208または乗算器210で演算するような命令
のオペレージ璽ンであり得る。MCPUloからの5C
PUアクセスタイムの直前のタイムスロットであるオペ
レーション2の最初のタイムスロットSTIで5CPU
20はRAM106から演算数のデータを取り出し、そ
のデータをりaツクTICKIにより演算数ラッチ10
6aにラッチしている0MCPUl0からの5CPUア
クセス信号りが発生しなければ、5CPU20は次のタ
イムスロットST2でRAM10Bから被演算数を取り
出して被演算数ラッチ10bにラッチし、最後のタイム
スロッ)Sr1でALU部108または乗算器110で
演算を実行してRAM106の被演算数レジスタに書き
込む、実際には図示のようにオペレージ、ン2の最初の
タイムスロットSTIに続いてMCPUIOからの5C
PUアクセス信号りが発生している。この場合、1つの
対策はオペレージ、ン2の残り2つのタイムスロットS
T2とSr1で実行すべき処理を5CPUアクセス信号
Dが除去されるまで、即ちMCPUIOの5CPUアク
セスオペレーシヨンが終了するまで中断することである
。この方式でもMCPUIOは5CPU20をアクセス
するオペレーションを最短時間(MCPUIOの内部R
AM106をアクセスするのと同じ時間)内に実行で♂
るが、5CPU20にとっては最適ではなくMCPUI
Oからの5CPUアクセスオペレーシヨンの都度、5C
PU20のオペレーションがタイムスロット3つ分遅延
されることになる。都合のよいことに、MCPUIOの
5CPUアクセスオペレーシヨンの最初のタイムスロッ
トT1で実行される処理はSCPυ20に影響を与えな
い処理である。この特徴を利用し、実施例ではMCPU
IOから5CPUアクセス信号りが与えられても、MC
PU 10のタイムスロットTIの間は、5CPU20
自身のオペレージ、ンが継続できるようにして、5CP
U20の動作遅れをできるだけ短かくしている。第25
図の例でいえば、5CPU20はMCPUIOの5CP
Uデータ書込オペレーシヨンの最初のタイムスロットT
Iの間に、RAM206から被演算数のデータを取り出
し、ラッチ206bにクロック5T2CK1を与えて被
演算数をラッチさせている。その後、5CPUクロック
発生回路236の動作は5CPUアクセス信号りが除去
されるまで停止し、5CPU20は待ち状態に置かれる
。そしてこの待ち状態の間、5CPU20の要素128
.264.240.242は5CPUアクセス信号りに
より“MCPU11″に切り換えられ、MCPUIOの
5CPUデータ書込オペレージ、ンにおけるタイムスロ
ットT2、T3に関す6処1Mが実行されて5cPU内
mRAM20BにMCPUIOからのデータが書き込ま
れる。
An operation example will be described with reference to FIG. 25. In this example, M
The CPUIO executes write access to the internal RAM 206 of the 5 CPU 20 while the 5 CPU access signal is at a high active level. In MCPUlo, the first time slot TI of this data write operation
During this period, transfer data (R
0th time slot T2f to take out data to be written to AM206 MCPU10 is 5 CPU internal RAM
Dress 206 7 times. Last Times)
T3? M CPU 10 is 5 CPU internal RA
The write signal C is given to the M20B to write data to the RAM 206.The 5CPU access signal Dt*s from the 10 MCPUs for the 5CPU 20 is active when the operation mode 2 of the cPU 20 moves to the time slot ST2. This operation 2 is 5
The operands and operands in the RAM 206 of CP020 are
It may be an operation code of an instruction to be operated on in the LU unit 208 or the multiplier 210. 5C from MCPUlo
5 CPUs in the first timeslot STI of operation 2, which is the timeslot immediately before the PU access time.
20 takes out the data of the arithmetic number from the RAM 106, and loads the data into the arithmetic number latch 10 by opening TICKI.
If the 5CPU access signal from the 0MCPUl0 latched in ST2 is not generated, the 5CPU20 takes out the operand from the RAM 10B in the next time slot ST2 and latches it in the operand latch 10b, and then in the last time slot ST2) The ALU unit 108 or the multiplier 110 executes the operation and writes it to the operand register of the RAM 106.Actually, as shown in the figure, the operation is performed.
A PU access signal is generated. In this case, one solution is to change the remaining two time slots S
The process to be executed by T2 and Sr1 is suspended until the 5CPU access signal D 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 (MCPUIO's internal R
Execute within the same time as accessing AM106)
However, it is not optimal for 5CPU20 and MCPUI
5C for each 5CPU access operation from O
The operation of PU 20 will be delayed by three time slots. Conveniently, the processing performed in the first time slot T1 of the 5 CPU access operations of MCPUIO is processing that does not affect SCPυ20. By utilizing this feature, in the embodiment, the MCPU
Even if 5 CPU access signals are given from IO, MC
During time slot TI of PU 10, 5 CPU 20
Allow your own operations to continue and earn 5 CP.
The operation delay of U20 is made as short as possible. 25th
In the example in the figure, 5CPU20 is 5CP of MCPUIO
First timeslot T of U data write operation
During I, the data of the operand is taken out from the RAM 206, and the clock 5T2CK1 is applied to the latch 206b to latch the operand. Thereafter, the operation of the 5CPU clock generation circuit 236 is stopped until the 5CPU access signal is removed, and the 5CPU 20 is placed in a waiting state. During this wait state, the element 128 of 5 CPU 20
.. 264.240.242 is switched to "MCPU11" by the 5CPU access signal, and 6 steps 1M regarding time slots T2 and T3 in the 5CPU data write operation of MCPUIO are executed and the data from MCPUIO is stored in mRAM 20B in 5cPU. is written.

MCPUIOからの5CPUアクセス信号りが除去され
ると、5CPUクロック発生回路236は動作を再開し
、クロックST3を“H′″に変化させる、更に、5C
PUアクセス信号りの除去により、5CPU20の要素
128.204.240.242が“5CPUII−に
戻され、5CPU20自身の動作が可能な状態になる。
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 PU access signal, the element 128.204.240.242 of the 5 CPU 20 is returned to "5 CPU II-", and the 5 CPU 20 itself becomes operable.

そこで5CPU20はこのタイムスロットST3におい
て、ALU部208または乗算器210の演算出力をR
AM206に書き込んでオペレージ璽ン2の残りの部分
を実行する。
Therefore, in this time slot ST3, the 5CPU 20 converts the calculation output of the ALU section 208 or the multiplier 210 into R.
Write to AM 206 and execute the remaining part of Operation Code 2.

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

なお、MCPU 10が5CPU20の内部RAM20
6からデータを読み出すリードアクセスオペレージ、ン
の場合、そのタイムスロットT2でMCPU 10は5
CPU内部RAM206を7ドレツシングし、タイムス
ロットT3でMCPU内llRAM106を7ドレツシ
ングして5CPU内部RAM206からのデータをバス
ゲート132を介してMCPU内部RAM106に取り
込む。
In addition, the MCPU 10 uses the internal RAM 20 of the 5 CPU 20.
In the case of a read access operation that reads data from 6, MCPU 10 reads data from 5 in that time slot T2.
The CPU internal RAM 206 is dressed 7 times, and the MCPU internal RAM 106 is dressed 7 times at time slot T3, and the data from the 5 CPU internal RAM 206 is taken into the MCPU internal RAM 106 via the bus gate 132.

以上のように、瞬時強制アクセス方式によればMCPU
IOは5CPU20の内部RAM206に対するアクセ
スをMCPU自身のRAM106に対するアクセスと同
様に最短時間内で実行でき、待ち時間命令を実行する必
要がない、更に。
As described above, according to the instantaneous forced access method, the MCPU
IO can access the internal RAM 206 of the 5 CPU 20 in the same way as access to the MCPU's own RAM 106 within the shortest possible time, and there is no need to execute latency instructions.

瞬時強制アクセス方式によれば、5CPU20のオペレ
ーションを途中で中断し、MCPUIOの5CPUアク
セスオペレーシヨン後に、中断されたところからオペレ
ーションを再開できる。したがって、MCPUIOは5
CPU20に対するアクセスに先立って5CPU20の
状態を検査する必要はなく、任意のときに、例えば、イ
ンタラプト処理ルーチン(第5図)中でも自由に5CP
U20をアクセスすることができる。
According to the instantaneous forced access method, the operation of the 5 CPUs 20 can be interrupted midway, and the operation can be resumed from the point where it was interrupted after the 5 CPU access operation of the MCPUIO. Therefore, MCPUIO is 5
There is no need to check the state of the 5CPU 20 prior to accessing the CPU 20, and the 5CP can be freely accessed at any time, for example, during the interrupt processing routine (FIG. 5).
U20 can be accessed.

く共用メモリアクセス競合解消機能(第26、第27図
、第1図)〉 第1図において外部メモリ90は複数のCPU、即ちM
CPUIOと5CPU20に共用されるデータメモリで
ある。したがって外部データメモリ90に対する複数の
アクセス、即ち、MCPUIOからの外部データメモリ
90アクセスと。
Shared memory access conflict resolution function (Figs. 26, 27, and 1)> In Fig. 1, the external memory 90 is connected to multiple CPUs,
This is a data memory shared by CPUIO and 5 CPUs 20. Therefore, multiple accesses to external data memory 90, ie, external data memory 90 accesses from MCPUIO.

5CPU20からの外部データメモリ90アクセスをサ
ポートする手段が必要である。更に、外部データメモリ
90を共用化する場合においてMCPUIOと5CPU
20とが外部データメモリ90を同時にアクセスを試み
ることを許容するのが望まれる。MCPUloと5CP
U20との間で外部データメモリ90に対する使用権(
トークン)を交換する機能を設けることにより、MCP
UIOと5CPU20が同時には外部データメモリ90
をアクセスしないようにすることもできるが、トークン
の手続は外部データメモリアクセスのための準備時間を
占めるので、外部データメモリアクセスに要するトータ
ルの時間が長くなり、効率的でない、一方、MCPUl
oと5CPU20による外部データメモリ90の同時ア
クセスを許容する場合、メモリ90自体は物理的に同時
アクセス不能であるので、同時アクセスによるアクセス
競合を解消する手段が必要となる。
A means for supporting external data memory 90 access from 5 CPUs 20 is required. Furthermore, when sharing the external data memory 90, MCPUIO and 5CPU
20 and attempt to access external data memory 90 at the same time. MCPUlo and 5CP
U20 and the right to use the external data memory 90 (
By providing a function to exchange tokens), MCP
UIO and 5 CPU 20 simultaneously use external data memory 90
Although it is possible to avoid accessing the MCPUl, the token procedure occupies the preparation time for external data memory access, which increases the total time required for external data memory access, which is not efficient.
When allowing simultaneous access to the external data memory 90 by the CPUs 20 and 5, since the memory 90 itself cannot be physically accessed at the same time, a means is required to resolve access conflicts caused by simultaneous access.

これらの手段を実現するため、第1図に示すようにMC
PUIOからの外部メモリアドレス情報はアドレスバス
MA、MCPU外部メモリアドレスラー、チ30M、ア
ドレス切り換え回路40、アドレス変換回路60を介し
て外部メモリ90のアドレス入力に結合ぎれており、外
部メモリ90からのデータ出力はデータ変換回路70、
MCPU外部メモリデータラ−、チ80M、データバス
MDを介してMCPUIOに結合されている。一方、5
CPU20からの外部メモリアドレス情報はアドレスバ
スSA、5CPU外部メモリアドレスチッチ305、ア
ドレス切り換え回路40、アドレス変II!回路60を
介して外部メモリ90のアドレス入力に結合されており
、外部メモリ90からのデータ出力はデータ変換回路7
0.SCPU外部メモリデータラッチ80S、データバ
スSDを介して5CPU20に結合されている。そして
、MCPUIOと5CPU20からの外部データメモリ
アクセス要求を表わす信号MCPU−romaとSCP
U−romaを受けるメモリ装置競合回避回路50によ
り、上記MCPU外部メモリアドレスラッチ30Mは、
SCPU外部メモリアドレスチッチ30S、アドレス切
り換え回路40、MCPU外部メモリデータラッチ80
M、SCPU外部メモリデータラッチ80Sが制御され
るようになっている。このメモリ装置競合回避回路5゜
に上述したアクセスの競合を回避する機能が含まれてい
る。
In order to realize these means, as shown in Figure 1, MC
The external memory address information from the PUIO is coupled to the address input of the external memory 90 via the address bus MA, the MCPU external memory addresser, the chip 30M, the address switching circuit 40, and the address conversion circuit 60. Data output is a data conversion circuit 70,
MCPU external memory data register 80M is coupled to MCPUIO via data bus MD. On the other hand, 5
External memory address information from the CPU 20 is transmitted through the address bus SA, the 5CPU external memory address switch 305, the address switching circuit 40, and the address change II! The data output from the external memory 90 is coupled to the address input of the external memory 90 via the circuit 60, and the data output from the external memory 90 is connected to the data conversion circuit 7.
0. The SCPU external memory data latch 80S is coupled to the 5CPU 20 via the data bus SD. Then, signals MCPU-roma and SCP representing an external data memory access request from MCPUIO and 5CPU20 are transmitted.
The memory device conflict avoidance circuit 50 receiving U-roma causes the MCPU external memory address latch 30M to:
SCPU external memory address switch 30S, address switching circuit 40, MCPU external memory data latch 80
M, SCPU 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図にメモリ装置競合回避回路50のブロック図を
示し、第27図にアクセスの競合に対する動作のタイム
チャートを示す。
FIG. 26 shows a block diagram of the memory device conflict avoidance circuit 50, and FIG. 27 shows a time chart of operations regarding access conflicts.

第26図において、メモリ装置競合回避回路50には入
力としてMCPUIOからのアクセス要求信号MCPU
−roma、5CPU20からのアクセス要求信号SC
PU−roma、更に1MCPUリセット信号MRES
及び5CPUリセット信号5RES C第1図において
図示省略)が結合する0MCPUリセ、ト信号MRES
はセットリセット回路(R−Sフリップフロップ)50
2とその出力に結合するセットリセット回路506をリ
セットし、信号MCPU−romaは、セットリセット
回路502をセットする。セットリセット回路502は
MCPUloからのアクセス要求を一時記憶し、出力側
セットリセット回路506はセット状態において、MC
PUloからのアクセス要求が受は付けられて外部メモ
リデータアクセス制御信号発生回路510を介してアク
セスのオペレーションが実行中であることを示す、同様
に5CPUリセット信号5RESはセットリセット回路
504とその出力に結合するセットリセット回路508
をリセットし、信号5CPU−r omaはセットリセ
ット回路504をセットする。セットリセット回路50
4は5CPU20からのアクセス要求を一時記憶し、出
力側セットリセット回路508はセット状態において5
CPU20からのアクセス要求が受は付けられアクセス
のオペレージ、ンが実行中であることを示す。
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, plus 1 MCPU reset signal MRES
and 5CPU reset signal 5RESC (not shown in FIG. 1) are combined with 0MCPU 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 the access request from MCPUlo, and the output side set reset circuit 506 stores the access request from MCPUlo in the set state.
Similarly, the 5CPU reset signal 5RES is sent to the set reset circuit 504 and its output, indicating that the access request from PUlo has been accepted and the access operation is being executed via the external memory data access control signal generation circuit 510. Coupling set-reset circuit 508
The signal 5CPU-roma sets the set-reset circuit 504. Set reset circuit 50
4 temporarily stores the access request from the 5 CPU 20, and the output side set reset circuit 508 stores the access request from the 5 CPU 20 in the set state.
This indicates that the access request from the CPU 20 has been accepted and the access operation is being executed.

詳細に述べると、MCPUアクセス要求セットリセット
回路502のセット状態の出力“H″は5CPUアクセ
ス実行セットリセット回路508がセット状態でないこ
とを条件として、即ち、5CPU20のアクセスオペレ
ージ璽ンが実行中でないことを条件として(値入力が5
08からのインパータ522を介した反転入力に結合す
るANaゲ−)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をセットする信号により、OEゲ−
)516 (値入力がリセット信号5RESに結合する
)を介して5CPUアクセス要求セットリセット回路5
04をリセットする0以上の構成により、片方のCPU
(例えば5CPU20)からアクセス要求があっても、
他方のCPU(MCPUlo)に関するアクセスオペレ
ーションが実行中のときは、その実行が完了するまでは
アクセスを要求したCPU (SCPU20)に関する
アクセスオペレーションは実行されない、これにより、
アクセスの競合が基本的に回避される。
In detail, the output “H” of the set state of the MCPU access request set reset circuit 502 is provided on the condition that the 5 CPU access execution set reset circuit 508 is not in the set state, that is, the access operation command of the 5 CPU 20 is not being executed. (value input is 5)
A signal that sets the MCPU access execution cycle 506 to the MCPU access execution state (via the ANa gate) 524 which is coupled to the inverting input via the inverter 522 from 08; By 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 5 CPU 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; OE game
) 516 (value input is coupled to reset signal 5RES) 5 CPU access request set reset circuit 5
By configuring 0 or more to reset 04, one CPU
Even if there is an access request from (for example, 5 CPU 20),
When an access operation regarding the other CPU (MCPUlo) is being executed, the access operation regarding the CPU (SCPU20) that requested access will not be executed until the execution is completed.
Access conflicts are basically avoided.

更に、MCPUIOと5CPU20とが完全に同時にア
クセスを要求する場合がある。このアクセス競合に対し
、実施例では、MCPUIOからのアクセス要求を優先
させ、MCPUloのアクセスオペレーションを実行し
てから、5CPU20のアクセスオペレージ璽ンを実行
している。このために1MCPU7クセス要求セツトリ
セツト回路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 MCPUlo is executed, the access operation command of 5 CPUs 20 is executed. For this reason, when the 1MCPU7 access request set reset circuit 502 is in the set state, its output signal "
H'' to IN - AND gate 52 via E 525
6 is prohibited, and the set reset circuit 502 is setting the CPU access request set reset circuit 5.
Even if 04 is set, the 5cPU access execution set reset circuit 508 is prevented from being set.

外部メモリデータアクセス制御信号発生回路51Oは、
セットリセット回路506と508からの出力に結合し
、いずれかのセットリセット回路の出力がセット状態“
H”に変化すると、そのセット状態が示すCPUアクセ
スのオペレーションを一連のシーケンスで実行する。外
部メ・モリデータアクセス制御信号発生回路510から
出力される信号CEとOEは外部メモリ7からデータを
出力するための制御信号であり、信号MDLはMCPU
外部メモリデータラッチ80Mに外部メモリ90からの
データをラッチするための制御信号であり、信号SDL
は5CPU外部メモリデータラッチ80Sに外部メモリ
90からのデータをラッチするための制御信号である。
The external memory data access control signal generation circuit 51O is
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.Signals CE and OE output from the external memory/memory data access control signal generation circuit 510 output data from the external memory 7. The signal MDL is a control signal for MCPU
This is a control signal for latching data from the external memory 90 into the external memory data latch 80M, and the signal SDL
is a control signal for latching data from the external memory 90 into the 5CPU external memory data latch 80S.

外部メモリデータアクセス制御信号発生回路510はア
クセスオペレーションの実行を終了するとEH11号を
発生する。このEH11号により、セット状態にあった
アクセス実行セットリセット回路はリセットされる。即
ち、EH11号は値入力がセットリセット回路506の
出力に結合するANDゲート528と値入力がMCPU
リセット信号MRESに結合するORゲート514を介
してセットリセット回路506のリセット入力に結合し
、また値入力がセットリセット回路508の出力に結合
するANDゲート530と値入力が5CPUリセット信
号5RESに結合するORゲー)518を介してセット
リセット回路508のリセット入力に結合する。
When the external memory data access control signal generation circuit 510 finishes executing the access operation, it generates EH11. This EH11 resets the access execution set reset circuit that was in the set state. That is, EH11 has an AND gate 528 whose value input is coupled to the output of the set/reset circuit 506 and a value input which is coupled to the MCPU.
A value input is coupled to the reset input of the set-reset circuit 506 via an OR gate 514 that is coupled to the reset signal MRES, and an AND gate 530 whose value input is coupled to the output of the set-reset circuit 508 and a value input is coupled to the 5CPU reset signal 5RES. It is coupled to the reset input of the set/reset circuit 508 via an OR gate 518 .

5CPUアクセス実行セットリセット回路508の出力
はインバータ532を介してアドレス切り換え回路40
に対するアドレス選択信号MSELを発生する。したが
って、アドレス切り換え回路40は、5CPU20のア
クセスオペレージ。
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, the address switching circuit 40 performs access operations for the five CPUs 20.

ンが実行中のときに、5CPU外部メモリアクセス用ア
ドレスチッチ305からの5CPUアドレスを選択し、
その他の場合はMCPU外部メモリアクセス用アドレス
ラッチ30MからのMCPUアドレスを選択する。
When the program is running, select the 5CPU address from the 5CPU external memory access address check 305,
In other cases, the MCPU address from the MCPU external memory access address latch 30M is selected.

@27W(7)11合、MCPUI Oと5CPU20
は″MCPUオペレーションのr oma   ″5C
PUオペレージ璽ンのr oma″′に示すように同時
に外部メモリ90に対するアクセスを要求している。こ
のroma命令のオペレーションにおいて、MCPUI
OはアドレスバスMAにアドレス情報を送出し、信号M
CPU−romaを出力してMCPU外部メモリアクセ
ス用アドレスラッチ30Mにアドレス情報をラッチさせ
、同様に5CPU20はアドレスバスSAにアドレス情
報を送出し、信号SCPU−romaを出力しテ5CP
U外部メモリアクセス用アドレスチッチ303にアドレ
ス情報をラッチさせる。同時に発生するMCPU−ro
ma信号とSCPU−roma@号により、メモリ装置
競合回避回路50のMCPUアクセス要求セットリセッ
ト回路502と5CPUアクセス要求セットリセット回
路504は同時にセットされる。これに対し、上述した
MCPUアクセス優先論理に従い、MCPUアクセス実
行セットリセット回路506がただちにセット状態に変
化し、それにより外部メモリデータアクセス制御信号発
生回路510が外部メモリ9oに対するMCPUIOの
アクセスオペレーションを実行する。この時点でアドレ
ス切り換え回路4oはMCPUIOからのアドレス情報
を選択している。MCPUloのアクセスオペレージ1
ンの期間を第27v!Jの左方の期間文で示す(なお、
回路510は2相のマスタークロックCK1.CK2で
動作するが、第26rI!Jでは図示を省略しである)
、外部メモリデータアクセス制御信号発生回路510は
期間nでチップイネーブル信号CEをローアクティブに
し、期間nの後半の期間mで出力イネーブル信号OEを
ローアクティブする。したがって、この期間mにおいて
外部メモリ90からMCPUIOが要求したデータが出
力され、この期間m内に外部メモリデータアクセス要求
信号発生回路510から発生する信号MDLによりこの
出力データがMCPU外部メモリデータラッチ80Mに
ラッチされる。これにより、外部メモリデータアクセス
要求信号発生回路510のMCPUIOのためのアクセ
スオペレージ、ンは完了するので、回路51Oはエンド
信号ENDを出力する。これにより1MCPU7クセス
実行セットリセット回路506はリセットされ1代りに
5cPUアクセス実行セットリセット回路508がセッ
トされる。これにより信号MSELは5CPUアドレス
選択を示すL”レベルに変化し、アドレス切り換え回路
40は5CPU20からのアドレスを選択して外部メモ
リ90を7ドレツシングする。更に、5CPUアクセス
実行セ、トリセット回路508からのセット信号に応答
して外部メモリデータアクセス8111M号発生回路5
10が5CPU20のためのアクセスオペレーションを
実行する。この期間を第27gの右側の期間見で示す、
このオペレーションにおいて外部メモリデータアクセス
制御信号発生回路510は信号CEをローアクティブに
し、その後半の期間pで信号OEをローアクティブにし
て5CPU20の要求したデータを外部メモリ90から
出力させ、その出力中に信号SDLを発生してSCPU
外部メモリデータラッチ803に5CPU20の要求し
たデータをラッチさせる。これにより、外部メモリデー
タアクセス制御信号発生回路510の5CPU20のた
めのアクセスオペレーションは完了するので同回路51
0はエンド信号ENDを出力して5CPU7クセス実行
セットリセット回路508をリセット状態に戻す。
@27W (7) 11 go, MCPUI O and 5CPU20
is "MCPU operation roma"5C
As shown in roma'' in the PU operation instruction, access to the external memory 90 is requested at the same time.In the operation of this roma instruction, the MCPUI
O sends address information to the address bus MA, and the signal M
CPU-roma is output to cause the address latch 30M for MCPU external memory access to latch the address information, and similarly, the 5CPU 20 sends address information to the address bus SA, outputs the signal SCPU-roma, and latches the address information to the MCPU external memory access address latch 30M.
The address information is latched by the address switch 303 for U external memory access. MCPU-ro occurring at the same time
The MCPU access request set reset circuit 502 and the 5CPU access request set reset circuit 504 of the memory device conflict avoidance circuit 50 are simultaneously set by the ma signal and the SCPU-roma@ signal. In response, according to the MCPU access priority logic described above, the MCPU access execution set reset circuit 506 immediately changes to the set state, and thereby the external memory data access control signal generation circuit 510 executes the MCPUIO access operation to the external memory 9o. . At this point, the address switching circuit 4o has selected the address information from MCPUIO. MCPUlo access operation 1
The period of 27th v! Indicated by the period sentence to the left of J (in addition,
The circuit 510 uses a two-phase master clock CK1. It works on CK2, but the 26th rI! (Illustrations are omitted in J)
, the external memory data access control signal generation circuit 510 makes the chip enable signal CE active low during period n, and makes the output enable signal OE active low during period m, which is the latter half of period n. Therefore, during this period m, the data requested by the MCPUIO is output from the external memory 90, and this output data is transferred to 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. Latched. As a result, the access operation for MCPUIO of the external memory data access request signal generation circuit 510 is completed, and the circuit 51O outputs the end signal END. As a result, the 1MCPU7 access execution set reset circuit 506 is reset and the 5cPU access execution set reset circuit 508 is set instead. As a result, the signal MSEL changes to L'' level indicating selection of the 5 CPU address, and the address switching circuit 40 selects the address from the 5 CPU 20 and dresses the external memory 90. External memory data access 8111M number generation circuit 5 in response to the set signal of
10 performs access operations for 5 CPUs 20. This period is shown in the period view on the right side of 27th g.
In this operation, the external memory data access control signal generation circuit 510 makes the signal CE low active, and in the latter half period p, makes the signal OE low active to output the data requested by the 5 CPU 20 from the external memory 90, and during the output. Generates signal SDL and sends it to SCPU
The external memory data latch 803 is made to latch the data requested by the 5 CPU 20. As a result, the access operation for the 5 CPUs 20 of the external memory data access control signal generation circuit 510 is completed.
0 outputs the end signal END and returns the 5CPU7 access execution set reset circuit 508 to the reset state.

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

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

メモリ装置競合回避回路50が両CPUのためのアクセ
スオペレーションを実行する所定の期間2皇だけ待てば
要求したデータを得ることができ、アクセス競合の問題
が解消される。更に、待機時間が一定(2!l) す1
7)テ、各CPUIO5z0はこの期間を他の命令の実
行に使用することができ、プログラム命令の実行効率が
最適化される。
If the memory device contention avoidance circuit 50 waits for a predetermined period of time for executing access operations for both CPUs, the requested data can be obtained, and the problem of access contention is resolved. Furthermore, the waiting time is constant (2!l) S1
7) Te, each CPUIO 5z0 can use this period to execute other instructions, and the execution efficiency of program instructions is optimized.

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

くアドレス・データ変換ハードウェア(第28〜第32
FI!J、第trl!J)> 一般に、CPUを含むマイクロコンピュータシステムに
おいて、データメモリにある原データから演算用メモリ
上に原データを変換したデータ(Wデータから抽出され
る所望の情報)を作成することがしばしば望まれる。特
にこの種のデータは変換はデータメモリの記憶容量を効
率的に使用したような場合にその補償として必要になる
。この目的のため、従来では、データメモリから演算用
メモリへの転送命令を実行して、データメモリの原デー
タを演算用メモリに移し、次に1以上の変換命令を実行
して、演算用メモリにあるデータをALUを介して変換
する。したがって、従来の場合、演算用メモリ上に所望
のデータを得るためのデータ変換手続に時間がかかり、
高速処理が要求されるアプリケーションにおける障害の
1つとなっている。
address/data conversion hardware (28th to 32nd
FI! J, trl! J)> Generally, in a microcomputer system including a CPU, it is often desired to create data (desired information extracted from W data) by converting the original data onto the calculation memory from the original data in the data memory. . 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.

本実施例ではCPUl0,20がデータメモリである外
部メモリ90から演算用メモリである内部RAM106
または206にデータを転送する命令(r oma命令
)を実行するだけで、所望の変換が施されたデータが内
部RAM106.206に読み込まれるようにして、デ
ータ変換処理の高速化を図っている。この目的を実現す
るため、CPUl0.20と外部メモリ90との間のア
ドレス径路上にアドレス変換回路60が設けられ、また
外部メモリ90とCPUl0120との間のデータ径路
上にデータ変換回路70が設けられ、各変換回路60.
70はr o m a命令の実行時にCPUl0120
から与えられる制御信号に応答して所望の変換を実行す
る。
In this embodiment, the CPUs 10 and 20 are connected from an external memory 90 which is a data memory to an 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 CPU10.20 and the external memory 90, and a data conversion circuit 70 is provided on the data path between the external memory 90 and CPU10120. and each conversion circuit 60.
70 is CPU10120 when executing r o m a instruction.
performs the desired conversion in response to control signals provided by the converter.

第28図に外部メモリアクセス命令r omaのリスト
を示す、第1の命令romaoは変換なしの転送命令で
あり、これに対し、アドレス変換回路60はCPUl0
.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
.. The input address given from the external data memory 90 is directly passed to the external data memory 90 as an output address, and the data conversion circuit 70 also passes the data from the external data memory 90 (16bee/2 data) without conversion and passes it to the CPU 10120.

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

第2の命令romalは特殊波形の読み出しに適した命
令である。この命令に対し、アドレス変換回路60はC
PUl0120から送られてきた入力アドレスの第13
ビツトA12が“0″のときは下位12ビツトを無変換
で通すが第13ピツ)A12が1″のときは下位12ビ
ツトを反転させる。なお、アドレス変換回路60の出力
アドレスの第13ビツトは入力アドレスの第13ビツト
AI2の値にかかわらず“θ″に固定される。
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 "0", the lower 12 bits are passed through without conversion, but when the 13th bit A12 is 1", the lower 12 bits are inverted. Note that the 13th bit of the output address of the address conversion circuit 60 is It is fixed at "θ" regardless of the value of the 13th bit AI2 of the input address.

また、この命令に対し、データ変換回路70はCPUl
0120から送られてきた入力アドレスの第13ビツト
A12をCPUl0120に送るデータの第13ビツト
D12とするとともにA12が“1″のとき下位の12
ビツトデータを反転する形式で外部メモリ90からのデ
ータを変換する。したがって、外部メモリ90のアドレ
ス領域oooo〜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 D12 of the data sent to CPU 10120, and when A12 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 oooo to 0FFF of the external memory 90.

〜0FFF)があるとすると、CPUl0120がこの
命令を指定アドレス0000−IFFFの範囲について
繰り返し実行した場合に、アドレス変換回路60から出
力される外部メモリアドレスはいったん0000から0
FFFに進み、この間、データ変換回路70は外部メモ
リ90からのデータをそのまま通し、その後、アドレス
変換回路60の反転動作により、外部メモリ90へのア
ドレスは0FFFからooooに後進し、この間、デー
タ変換回路7oは外部メモリ9oから出力されるデータ
の下位12ビツトを反転し、第13データピツ)D12
を“l”にして変換されたデータを出力する。結局、C
PUl0120がアドレスをoooo〜I FFFに動
かして命令r。
~0FFF), when the CPU10120 repeatedly executes this instruction for the specified address range 0000-IFFF, the external memory address output from the address conversion circuit 60 will once change from 0000 to 0.
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 advances from 0FFF to oooo, and during this time, the data conversion circuit 70 passes the data from the external memory 90 as is. The circuit 7o inverts the lower 12 bits of the data output from the external memory 9o, and outputs the 13th data bit) D12.
is set to "l" and the converted data is output. In the end, C
PUl0120 moves the address from oooo to IFFF and executes the instruction r.

m a 1を繰り返し実行した場合に、CPUl012
0が実際に受は取る波形は第28図のromalの欄の
右方に示すような波形となる。この変換波形は左方に示
す外部メモリ90内の原波形を所定の態様で延長した繰
り返し波形(アドレス0FFF、データ0FFFの点に
ついて対称な波形)である、この結果、記憶容量の点に
ついていうと、変換波形のデータ自体を予め外部データ
メモリ90に記憶させる方式に比べ、波形データ記憶容
量が半分になる利点がある。この命令r omalの場
合、制御信号R1,R2、R3のうちR1のみが“H″
レベルなる。
When m a 1 is repeatedly executed, CPUl012
The waveform that 0 actually takes is the waveform shown on the right side of the ROMAL 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. In the case of this command romal, only R1 of the control signals R1, R2, and R3 is “H”
level.

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

外部データメモリ90の1アドレス(1語)当りの記憶
容量は16ビツトである。この命令roma2に対し、
データ変換回路70は、CPUl0120からのアドレ
スの第16ビツトA15が“O”のときは、外部データ
メモリ90からの16とットデータのうち、下位の8ビ
ツトを残し、上位の8ビツトを“0”にマスクする変換
を実行し、A15が“l”のときは外部データメモリ9
0から16ビツトデータのうち、上位の8ビツトを下位
8ビツトにシフトする(残った上位8ビツトはマスク)
変換を実行する。また、データ変換回路70において入
力アドレスの第16ビツトA15を制御信号として使用
しているので1アドレス変換回路60ではA15の値に
かかわらず出力アドレスの第16ビー7トを所定値′0
″にマスクする。なお、この場合において外部データメ
モリ90からの16ビツト情報の上位8ビツトと下位ビ
ットとの関係は、1つのデータ(例えば位相データ)に
おける上位データ部分(例えば整数部)と下位データ部
分(例えば小数部)のような関係であってもよいし、異
なるzli類の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 "O", the data conversion circuit 70 leaves the lower 8 bits of the 16 bits from the external data memory 90 and sets the upper 8 bits to "0". When A15 is “l”, the external data memory 9 is
Shift the upper 8 bits of 0 to 16 bit data to the lower 8 bits (remaining upper 8 bits are masked)
Perform the conversion. Furthermore, since the data conversion circuit 70 uses the 16th bit A15 of the input address as a control signal, the 1-address conversion circuit 60 sets the 16th beat 7 of the output address to a predetermined value '0' regardless of the value of A15.
In this case, the relationship between the upper 8 bits and the lower bits of the 16-bit information from the external data memory 90 is that the upper data part (for example, the integer part) and the lower It may be a relationship such as a data part (for example, a decimal part), or an independent relationship such as a relationship between 8-bit data of different zli classes (for example, rate data and level data).

第4の命令ROMA3は外部メモリデータをシフトして
一部を読み出す命令である。この命令の場合、R3のみ
が“H″レベルなる。この命令に対し、データ変換回路
70は外部メモリ90からの16ビツトデータのうち、
bft15はそのままにして上位12ビツトのbit1
5〜bit4をbit14〜bit3にシフトし、下位
の3ビツトbit2〜bitOを0にマスクする変換を
行う、ここに、外部メモリ90の16ビツトデータのう
ち上位12ビツトは例えばbit15を符号ビットとす
る波形データであり、下位4ビツトは別のデータを表わ
す、この場合、上記の変換により、CPUl0.20は
内部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 bft15 as is and use bit1 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. waveform data, and the lower 4 bits represent other data. In this case, the above conversion allows CPU 10.20 to quickly read waveform data in a format suitable for use on internal RAM 106.206. .

第29図にアドレス変換回路60のブロック図を示す、
このアドレス変換回路60にはMCPUloまたは5C
PU20からアドレスチー2千30M、3O3、アドレ
ス切り換え回路4oを介して入力される16ビツトのア
ドレスのうち、下位12ビーy) (bito”bit
ll)が詳細を第30図に示す反転回路610に入力さ
れる。この反転回路610は信号R1が命令romal
を表わす“1″でアドレスのA12が“l”のときAN
Dゲー)612からの信号により動作して入力されるア
ドレスの下位12ビツトを反転させる。また、命令ro
malの実行時に“l″となる信号R1はインバータ6
02を介して、ANDゲート604を禁止し、入力アド
レスのA12の値にかかわらず出力アドレスの対応ビー
2ト(bft12)を“0”にする、入力アドレスのA
l1とA14はそのまま出力アドレスの対応ビー、)(
bit13、bft14)として出力される。入力アド
レスのA15(MSB)はANDゲート608を介して
出力アドレスの対応ビット(bit15)となる、命令
roma2の実行中を表わす“l”の信号R2が発生し
ているとき、この信号R2がインバータ606を介して
ANDゲート608を禁止して出力アドレスのbit1
5(MSB)を“0″にマスクする。
FIG. 29 shows a block diagram of the address conversion circuit 60.
This address conversion circuit 60 includes MCPUlo or 5C.
Of the 16-bit address input from the PU 20 via the address bit 2,30M, 3O3, and the address switching circuit 4o, the lower 12 bits are
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 “l”, AN
It is operated by a signal from the D-game) 612 and inverts the lower 12 bits of the input address. Also, the instruction ro
The signal R1 that becomes “l” when mal is executed is the inverter 6.
02 of the input address, which inhibits the AND gate 604 and makes the corresponding beat 2 (bft12) of the output address "0" regardless of the value of A12 of the input address.
l1 and A14 are the corresponding output addresses, )(
bit13, bft14). A15 (MSB) of the input address is passed through the AND gate 608 and becomes the corresponding bit (bit15) of the output address.When a signal R2 of "L" indicating that the instruction roma2 is being executed is generated, this signal R2 is output to the inverter. 606 to disable AND gate 608 and bit 1 of the output address
Mask 5 (MSB) to “0”.

したがってアドレス変換回路60は、無変換命令rom
aOとシフト読み出し命令roma3に対シテはR1=
″0”、R2=“0″なので入力アドレスを出力アドレ
スとしてそのまま通し、特殊波形読出し命令romal
に対してはR1=″l″なので出力アドレスのbit1
2を“θ″にマスクし、A12=“l”の間尺転回路6
10により入力アドレスの下位12ビツト(bit。
Therefore, the address conversion circuit 60 converts the non-conversion instruction ROM
R1= for aO and shift read instruction roma3
"0", R2="0", so the input address is passed as an output address and the special waveform read command romal is executed.
For R1=“l”, bit 1 of the output address
2 to "θ", A12 = "l" scale rotation circuit 6
10 indicates the lower 12 bits of the input address.

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

更に、一部読み出し命令1 o m a 2に対しては
R2=“1”なので出力アドレスのbft15を“0″
にマスクする。このようにして、第28図ニ関し−c述
べたアドレス変換回路の機能が実現される。
Furthermore, for the partial read instruction 1 o m a 2, since R2="1", the output address bft15 is set to "0".
to mask. In this way, the function of the address conversion circuit described in FIG. 28-d is realized.

第31図にデータ変換回路70のブロック図を示し、第
32図にその詳細を示す、これらの図においてデータ入
力は第1図の外部メモリ90から供給されるデータであ
る。第32図において、入力データの上位8ビツトに結
合する3状態ゲ一ト回路702と入力データの下位8ビ
ツトに結合する3状態ゲ一ト回路704は出力するデー
タの下位8ビツトとして入力データの上位8ビツトを選
択するが、入力データの下位8ビツトを選択するかを決
めるためのものである。R2=“l”(r o m a
 2命令)−t’A15=1のとき、ANDゲート70
6の“l”出力信号とその反転信号であるインバータ7
08の出力信号“0”により、ゲート回路702が導通
し、ゲート回路704がオフして入力データの上位8ビ
ツトが出力データの下位8ビツトとして選択される。そ
の他の場合は、ゲート回路702がオフし、ゲート回路
704が導通するので入力データの下位8ビツトがその
まま出力データの下位8ビツトとして出力される。更に
R2= ”1″ (r o m a 2命令)のときは
、入力データの上位8ビツトに結合するANDゲート回
路710が禁止されて出力データの上位8ビー、トラ“
0”にマスクする。即ち、R2=“1″のときはインバ
ータ712とNORゲート714奢介して禁止信号がA
NDゲート回路71Oに加わってANDゲート回路71
0における入力データ上位8ビツトの通過が阻止される
。また、ANDゲート回路710における入力データの
上位3ビツトと結合するANDゲート素子はR1=“l
” (romal命令)のときにNORゲート714を
介して禁止され、出力データの上位3ビツトを“O”に
マスクする。
FIG. 31 shows a block diagram of the data conversion circuit 70, and FIG. 32 shows its details. In these figures, data input is data supplied from the external memory 90 of FIG. In FIG. 32, a 3-state gate circuit 702 coupled to the upper 8 bits of input data and a 3-state gate circuit 704 coupled to the lower 8 bits of the input data output the lower 8 bits of the input data. The upper 8 bits are selected, but this is for determining whether to select the lower 8 bits of input data. R2=“l”(r o m a
2 instructions) - When t'A15=1, AND gate 70
6's "l" output signal and its inverted signal, inverter 7.
In response to the output signal "0" of 08, the gate circuit 702 becomes conductive, the gate circuit 704 turns off, and the upper 8 bits of the input data are selected as the lower 8 bits of the output data. In other cases, the gate circuit 702 is turned off and the gate circuit 704 is turned on, so that the lower 8 bits of the input data are directly output as the lower 8 bits of the output data. Furthermore, when R2 = "1" (r o m a 2 instruction), the AND gate circuit 710 that connects to the upper 8 bits of the input data is inhibited, and the upper 8 bits of the output data are
In other words, when R2="1", the inhibit signal is masked to A through the inverter 712 and the NOR gate 714.
AND gate circuit 71 in addition to ND gate circuit 71O
Passage of the upper 8 bits of input data at 0 is blocked. Furthermore, the AND gate element connected to the upper 3 bits of the input data in the AND gate circuit 710 has R1="l".
” (romal instruction), it is inhibited via the NOR gate 714, and the upper three bits of the output data are masked to “O”.

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

したがって、データ変換回路70は、無変換命令rom
ao (R1=R2=R3=″0″)のときは、入力さ
れる16ビツトデータをそのまま通し、特殊波形読み出
し命令romal (R1=″1”)のときは入力アド
レスの上位4ビツト(bit15〜bit12)が“0
000″(A12=Oのとき)か“0001” (A1
2=lのとき)かによって、出力データの下位12ビツ
トをそのまま入力データの下位12ビツトとする(A1
2=OのとS)か、或は、出力データの下位12ビツト
を入力データの下位12ビツトが反転されたデータとな
る(A12=1)ようにデータ変換を行い、一部読み出
し命令roma2(R2−“1”)のときは出力データ
の上位8ビツトがオールゼロで、出力データの下位8ビ
ツトが入力データの下位8ビツトとなるように(A15
=Oのとき)、或は、出力データの上位8ビツトがオー
ルゼロで、出力データの下位8ビツトが入力データの上
位8ビツトとなる(A15=1のとき)ようにデータ変
換を行い、シフト読み出し命令roma3(R3=1)
のときは出力データの下位3ビツト(bjto”bit
2)がオールゼロで、出力データのbit3〜bft1
4が入力データのbit4〜bit15で、出力データ
のb i t 15 (MSB)が入力データのbit
15(MSB)となるようにデータ変換を行う、このよ
うにして第28図で述べたデータ変換機能が達成されて
いる。
Therefore, the data conversion circuit 70 converts the non-conversion instruction ROM
ao (R1=R2=R3=“0”), the input 16-bit data is passed through as is, and when the special waveform read command romal (R1=“1”), the upper 4 bits of the input address (bits 15 to 15) are passed through. bit12) is “0”
000" (when A12=O) or "0001" (A1
2=l), the lower 12 bits of the output data are used as the lower 12 bits of the input data (A1
2=O and S), or convert the lower 12 bits of the output data into data in which the lower 12 bits of the input data are inverted (A12=1), and issue a partial read command roma2( R2-“1”), the upper 8 bits of the output data are all zeros, and the lower 8 bits of the output data are the lower 8 bits of the input data (A15).
= O), or convert the data so that the upper 8 bits of the output data are all zeros and the lower 8 bits of the output data become the upper 8 bits of the input data (when A15 = 1), and shift read. Instruction roma3 (R3=1)
When , the lower 3 bits of the output data (bjto"bit
2) is all zero, and bit3 to bft1 of the output data
4 is bit 4 to bit 15 of input data, and bit 15 (MSB) of output data is bit 15 of input data.
In this way, the data conversion function described in FIG. 28 is achieved.

以上により、アドレス変換回路60とデータ変換回路7
0とを設けたことによる利点は明らかである。即ち、C
PUl0120にとって、データメモリである外部メモ
リ90に対するアクセス命令r o m aを実行する
だけで、回路60と70の変換機能により、所望の変換
が施されたデータをただちに得ることができ、従来のよ
うに、外部メモリ90のデータを演算用メモリである内
部RAM106.206にいったん取り込んだ後に、A
LU部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 PUl0120, just by executing the access command r o m a to the external memory 90, which is a data memory, the conversion functions of the circuits 60 and 70 can immediately obtain data that has undergone the desired conversion. After the data in the external memory 90 is loaded into the internal RAM 106.206, which is the calculation memory,
There is no need to perform conversion via an ALU such as the LU unit 108.208, which has the advantage of speeding up processing.

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

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

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

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

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

本発明は複数のCPUを有するデジタルマイクロコンピ
ュータにおける並列処理技術に係る。したがって、本デ
ジタルマイクロコンピュータが適用されるアプリケーシ
ョン(実施例では電子楽器)は特に制限されない。
The present invention relates to parallel processing technology in a digital microcomputer having multiple CPUs. Therefore, the application (electronic musical instrument in the embodiment) to which this digital microcomputer is applied is not particularly limited.

また、並列処理のために各CPUが分担する処理の内容
、分担の態様についても制限されない。
Furthermore, there are no restrictions on the content of processing shared by each CPU for parallel processing and the mode of sharing.

また実施例では並列処理のために各CPUが分担する処
理はメインCPUのメインプログラムの実行結果に基づ
いており、メインプログラムから割り当てられた処理で
ある。この代りに各CPUが分担する処理はメインプロ
グラムの実行結果を使用しない処理、即ちメインプログ
ラムの処理から独立した処理であってもよい。
Further, in the embodiment, the processing shared by each CPU for parallel processing is based on the execution result of the main program of the main CPU, and is the processing assigned from the main program. Alternatively, the processing to be shared by each CPU may be processing that does not use the execution results of the main program, that is, processing that is independent from the processing of the main program.

また、実施例ではサブCPUは並列処理の分担処理を実
行していないときは停止状態となっているが、応用に合
わせて他の処理(他のメインプログラムによる処理)を
実行するようにしてもよぃ、この場合、サブCPUはイ
ンタラプト制御部116のような並列処理開始信号発生
手段からの信号に応答して、実行中の(上記他の)メイ
ンプログラムを中断して、並列処理の分担処理のための
インタラプト処理ルーチンを実行するモードに移行し、
分担処理の終了後、中断されたメインプログラムを再開
する。このような構成はメインCPUが実行するメイン
プログラムの処jlとtブCPUが実行するメインプロ
グラムの処理が独立しているような場合1例えば、メイ
ンCPU(7)メインプログラムの処理結果は各CPU
がインタラプト処理ルーチンで実行する並列処理に使用
するがサブCPUのメインプログラムの処理結果は他の
いずれのプログラムの処理にも影響を与えないような場
合に特に有効である。このような環境では、例えばサブ
CPUの内部メモリを2つに分割し、一方の内部データ
メモリをサブCPUのメインプログラムの処理に使用し
、他方の内部データメモリをメインCPUのメインプロ
グラムからの処理結果の書込に使用するとともにサブC
PUのインタラプト処理ルーチンの処理に使用し、他方
の内部データメモリに対するアクセス径路としてサブC
PU用とメインCPU用の2つのアクセス径路を設け、
サブCPUがメインプログラムを実行するモードでは他
方の内部データメモリに対するアクセス径路としてメイ
ンCPUからのアクセス径路が使用されるようにし、サ
ブCPUがインタラプト処理ルーチンを実行するモード
では他方の内部メモリのアクセス径路としてサブCPU
からのアクセス径路が使用されるようにすることにより
、サブCPUはメインCPUのメインプログラムによる
他方の内部メモリへのアクセスオペレーションによって
サブCPUのメインプログラムを中断することなく実行
でき、より高い効率の動作が保証される。
In addition, in the embodiment, the sub CPU is in a stopped state when it is not executing the shared processing of parallel processing, but it may be configured to execute other processing (processing by another main program) depending on the application. In this case, the sub CPU responds to a signal from a parallel processing start signal generating means such as the interrupt control unit 116, interrupts the main program (other than the above) that is being executed, and performs the shared processing of the parallel processing. Shifts to the mode that executes the interrupt handling routine for
After the shared processing is completed, the interrupted main program is restarted. This type of configuration is applicable when the main program processing executed by the main CPU and the main program processing executed by the CPU are independent.1 For example, the processing results of the main program executed by the main CPU (7) are sent to each CPU.
This is particularly effective when the sub CPU is used for parallel processing executed in an interrupt processing routine, but the processing results of the main program of the sub CPU do not affect the processing of any other programs. In such an environment, for example, the internal memory of the sub CPU is divided into two, one internal data memory is used for processing the main program of the sub CPU, and the other internal data memory is used for processing from the main program of the main CPU. Used to write results and sub-C
Sub C
Two access paths are provided, one for the PU and one for the main CPU.
In a mode in which the sub CPU executes the main program, the access path from the main CPU is used as the access path to the other internal data memory, and in a mode in which the sub CPU executes an interrupt processing routine, the access path to the other internal memory is used. as sub CPU
By using the access path from the sub-CPU, the sub-CPU can execute the main program of the sub-CPU without interrupting the other internal memory access operation by the main program of the main CPU, resulting in more efficient operation. is guaranteed.

また、実施例ではマイクロコンピュータは並列処理開始
信号をインタラプト発生部116から得ているが、例え
ば、マイクロコンピュータの外部の入力波W(例えば別
のマイクロコンピュータ)から並列処理開始信号を受け
るような応用にもこの発明を適用し得る。
In addition, in the embodiment, the microcomputer obtains the parallel processing start signal from the interrupt generation section 116, but for example, it may be applied to an application where the parallel processing start signal is received from an input wave W external to the microcomputer (for example, from another microcomputer). This invention can also be applied to.

し得る利点等を有する。It has possible advantages, etc.

[発明の効果] 最後に特許請求の範囲に記載する発明の効果、利点につ
いて述べる。
[Effects of the Invention] Finally, the effects and advantages of the invention described in the claims will be described.

請求項1によれば並列処理開始信号をきっかけとして複
数のCPUが各々に分担された処理をいっせいに開始す
るので可能なかぎり高い並列性を実現で3、デジタルマ
イクロコンピュータの性能が格段に改善される。請求項
1の構成は、周期的に大量のデータ処理(入出力処理を
含み得る)を必要とする用途や、環境の変化等のために
大量のデータ処理をイベント発生から限られた時間内で
実行しなければならない用途に特に適している。
According to claim 1, a plurality of CPUs simultaneously start their assigned processing in response to the parallel processing start signal, thereby achieving the highest possible level of parallelism and significantly improving the performance of the digital microcomputer. . The configuration of claim 1 is suitable for applications that require periodic large amount of data processing (which may include input/output processing), or for processing large amounts of data within a limited time from the occurrence of an event due to changes in the environment. Particularly suitable for applications that must be carried out.

また、請求項2の構成は周期的に大量のデータを処理す
る用途に特に適する外、システムの動作効率を低下させ
る原因になるCPU間のアクセスを最小にすることがで
きる利点、メインCPUのメインプログラムにより全C
PUを統一的に制御
In addition, the configuration of claim 2 is particularly suitable for applications that periodically process a large amount of data, and also has the advantage that it can minimize accesses between CPUs that cause a decrease in system operating efficiency. All C by program
Unified control of PU

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

第1図はこの発明を適用した電子楽器用処理装置の全体
構成図、 第2図は第1図のMCPUのブロー2り図、第3図は第
1FgJの5CPUのブロック図、第4図はMCPUの
実行するメインプログラムのフローチャート、 第5図はMCPUの実行するインタラプト処理ルーチン
のフローチャート、 第6図は5CPUの実行するプログラムのフローチャー
ト、 W117図は音源処理のフローチャート、第8図は時間
の経過に沿う実施例の動作のフローチャート、 第9図はチャンネル音源処理のフローチャート、 第1θ図は波形データを示す図、 $11図は音源処理用RAMテーブルを示す図− 第12図は5CPU動作開始終了機能に関係する回路の
ブロック図、 第13図、第14図、第15図は第12図の回路の動作
のタイムチャート、 第16図はインタラプトマスク機能を有する回路のブロ
ック図、 第17図はインタラプトマスク方式によるエンベロープ
設定処理のフローチャート、 第18図は単一命令で複数のデータを転送する間インタ
ラプト信号によるメインプログラムの中断を禁止する機
能を有する回路のブロック図、第19図は複数のデータ
を単一命令で転送するのに適したRAMのメモリマツプ
例を示す図、第20図は複数の転送命令による動作と単
一の転送命令による動作とを比較して示す図。 第21図は単一転送命令方式によるエンベロープ設定処
理のフローチャート、 第22図は5CPUの停止モード利用によるMCPUか
らの5CPU7クセス機能を説明するのに用いたフロー
チャート、 第23図は5CPUに対する瞬時強制アクセス機能を有
するMCPUのブロー、り図、第24図はSCPυに対
する瞬時強制アクセス機能に適合する5CPUのブロッ
ク図、1425図はMCPUから5CPUの内部RAM
にデータを書き込む場合の動作のタイムチャート、 第26図は第1図のメモリ装置競合回避回路のブロー2
り図、 第27図は第26図の回路の動作のタイムチャート、 第28図は外部メモリからのデータを変換して取り込む
命令を含む外部メモリアクセス命令のリストを示す図、 @291gIは第1図のアドレス変換回路のブロック図
、 第30図は第29図の反転回路の回路図、第31図は第
15!Jのデータ変換回路のブロック図、 1432図はデータ変換回路の回路図、第33図はM4
1図のDACのサンプリング周期が不安定になる構成と
サンプリング周期を安定化した構成とを比較して示す図
。 第34図はDACのサンプリング周期が不安定な場合の
タイムチャートと安定な場合のタイムチャートとを比較
して示す図である。
Fig. 1 is an overall configuration diagram of a processing device for an electronic musical instrument to which the present invention is applied, Fig. 2 is a block diagram of the MCPU shown in Fig. 1, Fig. 3 is a block diagram of the 5 CPUs of the 1FgJ, and Fig. 4 is a block diagram of the 5 CPU of the 1FgJ. Figure 5 is a flowchart of the main program executed by the MCPU, Figure 5 is a flowchart of the interrupt processing routine executed by the MCPU, Figure 6 is a flowchart of the program executed by the 5CPU, Figure W117 is a flowchart of sound source processing, Figure 8 is the passage of time. Figure 9 is a flowchart of channel sound source processing, Figure 1θ is a diagram showing waveform data, Figure 11 is a diagram showing a RAM table for sound source processing, and Figure 12 is a diagram showing the start and end of 5 CPU operation. Figures 13, 14, and 15 are time charts of the operation of the circuit in Figure 12. Figure 16 is a block diagram of a circuit with an interrupt mask function. Figure 17 is a block diagram of a circuit related to the function. A flowchart of envelope setting processing using the interrupt mask method. Figure 18 is a block diagram of a circuit that has a function to prohibit interruption of the main program due to an interrupt signal while multiple data are transferred by a single command. Figure 19 is a block diagram of a circuit that has a function to prevent interruption of the main program by an interrupt signal while multiple data are transferred by a single instruction. FIG. 20 is a diagram showing an example of a memory map of a RAM suitable for transferring data using a single instruction. FIG. 20 is a diagram showing a comparison between operations using a plurality of transfer instructions and operations using a single transfer instruction. Figure 21 is a flowchart of envelope setting processing using the single transfer command method, Figure 22 is a flowchart used to explain the 5CPU7 access function from the MCPU using the 5CPU stop mode, and Figure 23 is instantaneous forced access to 5CPUs. Figure 24 is a block diagram of 5 CPUs that are compatible with the instantaneous forced access function for SCPυ, and Figure 1425 is a block diagram of the internal RAM of 5 CPUs from MCPU.
Figure 26 is a time chart of the operation when writing data to the memory device conflict avoidance circuit shown in Figure 1.
Figure 27 is a time chart of the operation of the circuit in Figure 26, Figure 28 is a diagram showing a list of external memory access instructions including instructions to convert and import data from external memory, @291gI is the first 30 is a block diagram of the address conversion circuit shown in FIG. 29, FIG. A block diagram of the data conversion circuit of J, Figure 1432 is a circuit diagram of the data conversion circuit, and Figure 33 is a block diagram of the data conversion circuit of M4.
FIG. 2 is a diagram showing a comparison between a configuration in which the sampling period of the DAC shown in FIG. 1 is unstable and a configuration in which the sampling period 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.

Claims (2)

【特許請求の範囲】[Claims] (1)複数のCPUと、 並列処理開始信号を発生する並列処理開始前号発生手段
と、 前記並列処理開始信号に応答して、各CPUのモードを
各CPUが分担する所定の処理の実行モードに切換制御
して、前記複数のCPUによる並列処理を実現するCP
Uモード制御手段と、を有することを特徴とするデジタ
ルマイクロコンピュータ。
(1) A plurality of CPUs, a parallel processing start generation means for generating a parallel processing start signal, and a predetermined processing execution mode in which each CPU shares the mode of each CPU in response to the parallel processing start signal. A CPU that performs switching control to realize parallel processing by the plurality of CPUs.
A digital microcomputer comprising: U mode control means.
(2)メインプログラムとインタラプト処理ルーチンと
を内蔵するメインCPUと、 前記メインCPUの前記メインプログラムから割り当て
られる処理を実行するためのプログラムを内蔵する少な
くとも1つのサブCPUと、所定時間の経過ごとにイン
タラプト信号を発生するインタラプト発生手段と、 前記インタラプト信号に応答して前記メインCPUにお
いて実行中の前記メインプログラムを中断して前記イン
タラプト処理ルーチンを実行するモードに前記メインC
PUのモードを切替制御し、前記インタラプト処理ルー
チンの実行完了に応答して再び前記メインプログラムを
実行するモードに前記メインCPUのモードを復帰制御
するメインCPUモード制御手段と、 前記インタラプト信号に応答して前記前記サブCPUの
モードを停止状態から前記プログラムを実行するモード
に切替制御し、前記プログラムの実行完了に応答して前
記サブCPUのモードを停止状態に復帰制御するサブC
PUモード制御手段と、 を有することを特徴するデジタルマイクロコンピュータ
(2) a main CPU containing a main program and an interrupt processing routine; and at least one sub-CPU containing a program for executing processing assigned by the main program of the main CPU; an interrupt generating means for generating an interrupt signal; and a mode for interrupting the main program being executed in the main CPU and executing the interrupt processing routine in response to the interrupt signal.
main CPU mode control means for controlling switching of a mode of a PU and returning the mode of the main CPU to a mode in which the main program is executed again in response to completion of execution of the interrupt processing routine; a sub-C that controls switching of the mode of the sub-CPU from a stopped state to a mode that executes the program, and controls the mode of the sub-CPU to return to the stopped state in response to completion of execution of the program;
A digital microcomputer comprising: PU mode control means;
JP2170162A 1990-06-29 1990-06-29 Digital microcomputer Pending JPH0460746A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2170162A JPH0460746A (en) 1990-06-29 1990-06-29 Digital microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2170162A JPH0460746A (en) 1990-06-29 1990-06-29 Digital microcomputer

Publications (1)

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

Family

ID=15899834

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JPH0460746A (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
JP2014012409A (en) * 2013-08-19 2014-01-23 Kyocera Document Solutions Inc Image forming system and power-saving printing method

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
JP2014012409A (en) * 2013-08-19 2014-01-23 Kyocera Document Solutions Inc Image forming system and power-saving printing method

Similar Documents

Publication Publication Date Title
US5200564A (en) Digital information processing apparatus with multiple CPUs
US5319151A (en) Data processing apparatus outputting waveform data in a certain interval
US6385704B1 (en) Accessing shared memory using token bit held by default by a single processor
WO1998035301A2 (en) Circuits, system, and methods for processing multiple data streams
WO1998035301A9 (en) Circuits, system, and methods for processing multiple data streams
JPH0997064A (en) Automatic musical performance data processor
US5584034A (en) Apparatus for executing respective portions of a process by main and sub CPUS
JPS62115542A (en) Information processor
US6477177B1 (en) Multiple device access to serial data stream
JPH0460746A (en) Digital microcomputer
JP2797137B2 (en) Processing equipment for electronic musical instruments
EP0376342B1 (en) Data processing apparatus for electronic musical instruments
JPH0460723A (en) Digital microcomputer
JPH0460722A (en) Digital microcomputer
JPH0460749A (en) Digital microcomputer
JPH0460744A (en) Digital microcomputer
JPH0460725A (en) Digital microcomputer
US6314485B1 (en) Automatic status register
JPH0460724A (en) Digital microcomputer
JP2797138B2 (en) Processing equipment for electronic musical instruments
JPS6141192A (en) Electronic musical instrument
JP2797142B2 (en) Processing equipment for electronic musical instruments
JP2576613B2 (en) Processing equipment
Lowe et al. Digidesign's Sound Accelerator: Lessons Lived and Learned
Savell The EMU10K1 digital audio processor