JPS60215249A - Computer peripheral unit incorporating multi-task control element - Google Patents

Computer peripheral unit incorporating multi-task control element

Info

Publication number
JPS60215249A
JPS60215249A JP59072538A JP7253884A JPS60215249A JP S60215249 A JPS60215249 A JP S60215249A JP 59072538 A JP59072538 A JP 59072538A JP 7253884 A JP7253884 A JP 7253884A JP S60215249 A JPS60215249 A JP S60215249A
Authority
JP
Japan
Prior art keywords
task
command
interrupt
elements
control
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
JP59072538A
Other languages
Japanese (ja)
Inventor
Toshimitsu Nakade
中出 敏光
Masaru Maruki
丸鬼 優
Hirotake Hayashi
林 裕丈
Takaaki Uno
鵜野 高明
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP59072538A priority Critical patent/JPS60215249A/en
Publication of JPS60215249A publication Critical patent/JPS60215249A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enable even another peripheral input/output element having the priority set at a lower level to receive the support, by accepting the task switching interruption requested by a multi.task control element having the priority of a higher level by a master CPU and requesting a normal interruption to the master CPU. CONSTITUTION:Multi.task control elements 11-1m of a multi.task control element group 1 serve as independent function elements which perform plural task controls to be executed by a master CPU2 by means of elements except the CPU2 and requests an interruption to the CPU2 at a time point when the task switching is needed. Each of the elements 11-1m has the priority, and the elements 11 and 1m have priorities of the highest and lowest levels respectively. If an applicable task exists among those tasks within a control range of upper control elements, the upper elements inhibit the interruption effective for task switching of lower elements. When no applicable task exists no more, the tasks within a control range of lower control elements are applicable.

Description

【発明の詳細な説明】 く技術分野〉 本発明は、マイクロ・コンピュータのシステム管理プロ
グラムに有効なマルチ・タスク制御機能を内蔵したコン
ピュータ周辺用デバイスに関するものである。
DETAILED DESCRIPTION OF THE INVENTION Technical Field The present invention relates to a computer peripheral device having a built-in multi-task control function that is effective for a microcomputer system management program.

〈従来技術〉 マイクロ・コンピューターシステムにおいて、1つのC
PUによって複数の処理を同時に実行させるためには、
コンピュータ・システムのos(オペレーティング・シ
ステム)によるマルチ・タスク制御が必要である。
<Prior art> In a microcomputer system, one C
In order for the PU to execute multiple processes at the same time,
Multi-task control by the OS (operating system) of the computer system is required.

薇来、マルチリスク制御素子と他の周辺入出力素子と゛
を組み合わせてシステムを構成する1合、1個のマルチ
・タスク制御素子と他の周辺入出力素子とを接続する際
に割り込み制御線(IEI 。
When a multi-risk control element and other peripheral input/output elements are combined to form a system, an interrupt control line ( IEI.

IEO)を接続するだけで、マルチ・タスク制御素子お
よび周辺入出力素子のマスタCPUへの割り込み優先順
位を制御することを可能としていた。
By simply connecting an IEO), it was possible to control the interrupt priorities of multi-task control elements and peripheral input/output elements to the master CPU.

ところが、マルチ・タスク制御素子は内部メモリの制約
により1個の制御素子で同時に管理できるタスク数に制
限があるため、多くのタスクを管理するためには、複数
のマルチ・タスク制御素子を8つの制御線(IEI、I
EO,LEO)を用いてカスケード接続する必要がある
。しかし、カスケード接続された、優先順位が上位側の
マルチ・タスク制御素子は、自分の管理下のタスクが実
行中の場合、下位側のマルチ・タスク制御素子からの割
り込みを割り込み制御線によって禁止していたので、カ
スケード接続された複数のマルチ・タスク制御素子の下
位側に他の周辺入出力素子を直接接続したのでは、周辺
入出力素子の割り込み要求がマスクCPUによって正常
に受け付けられないという問題が生じた。
However, due to internal memory limitations of multi-task control elements, there is a limit to the number of tasks that can be managed simultaneously by one control element, so in order to manage a large number of tasks, multiple multi-task control elements must be Control line (IEI, I
EO, LEO) must be used for cascade connection. However, when a cascade-connected multi-task control element with a higher priority level is executing a task under its control, it prohibits interrupts from lower-level multi-task control elements via the interrupt control line. Therefore, if other peripheral input/output elements are directly connected to the lower side of multiple cascade-connected multi-task control elements, the problem arises that interrupt requests from the peripheral input/output elements are not properly accepted by the mask CPU. occurred.

く目的〉 本発明は、上記の複数のマルチ4・タスク制御素子の下
位側に接続された他周辺入出力素子のマスタCPUへの
割り込みの問題を解決するためのものであり、優先順位
が下位側に接続された他周辺入出力素子でも、上位側の
マルチ・タスク制御素子が要求したタスク切り換えの割
り込みをマスタCPUが受け付け、実行中でない場合で
あれば一正常にマスタCPUに対して割り込みを要求し
、しかも割り込みのサポートを受けることを可能とする
ことを目的上する。
Purpose> The present invention is intended to solve the problem of interrupts to the master CPU from other peripheral input/output elements connected to the lower side of the plurality of multi-task control elements mentioned above. Even for other peripheral input/output devices connected to the side, the master CPU accepts task switching interrupts requested by the multi-task control device on the upper side, and if they are not currently being executed, they will normally issue interrupts to the master CPU. The purpose is to make it possible to request and receive interrupt support.

〈実施例〉 以下図面に従って本発明の一実施例を説明する。<Example> An embodiment of the present invention will be described below with reference to the drawings.

第1図はマイクロコンピュータ・システムとしての構成
例を示す図である。素子群1は、本発明に係るマルチ・
タスク制御を実現するための、カスケード接続された複
数個のマルチ・タスク・サポート・プロセッサであり、
他の周辺デバイスと同様、入出力素手の形態で供給され
る。以下本素子群の各々のデバイスをマルチ・タスク制
御素子と呼ぶ。マスタCPU2 、プログラム・メモリ
(ROM)8.データ・メモリ(RAM)4及び他のI
/等の周辺入出力素子5は、周知のマイクロコンピュー
タ−システムとしても具備されるものであり、マルチ・
タスク制御素子群1とともにバス6を介して相互に接続
される。プログラム・メモリ3は、マルチ・タスク制御
素子群1の初期化プログラムと複数のタスクをそれぞれ
独立してプログラムしている。又、マルチ・タスク制御
用素子群1から周辺入出力素子割り込み制御回路7を介
して、周辺入出力素子5の割り込みが制御される。
FIG. 1 is a diagram showing an example of the configuration of a microcomputer system. Element group 1 is a multi-layer device according to the present invention.
Multiple cascaded multi-task support processors to achieve task control.
Like other peripheral devices, input and output are provided in the form of bare hands. Hereinafter, each device in this element group will be referred to as a multi-task control element. Master CPU2, program memory (ROM)8. Data memory (RAM) 4 and other I
The peripheral input/output elements 5, such as /, are also included in a well-known microcomputer system, and are
It is interconnected with the task control element group 1 via a bus 6. The program memory 3 independently programs an initialization program for the multi-task control element group 1 and a plurality of tasks. Further, interrupts of the peripheral input/output elements 5 are controlled from the multi-task control element group 1 via the peripheral input/output element interrupt control circuit 7.

各マルチ・タスク制御素子群1の各々の素子11〜1m
は、それぞれマスタCPU2により実行される複数のタ
スクの管理をマスタCPU2以外で行なう独立機能素子
であり、タスクのスケジューリング機能(優先度順又は
時分割による実行′タスクの切換え)、同一制御素子の
管理下のタスク間の同期・通信機能(各タスク間でデー
タの送受信を行ない、タスクの実行中継、実行再開を決
定)、メモリ管理機能(各タスクの使用メモリ領域の重
複使用の禁止)、時計機能(内蔵タイマによる時刻のセ
ット)等を有したものである。
Each element 11 to 1m of each multi-task control element group 1
are independent functional elements that manage a plurality of tasks executed by the master CPU 2, respectively, by a device other than the master CPU 2, and have task scheduling functions (execution in order of priority or time-sharing) and management of the same control element. Synchronization and communication function between the tasks below (sends and receives data between each task, determines task execution relay and execution restart), memory management function (prohibits duplication of memory area used by each task), clock function (time setting using a built-in timer), etc.

各々のマルチリスク制御素子11〜1mは、それぞれ自
分の管理下のタスクとして最大8個まで管理する。また
、各々の素子11〜1mは、タスクの切り換えの必要が
生じた時点で、マスタCPU2に対して割り込みを要求
する。それぞれの素子11〜1mは割り込み優先順位を
もち、素子11が最も高く、素子Inが最も低い。上位
の素子の管理内のタスクの中に実行可能なものが存在す
る場合には、上位の素子は下位の素子のタスクの切り換
えのための割り込みを禁止する。実行可能なタスクがな
(なれば、下位の割り込みを許可するため、下位の素子
の管理内のタスクが実行可能になる。(タスク毎の優先
度と素子毎の割り込み優先順位を対応させるため、上位
の素子には高い優先度のタスクを、下位の素子には低い
優先度のタスクを登録することを前提としている。)以
辛、個々のマルチリスク制御素子11〜1mについて説
明を加える。第2図はマルチ・タスク制御素子11=1
mの内部構成例を示すプロ゛ツク図である。
Each of the multi-risk control elements 11 to 1m manages up to eight tasks under its own management. Further, each of the elements 11 to 1m requests an interrupt from the master CPU 2 when it becomes necessary to switch tasks. Each of the elements 11-1m has an interrupt priority, with element 11 being the highest and element In being the lowest. If there is an executable task among the tasks managed by the higher-level element, the higher-level element prohibits interrupts for switching the tasks of the lower-level element. If there are no executable tasks, lower-level interrupts are enabled, so tasks within the management of lower-level elements become executable. (In order to match the priority of each task with the interrupt priority of each element, (It is assumed that high-priority tasks are registered in higher-order elements and lower-priority tasks are registered in lower-order elements.) Hereinafter, we will add an explanation of the individual multi-risk control elements 11 to 1m. Figure 2 shows multi-task control element 11=1
FIG. 3 is a block diagram showing an example of the internal configuration of M.

マルチ・タスク制御素子1□〜1mはマスタCPU2か
らアクセス可能なレジスタ群を備えている。
The multi-task control elements 1□ to 1m are provided with a register group accessible from the master CPU 2.

コマンド−パラメータ・レジスタCPIOは、マスクC
PtJ2からコマンド実行時に入力するパラメータや、
実行後に出力するパラメータを保持する。コマンド/ス
テータス・レジスタCN5Tは書込み時にはコマンド書
込み用として、読出し時には実行したコマンドの実行情
報を格納するためのレジスタとして機能する。新スタッ
ク・ポインタ囃レジスタSPNは2つの機能をもつ。1
つは、タスク切換え情報としてこれから新らたに実行状
態となるタスクのスタック・ポインタの値栃出力する。
Command-parameter register CPIO is masked by C
Parameters input when executing commands from PtJ2,
Retains parameters to be output after execution. The command/status register CN5T functions as a register for writing commands during writing, and as a register for storing execution information of executed commands during reading. The new stack pointer register SPN has two functions. 1
First, the value of the stack pointer of the task that will be newly executed is output as task switching information.

もう1つは、タスクが6実行中に実行状態のまま中継さ
れた場合、現在のスタックポインタを保存するために入
力する。また、旧スタック・ポインタ・レジスタSPB
は、タスク切換え情報として今まで実行状態にあったタ
スクのスタック・ポインタの値を入力するためのレジス
タである。
The other is input to save the current stack pointer if the task is relayed while still in the running state during 6 executions. Also, the old stack pointer register SPB
is a register for inputting the value of the stack pointer of the task that has been in the execution state as task switching information.

マスク割込み制御レジスタMICは本素子11〜1mに
おける、マスタCPU2に対する割込み発生を制御する
ためのレジスタで、割込みベクタ・レジスタMIVは割
込みベク名値を書込む。データ・レジスタPID、P2
D、P8Dはポート1゜ポート2およびポート8のデー
タ入出力のためのレジスタである。ポート1とポート2
はデータ入出力方向をプログラムによってビット単位で
設定できる8ビツト入出力ポートであり、ポート3は2
ビツトの入力ポートである。ポート3はプログラムによ
ってイベント入力(ポート3への入力信号の遷移により
停止状態のタスクをレディー状態に移す)にセットする
ことが可能である。
The mask interrupt control register MIC is a register for controlling the generation of interrupts to the master CPU 2 in the present elements 11 to 1m, and the interrupt vector register MIV writes an interrupt vector name value. Data register PID, P2
D and P8D are registers for data input/output of port 1, port 2, and port 8. port 1 and port 2
is an 8-bit input/output port whose data input/output direction can be set bit by bit by program;
This is a bit input port. Port 3 can be set to an event input (a task in a stopped state is moved to a ready state by transition of an input signal to port 3) by a program.

以上のレジスタ群はマスタCPU2からアクセスされて
、本素子11〜1mとマスタCPU2との間で情報を相
互に交換するために用いられる。
The above register group is accessed by the master CPU 2 and used for mutually exchanging information between the present elements 11 to 1 m and the master CPU 2.

データ・バス・インターフェイスDBI、バス・タイミ
ング発生・制御回路BTGC、割込み制御回路INTC
は、マスタCPU2とのインターフェイス回路として備
えられたものである。割込み制御回路INTCにおける
IEI(割り込みイネーブル入力)端子及びIEO(割
り込みイネーブル出力)端子、ポート3(ボート書レジ
スタP3D)のLEO(下位素子イネーブル出力)端子
については後述する。
Data bus interface DBI, bus timing generation/control circuit BTGC, interrupt control circuit INTC
is provided as an interface circuit with the master CPU 2. The IEI (interrupt enable input) terminal and IEO (interrupt enable output) terminal in the interrupt control circuit INTC, and the LEO (lower element enable output) terminal of port 3 (vote write register P3D) will be described later.

タスク制御ブロックTCB(1〜8)はタスクの状態を
保存するためのメモリ領域である。各制御素子11〜1
mは8つまでのタスクを取扱うことが可能である。各T
CBブロックは第3図に示されるように、タスク・ステ
ータス■、タスク優先度■、先にレディーQに接続され
ているタスクの番号■、後にレディーQに接続されてい
るタスクの番号■、タスクが占有しているワーク・メモ
リの先頭アドレス■、そのサイズ■、使用しているメイ
ル・ボックス番号■、そしてタスク実行中継時のスタッ
ク・ポインタ値■を格納する領域を有している。
The task control block TCB (1-8) is a memory area for saving the state of a task. Each control element 11-1
m can handle up to eight tasks. Each T
As shown in Figure 3, the CB block has the following information: task status ■, task priority ■, number of task connected to ready Q first ■, number of task connected to ready Q later ■, task It has an area for storing the start address (■) of the work memory occupied by the work memory, its size (■), the mailbox number (■) in use, and the stack pointer value (■) during task execution relay.

メイル・ボックスMBXは同一素子の管理下のタスク間
でデータの授受を行なえるよう設けられたバッファ・メ
モリ領域である。
The mail box MBX is a buffer memory area provided so that data can be exchanged between tasks managed by the same element.

メモリ・マツプMEMMAPはワーク・メモリを管理す
るためのメモリ領域であり、例えば第4図のように32
バイトから構成される。メモリ・マツプMEMMAPに
より256バイト単位のワーク・メモリを管理すること
が可能である。ワーク・メそりを使用していないときそ
の領域に対応するビットは0#で、占有中であるときは
そのビットが11″にセットされる。
The memory map MEMMAP is a memory area for managing work memory, and for example, 32
Consists of bytes. It is possible to manage work memory in units of 256 bytes using the memory map MEMMAP. When the work memory is not in use, the bit corresponding to that area is 0#, and when it is occupied, the bit is set to 11''.

タイマTMは時分割処理(同一優先度のタスク子11〜
1m内に割込み信号を発生させるもので、システムクロ
ック領域SCAは同時にタイマTMの出力により計数さ
れる時2分2秒等の時刻データを格納するメモリ領域で
ある。
The timer TM is used for time-sharing processing (task children 11 to 11 with the same priority).
The system clock area SCA is a memory area that stores time data such as 2 minutes and 2 seconds counted by the output of the timer TM.

内部演算制御回路C0NTは論理演算ユニット(ALU
)、本素子11〜1mのプログラムを格納するROM、
一時記憶用のRAMおよび各種制御の元めのフラグ用レ
ジスタ等を有してなる。
The internal arithmetic control circuit C0NT is a logic arithmetic unit (ALU).
), a ROM that stores programs for the devices 11 to 1m;
It has a RAM for temporary storage, a flag register for various controls, and the like.

マスタCPU2からのマルチ・タスク制御素子11〜1
mのうちの1つのマルチ−タスク制御素子11へのアク
セスは、実行中のタスクから発行されるアドレス指定さ
れた制御素子11へのコマンドによって行なわれ、マル
チ・タスク制御素子1iからマスタCPU2へのアクセ
スは、マルチ−タスク制御素子11の割込み信号発生に
基づいて行なわれる。第5図はコマンドの種類と入力パ
ラメータおよび出力パラメータを示す図である。
Multi-task control elements 11 to 1 from master CPU 2
Access to one of the multi-tasking control elements 11 of m is done by a command to the addressed control element 11 issued from the executing task, and by a command to the addressed control element 11 from the multi-tasking control element 1i to the master CPU 2. Access is based on the generation of interrupt signals by the multi-tasking control element 11. FIG. 5 is a diagram showing command types, input parameters, and output parameters.

基本的動作としては次のとおりである。なお、タスク制
御ブロックTCBには各タスクの状態が既に保存されて
いるものとする。
The basic operation is as follows. It is assumed that the state of each task is already stored in the task control block TCB.

マルチ・タスク制御素子11〜1mは、実行可能状態の
タスクから優先度の一番高いタスクを選び出し、登録さ
れたそのタスクのスタック・ポインタの値迭新スタック
・ポインタ・レジスタSPHに準備する。スタック・ポ
インタの値を準備した後、マルチ・タスク制御素子11
〜1mはマスタCPU2に対し割り込みを発生するため
、割り込み(IP)フラグをセットする。マスタCPU
2は、割り込みを受け付けた時、割り込みを要求してい
る゛マルチ・タスク制御素子(11〜1mのうちの1つ
)に対応する割り込みルーチンを実行し、そのマルチ・
タスク制御素子にセットされているスタック拳ポインタ
の値を自分のスタック・ポインタにロードし、予じめ書
込まれていたレジスタの初期値をスタックからポツプし
てレジスタを書換える。そしてマスタCPU2の管理下
において指定されたタスクを実行する。
The multi-task control elements 11 to 1m select the task with the highest priority from the tasks in the executable state, and prepare the registered value of the stack pointer of that task in the new stack pointer register SPH. After preparing the value of the stack pointer, the multitasking control element 11
~1m sets an interrupt (IP) flag in order to generate an interrupt to the master CPU 2. Master CPU
When 2 receives an interrupt, it executes the interrupt routine corresponding to the multi-task control element (one of 11 to 1m) requesting the interrupt, and
Loads the value of the stack pointer set in the task control element into its own stack pointer, pops the initial value of the register written in advance from the stack, and rewrites the register. Then, the designated task is executed under the control of the master CPU 2.

実行中のタス−りからコマンド入力があるか、またはタ
イマTMあるいはポート8への入力による割込みがある
まで、マルチ・タスク制御素子11〜1mは待ち状態と
なる。ここで例えばコマンド入力があれば、マルチ・タ
スク制御素子11〜1mへのコマンドを解析しコマンド
処理を行う。そして、このコマンドがタスク切換え機能
を含むものであれば、次に切換えるべきタスクのスタッ
ク・ポインタの値を新スタック・ポインタ・レジスタS
PNにセットし、割り込み(IP)フラグをセット1て
マスタCPU 2に対し割込みを要求する。
The multi-task control elements 11-1m are in a waiting state until there is a command input from the task being executed or until there is an interrupt due to an input to the timer TM or port 8. For example, if a command is input here, the command to the multi-task control elements 11 to 1m is analyzed and the command is processed. If this command includes a task switching function, the value of the stack pointer of the next task to be switched is stored in the new stack pointer register S.
PN and sets the interrupt (IP) flag to 1 to request an interrupt from the master CPU 2.

この割込みが受け付けられた時点で、マスタCPU2は
現在実行中のタスクの実行を停止し、次に実行すべきタ
スクのスタック・ポインタの値をマルチ・タスク制御素
子11〜1mから読出す。
When this interrupt is accepted, the master CPU 2 stops executing the task currently being executed, and reads the stack pointer value of the task to be executed next from the multi-task control elements 11-1m.

以下フローチャートを参照して個々のマルチ・タスク制
御素子1、〜1mの内部処理をさらに詳しく説明する。
The internal processing of the individual multi-task control elements 1 to 1m will be explained in more detail below with reference to flowcharts.

第6図はマル+争タスク制御素子11〜1m(7)メイ
ンルーチンの動作を説明するフローチャート。
FIG. 6 is a flowchart illustrating the operation of the main routine of the multi-task task control elements 11 to 1m (7).

第7図〜第21図は各コマンドθ〜14による処理ルー
チンの動作を説明するフローチャート、第22.28図
はタスク切換えルーチンの動作を説明するフローチャー
ト、第24図はポート3へのイベント入力による割込み
処理ルーチンの動作を説明するフローチャート、第25
図はタイマTMによる割込み処理ルーチンの動作を説明
するフロチンの動作を説明するフローチャートである。
7 to 21 are flowcharts explaining the operation of the processing routine according to each command θ to 14, FIGS. 22 and 28 are flowcharts explaining the operation of the task switching routine, and FIG. Flowchart explaining the operation of the interrupt processing routine, No. 25
The figure is a flowchart illustrating the operation of a flotine for explaining the operation of the interrupt processing routine by the timer TM.

第6図において、システムに電源が投入されると、本マ
ルチ・タスク制御素子ll〜1mはリセット動作を行な
い内部の各機能素子を初期化する(ステップ■)。そし
て、マスタCPU2からコマンドがコマンド/ステータ
ス・レジスタCN5Tに書込まれるのを待つ(ステップ
■)。コマンドが書込まれると、各コマンド・コードに
対応したコマンド処理を行なう(ステップ■)。
In FIG. 6, when the system is powered on, the multi-task control elements 11-1m perform a reset operation to initialize each internal functional element (step 2). Then, it waits for a command to be written from the master CPU 2 to the command/status register CN5T (step ■). When the commands are written, command processing corresponding to each command code is performed (step ■).

コマンド0(コマン)’名:INIT、jJT図フロー
チャート)は、マルチ・タスク制御素子11の初期化を
行なうた。めのコマンドであり、マルチ・タスク制御素
子tl−imがマスタCPU2に対して割込みを発生す
るときにマスタCPU2へ出力するベクタ値、マルチ・
タスク制御素子i1〜1mが管理するワーク・メモリ領
域の先頭アドレスとその大きさ、及びタスクの優先度を
各タスクに対して登録するためのコマンドである。
Command 0 (command name: INIT, jJT diagram flowchart) initializes the multi-task control element 11. This command is a vector value output to the master CPU 2 when the multi-task control element tl-im generates an interrupt to the master CPU 2.
This is a command for registering the start address and size of the work memory area managed by the task control elements i1 to 1m, and the priority of the task for each task.

このコマンドが実行されると、入力データのエラーを調
査しくステップ■)、もし入力データに誤りがあれば、
エラーコードをコマンド/ステータス・レジスタCN5
Tにセットする(ステップ■)。
When this command is executed, it will check the input data for errors (step ■), and if there is an error in the input data,
Error code in command/status register CN5
Set to T (step ■).

入力データに誤りがなければ、コマンド・パラメータ・
レジスタCPIOに送られたデータから、割込みベクタ
値を割込みベクタレジスタMIVに書込み(ステップ■
)、またワーク・メモリ領域の先頭アドレスとその大き
さのデータをもとにしてメモリaマツプMEMMAPを
初期化する(ステップ■)。そして、書込まれたタスク
の優先度をもとにして各タスク制御ブロックTCBを作
成する(ステップ■)。そして、優先度の高い順に並べ
てレディーQを構成する(ステップ■)。このとき、タ
スク制御ブロックTCB内の0.■によって順序づけを
行なう。生成後は正常終了コードをコマンド/ステータ
ス・レジスタCN5Tにセットしくステップ[相])、
内部演算制御回路CONTのT、 S K CHGフラ
グをリセットして(ステップ@)、第6図のメインチー
チンに戻る。
If the input data is correct, the command/parameter/
Write the interrupt vector value to the interrupt vector register MIV from the data sent to register CPIO (step
), and the memory a map MEMMAP is initialized based on the data of the start address of the work memory area and its size (step 2). Then, each task control block TCB is created based on the written priority of the task (step 2). Then, they are arranged in descending order of priority to form a ready Q (step ■). At this time, 0.0 in the task control block TCB. ■Order by. After generation, set the normal completion code to command/status register CN5T (step [phase]),
The T, S K CHG flags of the internal arithmetic control circuit CONT are reset (step @), and the process returns to the main instruction shown in FIG.

エラーコードをコマンド/ステータス・レジスタCN5
Tにセットした場合も同様にTSKCHGフラグをリセ
ットしてメインルーチンに戻る。
Error code in command/status register CN5
When set to T, the TSKCHG flag is similarly reset and the process returns to the main routine.

コマンド1(コマンド名:TSTR,38図フローチャ
ート)は、初期化したマルチ・タスク制御素子11〜1
mを実行状態に移すためのコマンドである。
Command 1 (command name: TSTR, flowchart in Figure 38) executes the initialized multi-task control elements 11 to 1.
This is a command to move m to an execution state.

このコマンド1では、コマンド0の処理が実行済かどう
かのチェックを行ない(ステップ@)、実行済の場合の
み、レディーQの先頭に接続されているタスク(一番優
先度の高いタスク)を実行状態に移すためTSKCH,
Gフラグ(内部演算制御回路C0NTの制御フラグ)を
セットして(ステップ■)、第6図のメインチーチンに
戻る。実行済でない場合は、コマンド/ステータス・レ
ジスートをセットしくステップ [相])、メインルーチンに戻る。
This command 1 checks whether the process of command 0 has been executed (step @), and only if it has been executed, executes the task connected to the beginning of ready Q (the task with the highest priority). TSKCH to move to state,
The G flag (control flag of the internal arithmetic control circuit C0NT) is set (step ■), and the process returns to the main instruction shown in FIG. If it has not been executed, set the command/status register (step [phase]) and return to the main routine.

以上のコマンドo、1#よびマルチリスク制御素子11
〜I’mの書込み情報は、例えば第1図のプログラム・
メモリ3の初期化プログラムに予じめ格納され、タスク
内容に応じてプログラム変更が可能であり、各々のマル
チ・タスク制御素子11〜1mg!これにより種々に初
期化設定することができる。
The above commands o, 1# and multi-risk control element 11
~I'm write information is, for example, the program shown in Figure 1.
It is stored in advance in the initialization program of the memory 3, and the program can be changed according to the task content, and each multi-task control element 11~1mg! This allows various initialization settings to be made.

コマンド2(コマンド名: TCRT 、第9図タイム
チャート)は初期設定の後゛、任意にタスクを生成する
ためのコマンドであり、入力データとして生成するタス
クの番号およびその優先度が制御素子11 〜1mのコ
マンド・パラメータ・レジスタCPIOに書込まれる。
Command 2 (command name: TCRT, time chart in Figure 9) is a command for arbitrarily generating a task after initial settings, and the number of the task to be generated and its priority are set as input data from the control elements 11 to 11. 1m command parameter register CPIO.

このコマンド2が実行されると、入力データにエラーが
ないかの検査を行ない(ステップ0)、エラーがあれば
コマンド/ステータス・レジスタCN5Tにエラーコー
ドを書込む(ステップ[相])。
When this command 2 is executed, the input data is checked for errors (step 0), and if there is an error, an error code is written to the command/status register CN5T (step [phase]).

エラーがなければ、入力データで指定されたタスクのタ
スク制御ブロックTCBを生成する(ステップ@)。
If there is no error, a task control block TCB for the task specified by the input data is generated (step @).

タスク制御ブロックTCB中のタスク・ステータス■(
第3図参照)には次の4つのフラグが含まれる。
Task status in task control block TCB
(see Figure 3) includes the following four flags.

RUNフラグはタスクが実行状態にあることを示す。The RUN flag indicates that the task is in a running state.

READYフラグはタスクがレディー状態にあってレデ
ィーQに接続されていることを示す。
The READY flag indicates that the task is in the ready state and connected to ready-Q.

PENDWフラグはメツセージ受信待ち状態にあること
を示す。
The PENDW flag indicates that the device is waiting to receive a message.

5TJSPRNnフラグはタスクが停止ト状態にあるこ
とを示す。
The 5TJSPRNn flag indicates that the task is in the stopped state.

上記タスク制御ブロックTCBの生成時(ステップ0)
、同時にその中のREADYフラグをセットする。
When generating the above task control block TCB (step 0)
, and simultaneously sets the READY flag therein.

そして、タスクの優先度が高い順にレディーQに再接続
する(ステップ[相])。次にコマンド/ステータス−
レジスタCN5Tに正常終了コードをセットしくステッ
プ[相])、実行状態のタスクとレディーQの先頭に接
続されているタスクの優先度を比較させるためのTSK
CHGフラグをセットして(ステップ[相])、第6図
のメインルーチンに戻る。
Then, the tasks are reconnected to the ready Q in descending order of priority (step [phase]). Next command/status -
To set a normal completion code in register CN5T (step [phase]), TSK is used to compare the priorities of the task in execution state and the task connected to the beginning of ready Q.
The CHG flag is set (step [phase]) and the process returns to the main routine of FIG.

コマンド8(コマンド名:TDEL 、jJl 0図タ
イムチャート)は不要のタスクを肩去Tるためのコマン
ドで、消去するタスクの番号を入力データとして実行す
る。
Command 8 (command name: TDEL, jJl time chart in figure 0) is a command for erasing unnecessary tasks, and is executed using the number of the task to be erased as input data.

入力データにエラーがないかの検査(ステップ[相])
において、エラーがあればコマンド/ステータス・レジ
スタCN5Tにエラーコードがセットされ(ステップ[
相])、第6図のメインルーチンに戻る。
Inspecting input data for errors (step [phase])
If there is an error, an error code is set in the command/status register CN5T (step [
phase]), the process returns to the main routine of FIG.

エラーがなければ、消去するタスクが占有していたワー
ク・メモリを解放するため、このタスクのタスク制御ブ
ロックTCB中にある占有メモリ先頭アドレスOおよび
占有メモリ・サイズのを読出し、このデータに基づいて
メモリーマツプMEMMAP上で対応した領域をII 
OIIクリアする(ステップ[相])。ついでこのタス
クがレディー状態にあれば、消去するタスクのタスク制
御ブロックTCBをレディーQから切離しくステップ[
相])、このタスク制御ブロックTCBのすべてをクリ
アする(ステップ[相])。終われば、コマンド/ステ
ータス・レジスタCN5Tに正常終了コードをセットし
て(ステップ[相])、メインルーチンに戻る。
If there is no error, in order to release the work memory occupied by the task to be erased, read the occupied memory start address O and the occupied memory size in the task control block TCB of this task, and based on this data. II The corresponding area on the memory map MEMMAP
Clear OII (step [phase]). Next, if this task is in the ready state, the task control block TCB of the task to be erased is separated from the ready Q and step [
phase]), clear everything in this task control block TCB (step [phase]). Once completed, a normal completion code is set in the command/status register CN5T (step [phase]) and the process returns to the main routine.

コマンド4(コマンド名:TR5M 、第11図フロー
チャート)は、入力データで指定されたタスク番号を持
つ待機または停止中のタスクをレディー状態(再起動可
能状態)にするためのコマンドである。タスク番号を入
力データとして実行する。
Command 4 (command name: TR5M, flowchart in FIG. 11) is a command for bringing a waiting or stopped task with a task number specified by input data into a ready state (restartable state). Execute the task number as input data.

コマンド4が実行されると、まず入力データにエラーが
ないかの検査が行なわれ(ステップ[相])、エラーが
あればコマンド/ステータス・レジスタCN5Tにエラ
ーコードを設定して(ステップ[相])、メインルーチ
ンに戻る。
When command 4 is executed, the input data is first checked for errors (step [phase]), and if there is an error, an error code is set in the command/status register CN5T (step [phase]). ), return to the main routine.

エラーがなければ、指定されたタスクのPENDWフラ
グまたは5USPENDフラグをリセットするとともに
REA DYフラグをセットし、かつこのタスク制御ブ
ロックTCBをタスクの優先度の高い順序でレディーQ
に接続する(ステップ[相])。そして、正常終了コー
ドをコマンド/ステータス・レジスタCN5Tにセット
しくステップ[相])、実行状態のタスクとレディーQ
の先頭に接続されているタスクの優先度を比較するため
TSKCHGフラグをセットしくステップ0)メインル
ーチンに戻る。
If there is no error, the PENDW flag or 5USPEND flag of the specified task is reset, the REA DY flag is set, and this task control block TCB is set to Ready Q in order of priority of the task.
Connect to (step [phase]). Then, set the normal completion code in the command/status register CN5T.
Set the TSKCHG flag to compare the priorities of the tasks connected to the top of the task. Step 0) Return to the main routine.

コ↓ンド5(コマンド名:TSPD、第12図フローチ
ャート)は、入力データで指定されたタスク番号を持つ
実行状態あるいはレディー状態にあるタスクを停止状態
にするためのコマンドである。
Command 5 (command name: TSPD, flowchart in FIG. 12) is a command for bringing a task in a running or ready state with a task number specified by input data into a stopped state.

このコマンド5が実行されると、入力データのエラーを
検査し、エラーがあればコマンド/ステータス・レジス
タCN5Tにエラーコードを設定してメインルーチンに
戻る(ステップ[相]、[相])。
When this command 5 is executed, the input data is checked for errors, and if there is an error, an error code is set in the command/status register CN5T and the process returns to the main routine (steps [phase], [phase]).

エラーがなければ、まず、入力データによって、停止状
態になるタスクをポート8からの入力信号(外部イベン
ト)によりレディー状態にする(再起動)という指定が
されているかどうかのチェックを行なう(ステップ[相
])。外部イベントの指定がなければステップ@の処理
ヘスキツプする。指定がある場合は、他のタスクが既に
外部イベントを使用しているかどうかの検査を行ない(
ステップ[相])、使用されていれば、コマンド/ステ
ータス・レジスタCN5Tにエラーコードをセットして
(ステップ[相])メインルーチンに戻る。使用されて
いなければ、ポート8の入出力信号の遷移による内部割
込みをイネーブルにする(ステップ[相])。
If there is no error, first, it is checked whether the input data specifies that the task that is in the stopped state is made ready (restarted) by the input signal (external event) from port 8 (step [ phase]). If no external event is specified, skip to step @ processing. If specified, checks whether another task is already using the external event (
Step [phase]), if used, sets an error code in command/status register CN5T (step [phase]) and returns to the main routine. If not used, enable internal interrupts due to transitions of input/output signals of port 8 (step [phase]).

すなわち、本コマンド5の入力データ設定によりkL棟
Xベントか齢の浴中が可能でネス−そして、スキップし
た場合を含めて次に、そのタスク制御ブロックTCB中
のRUNフラグ(指定したタスクが実行状態にある場合
)またはREADYフラグ(レディー状態にある場合)
をり、 セットし、5USPENDフラグをセットする
(ステップ0)。終われば、コマンド/ステータス・レ
ジスタCN5Tに正常終了コードをセットする(ステッ
プ[相])。そして指定されたタスクがレディー状態に
ある場合を考慮して、このタスクをレディーQから切離
し、レディーQに接続されているタスク制御ブロックT
CBを再度優先度順にならび換え(ステップO)、実行
状態のタスクとレディーQの先頭に接続されているタス
クの優先度を比較するためのTSKCHGフラグをセッ
トして(ステップ[相])、メインルーチンに戻る。
In other words, by setting the input data of this command 5, it is possible to perform bathing in the kL building ) or the READY flag (if it is in the ready state)
and set the 5USPEND flag (step 0). Once completed, a normal completion code is set in the command/status register CN5T (step [phase]). Then, considering the case where the specified task is in the ready state, this task is separated from the ready Q, and the task control block T connected to the ready Q is
The CBs are rearranged again in priority order (step O), the TSKCHG flag is set to compare the priorities of the running task and the task connected to the beginning of ready Q (step [phase]), and the main Return to routine.

コマンド6(コマンド名: TPRI 、第13図フロ
ーチャート)は、入力データで指定された番号のタスク
の優先度を変更するコマンドである。
Command 6 (command name: TPRI, flowchart in FIG. 13) is a command for changing the priority of the task number specified by the input data.

入力データにエラーがあるかの検査(ステップ◎)にお
いて、エラーがある場合はコマンド/ステータス会レジ
スタCN5Tにエラーフードをセットして(ステップ@
)メインルーチンに戻る。
In checking whether there is an error in the input data (step ◎), if there is an error, set the error hood in the command/status register CN5T (step @
) Return to main routine.

エラーがない場合、指定されたタスクのタスク制御ブロ
ックTCB内の優先度■(第3図参照)を入力データの
変更優先度の値に書換える(ステップ@)。次に、レデ
ィーQに接続されているタスク制御ブロックTCBを優
先度順にならび換え(ステップ@))、コ々ンド/ステ
ータス番レジスタCN5Tに正常終了コードをセットす
る(ステップ@)。そして、実行状態のタスクとレディ
ーQの先頭に接続されているタスクの優先度を比較する
ためにTSKCHGフラグをセットして(ステップ@)
、メインルーチンに戻る。
If there is no error, the priority ■ (see FIG. 3) in the task control block TCB of the designated task is rewritten to the value of the changed priority of the input data (step @). Next, the task control blocks TCB connected to the ready Q are rearranged in priority order (step @)), and a normal completion code is set in the command/status number register CN5T (step @). Then, set the TSKCHG flag to compare the priorities of the running task and the task connected to the beginning of ready Q (step @).
, return to the main routine.

コマンド7(コマンド名:TSLI 、第14図フロー
チャート)は、入力データで指定された優先度を持つタ
スク群のマスクCPU占有時間を制限するためのコマン
ドである。すなわち、このコマンドは同一優先度のタス
クの時分割処理を指定する。時分割処理は、指定した優
先度より高い優先度を持つレディー状態のタスクが存在
しない場合に限り有効である。より高い優先度を持つレ
ディー状態のタスクが存在すれば、そのタスクが実行さ
れ時分割処理は無効となるが、高い優先度のタスクがな
(なれば有効となる。
Command 7 (command name: TSLI, flowchart in FIG. 14) is a command for limiting the mask CPU occupation time of a task group having a priority specified by input data. That is, this command specifies time-sharing processing of tasks with the same priority. Time-sharing processing is effective only when there is no ready task with a higher priority than the specified priority. If there is a task in the ready state with a higher priority, that task will be executed and time-sharing processing will be disabled, but if there is no task with a higher priority, then it will be enabled.

このコマンド7が実行されると、まず、入力データのエ
ラーが検査される(ステップ0)。エラーが検出された
場合は、コマンド/ステータス・レジスタCN5Tにエ
ラーコードがセットされ(ステップ@)、メインルーチ
ンに戻る。
When this command 7 is executed, first, the input data is checked for errors (step 0). If an error is detected, an error code is set in the command/status register CN5T (step @) and the process returns to the main routine.

エラーが検出されなければ、入力データが時分割処理を
キャンセルする指定であるのかどうかを判定するー(ス
テップ@)。キャンセルの場合は、内部演算制御回路C
0NT内にある時分割制御用レジスタ5LICNTおよ
びSL I PRIを10″クリアする(ステップ[相
]、o)。入力データが新たに時分割処理の設定を指定
する場合は、その入力データからタスクのCPU占有時
間を制御用レジスタS L I CNTに設定しくステ
ップ0)、時分割処理を行なうタスクの優先度をもう一
つの制御用レジスタ5LIPRIに設定する(ステップ
0)。
If no error is detected, it is determined whether the input data is a specification for canceling time-sharing processing (step @). In case of cancellation, internal arithmetic control circuit C
Clear the time division control registers 5LICNT and SL I PRI in 0NT to 10'' (step [phase], o). If the input data specifies new time division processing settings, the task is The CPU occupation time is set in the control register SL I CNT (step 0), and the priority of the task that performs time-sharing processing is set in another control register 5LIPRI (step 0).

そして最後にコマンド/ステータス・レジスタCN5T
に正常終了コードをセットして(ステップ■)メインル
ーチンに戻る。
And finally the command/status register CN5T
Set the normal completion code to (step ■) and return to the main routine.

コマンド8(コマンド名:C3ET、第15図フローチ
ャート)は、マルチ・タスク制御素子11〜1m内に設
けられた時計に時刻を設定するためのコマンドである。
Command 8 (command name: C3ET, flowchart in FIG. 15) is a command for setting the time on the clock provided in the multi-task control elements 11 to 1m.

マスタCPU2から制御素子1.〜1m内のコマンド・
パラメータ・レジスタCPIOに、入力データとして時
2分1秒データを書込みコマンドを実行する。
From master CPU2 to control element 1. ~ Commands within 1m
Write hour 2 minutes 1 second data as input data to parameter register CPIO and execute the command.

入力データのエラーが検査されて(ステップΦ)、エラ
ーが検出された場合はコマンド/ステータス・レジスタ
CN5Tにエラーコードがセットされて(ステップ[相
])、メインルーチンに戻る。
The input data is checked for errors (step Φ), and if an error is detected, an error code is set in the command/status register CN5T (step [phase]), and the process returns to the main routine.

エラーがなければ、システム・クロック領域SCAに時
2分1秒のデータが移される(ステップO)。そしてコ
マンド/ステータス・レジスタCN5Tに正常終了コー
ドをセットして(ステップ0)メインルーチンに戻る。
If there is no error, data for hours 2 minutes and 1 second is transferred to the system clock area SCA (step O). Then, a normal completion code is set in the command/status register CN5T (step 0) and the process returns to the main routine.

この時計は後述するタイマ割込みルーチンにより刻々計
時される。
This clock is kept ticking by a timer interrupt routine to be described later.

コマンド9(コマンド名=CGET、第16図フローチ
ャート)は、上記の時計から現在の時刻を読出すための
コマンドである。
Command 9 (command name=CGET, flowchart in FIG. 16) is a command for reading the current time from the above clock.

このコマンド9が実行されると、システム・クロック領
域SCAから時1分1秒のデータが、マスクCPU2か
らアクセス可能なコマンド・パラメータ・レジスタCP
IOに移される。移した後はコマンド/ステータス・レ
ジスタCN5Tに正常終了コードをセットして(ステッ
プ[相])メインルーチンに戻る。
When this command 9 is executed, the hour 1 minute 1 second data from the system clock area SCA is transferred to the command parameter register CP accessible from the mask CPU 2.
Moved to IO. After the transfer, a normal completion code is set in the command/status register CN5T (step [phase]) and the process returns to the main routine.

コマンド10(コマンド名:MALC,第17図フロー
チャート)は、マルチ・タスク制御素子11−1mが管
理しているワーク・メモリ領域の中から、コマンドを実
行したタスクに対して要求されたサイズのワーク・メモ
リの使用を許可するコマンドである。コマンド曝パラメ
ーターレジスタCPIOに要求するワーク・メモリ数(
256バイト単位)を書込みコマンドを実行する。
Command 10 (command name: MALC, flowchart in FIG. 17) is to select a work of the size requested by the task executing the command from the work memory area managed by the multi-task control element 11-1m. - This is a command that allows the use of memory. The number of work memory required for the command exposure parameter register CPIO (
256-byte unit) and execute the write command.

コマンド10が実行されると、入力データのエラー検出
が行なわれる(ステップ[相])。エラーが検出されれ
ば、コマンド/ステータス・レジスタCN5Tにエラー
コードをセットして(ステップO)メインルーチンに戻
る。
When command 10 is executed, error detection of input data is performed (step [phase]). If an error is detected, an error code is set in the command/status register CN5T (step O) and the process returns to the main routine.

エラーが検出されなければ、メモリ・マツプMEMMA
Pを調査し、要求されたワーク・メモリが空いているか
どうかのチェックを行なう(ステップ[相])。空き領
域がなければコマンド/ステータス・レジスタCN5T
にメモリ占有不可コードをセットして(ステップo)、
メインルーチンに戻る。空き領域が見つかれば、コマン
ドを実行したタスクが要求したサイズだけメモリ魯マツ
プMEMMAP上の対応したビットに”1″′をセット
する(ステップ・)。そして、コマンドを実行したタス
クのタスク制御ブロックTCB内の占有メモリ先頭アド
レス■および占有メモリ・サイズ■の領域(第3図参照
)にそれぞれの値を設定しくステップ[相])、次にコ
マンドΦパラメータ・レジスタCPIOに占有メモリ・
先頭アドレスを書込む(ステップO)。書込まれれば、
コマンド/ステータス・レジスタCN5Tに正常終了コ
ードをセットしくステップ[相])メインルーチンに戻
る。
If no errors are detected, the memory map MEMMA
Examine P and check whether the requested work memory is free (step [phase]). If there is no free space, command/status register CN5T
Set a memory-unoccupied code to (step o),
Return to main routine. If a free area is found, the corresponding bit on the memory map MEMMAP is set to "1" by the size requested by the task that executed the command (step). Then, set the respective values in the occupied memory start address ■ and occupied memory size ■ areas (see Figure 3) in the task control block TCB of the task that executed the command (step [phase]), then command Φ Occupied memory for parameter register CPIO
Write the start address (step O). If written,
Set the normal completion code in the command/status register CN5T and return to the main routine.

コマンド11(コマンド名:MREL、第18図フロー
チャート)は、占有していたワーク・メモリ領域を解放
するためのコマンドである。
Command 11 (command name: MREL, flowchart in FIG. 18) is a command for releasing the occupied work memory area.

コマンド11を実行したタスクがワーク拳メモリを占有
していなければ(ステップO)、コマンド/ステータス
・レジスタCN5Tにエラーコードをセットして(ステ
ップ[相])メインルーチンに戻る。
If the task that executed command 11 does not occupy the work memory (step O), an error code is set in the command/status register CN5T (step [phase]) and the process returns to the main routine.

既ニワーク・メモリが占有されていれば、コマンドを実
行したタスクのタスク制御ブロックTCB内に登録され
ている占有メモリ先頭アドレス■および占有メモリ・サ
イズ■の領域の値を参照し、メモリ・マツプMEMMA
P上の対応したビットを′0”にリセットする(ステッ
プ@)。そして、タスク制御ブロックTCB内の占有メ
モリ先頭アドレス■及び占有メモリ・サイズOの領域を
クリアする(ステップ[相])。最後にコマンド/ステ
ータス・レジスタCN5Tに正常終了コードをセットし
て(ステップ@)、メインルーチンに戻る。
If the new work memory is already occupied, the memory map MEMMA is created by referring to the values of the occupied memory start address ■ and occupied memory size ■ registered in the task control block TCB of the task that executed the command.
The corresponding bit on P is reset to '0' (step @).Then, the occupied memory start address ■ and the area of occupied memory size O in the task control block TCB are cleared (step [phase]).Final A normal completion code is set in the command/status register CN5T (step @), and the process returns to the main routine.

上述のようにタスクからメモリを要求する場合には、マ
ルチ・タスク制御素子II 〜1mに対しテコマント1
0(メモリ占有コマンl’、MALC)を実行する。ま
た、タスクが使用していたメモリが不要になり解放した
い場合には、コマンド11(メモリ解放コマンド、MR
EL)を実行する。
As mentioned above, when requesting memory from a task, the multi-task control element II ~ 1m requires Tecomant 1.
0 (memory exclusive command l', MALC) is executed. Also, if the memory used by a task is no longer needed and you want to release it, use command 11 (memory release command, MR
Execute EL).

このようにマルチ・タスク制御素子11〜1mは、これ
らコマンド10.11によって、予じめ登録された64
にバイトまでのワーク用メモリ領域を256バイト単位
で使用中か否かを判断し、タスクから要求されたサイズ
の空き領域を探し出して、タスクに割付ける機能を有す
る。
In this way, the multi-task control elements 11 to 1m can control the pre-registered 64 by using these commands 10.11.
It has the function of determining whether the work memory area up to 2 bytes is in use in units of 256 bytes, searching for a free area of the size requested by the task, and allocating it to the task.

この機能は、限られたメモリ空間を複数のタスクで有効
に利用するのに効果を発揮し、またお互いのタスク間で
同一メモリ領域を重複して使用することを防止するのに
役立つ。なお、マルチ・タスク制御素子11〜1mへの
ワーク・メモリ領域の設定は、各マルチ・タスク制御素
子11〜1mの初期設定時(コマンド0の実行時)に行
なわれス− コマンド12(コマンド名: PO8T 、第19図フ
ローチャート)は、マルチ・タスク制御素子11〜1m
内に設けられたメイルボックスMBXと呼ばれるメモリ
領域に、データを送るためのコマンドである。メイルボ
ックスMBXはこのコマンド12を実行したタスクと同
−素子管理内の別タスク(次に説明するコマンド13実
行)とのメツセージ中継点となる。5個のメイルボック
スMBXI〜MBX5中の1個を指定できる。コマンド
・パラメータ・レジスタCPIOに使用するメイル・ボ
ックスMBXの番号、および指定したメイル・ボックス
MBXへ送るデータを書込み、コマンドを実行する。
This function is effective in effectively utilizing limited memory space among multiple tasks, and is also useful in preventing multiple tasks from using the same memory area overlappingly. The setting of the work memory area for the multi-task control elements 11 to 1m is performed at the time of initial setting of each multi-task control element 11 to 1m (when executing command 0). : PO8T, flowchart in Fig. 19), multi-task control elements 11 to 1m
This is a command to send data to a memory area called mailbox MBX provided within the mailbox. The mailbox MBX serves as a message relay point between the task that executed this command 12 and another task within the same element management (execution of command 13, which will be explained next). One of the five mailboxes MBXI to MBX5 can be specified. The number of the mail box MBX to be used and the data to be sent to the designated mail box MBX are written in the command parameter register CPIO, and the command is executed.

コマンド12が実行されると、入力データのエラーを検
査しくステップ@)、エラーが検出されればコマンド/
ステータス拳レジスタCN S T ニエラーコードを
セットして(ステップ@)メインルーチンに戻る。
When command 12 is executed, the input data is checked for errors (step @), and if an error is detected, the command/
Set the status register CN S T error code (step @) and return to the main routine.

エラーが検出されなければ、送信データを指定された番
号のメイル・ボックスMBXに書込む(ステップ[相]
)。そして次に、既にコマンド13が実行され、コマン
ド12の実行によってデータが指定のメイル・ボックス
MBXに送られてくるのを待っているタスクがあるかど
うかを調査する(ステップ[相])。これはすべてのタ
スクのタスク制御ブロックTCB内゛のタスク−ステー
タ■中、のPENDWフラグおよびメイルボックス番号
0とを参照して行なわれる。もし送信待ちのタスクがな
い場合はステップ[相]ヘスキップする。送信待ちのタ
スクがある場合(本実施例では1個のみを許している)
は、送信待ちのタスクのタスク制御ブロックTCB内の
PENDWフラグをリーセット、またREADYフラグ
をセットし、レディーQを優先度順に接続しなおす(ス
テップ[相])。
If no error is detected, write the transmitted data to the mail box MBX with the specified number (step [phase]
). Next, it is checked whether there is a task that has already executed command 13 and is waiting for data to be sent to the specified mail box MBX by executing command 12 (step [phase]). This is done by referring to the PENDW flag and mailbox number 0 in the task status 1 in the task control block TCB of all tasks. If there is no task waiting to be sent, skip to step [phase]. When there is a task waiting for transmission (only one is allowed in this example)
resets the PENDW flag in the task control block TCB of the task waiting for transmission, sets the READY flag, and reconnects the ready Qs in priority order (step [phase]).

そして送信待ちのタスクがある場合、ない場合共に、コ
マンド/ステータス・レジスタCN5Tに正常終了コー
ドをセット(ステップ[相])、さらにTSKCHG 
フラグをセットして(ステップ0)メインルーチンに戻
る。
Then, whether there is a task waiting for transmission or not, a normal completion code is set in command/status register CN5T (step [phase]), and TSKCHG
Set the flag (step 0) and return to the main routine.

コマンド13(コマンド名:PEND、第20図フロー
チャート)は別タスクより、指定したメイル・ボックス
MBXを介してデータを受け取るコマンドである。コマ
ンド・パラメータeレジスタCPIOにデータを受け取
るメイル・ボックスMBXの番号を書込みコマンドを実
行する。コマンド18が実行されると、まず入力データ
のエラー検査が行なわれ(ステップ[相])、エラーが
あれハコマント/ステータス・レジスタCN5Tにエラ
ーコードをセットして(ステップ[相])、メインルー
チンに戻る。
Command 13 (command name: PEND, flowchart in FIG. 20) is a command to receive data from another task via the specified mail box MBX. Write the number of the mail box MBX that receives data into the command parameter e register CPIO and execute the command. When command 18 is executed, the input data is first checked for errors (step [phase]), and if there is an error, an error code is set in the box mant/status register CN5T (step [phase]), and the process returns to the main routine. return.

エラーが検出されなければ、指定したメイル・ボックス
MBXにデータが既に書込まれているかどうかチェック
する(ステップ[相])。もし書込まれていなければ、
’RUNフラグをリセット。
If no error is detected, it is checked whether data has already been written to the designated mail box MBX (step [phase]). If it is not written,
'Reset RUN flag.

PENDWフラグをセットしくステップ[相])、また
TSKCHG フラグをセットする(ステップO)。
Set the PENDW flag (step [phase]), and set the TSKCHG flag (step O).

そして、次に、コマンド/ステータス・レジスタCN5
Tにデータ未着コードをセットしくステップ・)、メイ
ンルーチンに戻る。既にデータが書込まれていれば、コ
マンドφパラメータ・レジスタCPIOに指定したメイ
ル・ボックスMBXに書込まれているデータを転送しく
ステップ[相])、コマンド/ステータス・レジスタC
N5Tに正常終了コードをセットして(ステップ[相]
)、メインルーチンに戻る。
Then, command/status register CN5
Set the data unarrival code in T (step ) and return to the main routine. If data has already been written, transfer the data written to the mail box MBX specified by the command φ parameter register CPIO.
Set the normal completion code to N5T (step [phase]
), return to the main routine.

コマンド14(コマンド癲:PMOD、第21図フロー
チャート)は、ポート1とポート2のデータ入出力方向
を設定するコマンドである。コマンド・パラメータ・レ
ジスタCPIOにポート1とポート2との入出力方向を
指定するためのコードを設定してコマンドを実行する。
Command 14 (command description: PMOD, flowchart in FIG. 21) is a command for setting the data input/output direction of port 1 and port 2. A code for specifying the input/output direction of port 1 and port 2 is set in the command parameter register CPIO, and the command is executed.

pマント−パラメータ・レジスタCPIOに設定された
コードに基づきポート1とポート2の入出力方向を指定
しくステップO)、コマンド/ステータス・レジスタC
N5Tに正常終了コードをセットして(ステップO)、
メインルーチンに戻る。
pmant - Specify the input/output direction of port 1 and port 2 based on the code set in parameter register CPIO.Step O), command/status register C
Set the normal completion code to N5T (step O),
Return to main routine.

タスクから発行された上記任意のコマンド0〜14の処
理ルーチンを実行し、第6図のメインルー壬ンlr巨ス
に−すずコマンド/ステータス拳レジスタCN5Tにエ
ラーコードがセットされているかどうかの判定を行なう
(ステップ[相])。エラーコードがセットされていれ
ばステップ[相]ヘスキップし、もしエラーコードがセ
ットされていなければ、次にTSKCHG フラグがセ
ットされているかどうか判定する(ステップ・)。TS
KCHG フラグがII O#であればステップ[相]
ヘスキップし、パ1′″であればタスク切換えルーチン
を実行する(ステップ[相]、タスク切換えルーチンは
第22図のフローチャートに詳しく述べられる)。ステ
ップ[相]またはステップ・からスキップして、あるい
はタスク切換えルーチン(ステップ[相])が実行され
てメインルーチンに戻ると、次のコマンド受は入れ準備
を行ない(ステップ0)、TSKCHG フラグをリセ
ットする(ステップ■)。そして、ステップ■に戻り、
次のコマンド受は入れ待ち状態となる。
Execute the processing routine for the above arbitrary commands 0 to 14 issued from the task, and determine whether an error code is set in the main routine 1r large in Figure 6 - Suzu command/status register CN5T. Do (step [phase]). If the error code is set, skip to step [phase]; if the error code is not set, then it is determined whether the TSKCHG flag is set (step). T.S.
If the KCHG flag is II O#, step [phase]
Skip to step 1''', execute the task switching routine (step [phase], the task switching routine is detailed in the flowchart of FIG. 22); skip from step [phase] or step When the task switching routine (step [phase]) is executed and returns to the main routine, preparations are made to accept the next command (step 0), and the TSKCHG flag is reset (step ■).Then, the process returns to step ■,
The next command reception is in a waiting state.

上記したようにコマンド処理ルーチン’ff5Kc)I
Gフラグがセット(1”)されれば、タスク切換えルー
チンを実行する。第22図のフローチャートにおいて、
タスク切換えルーチンに入ると、まずコマンドl(初期
設定終了および実行開始)の実行時かどうかのチェック
を行なう(ステップ[相])。
As mentioned above, the command processing routine 'ff5Kc)I
When the G flag is set (1"), a task switching routine is executed. In the flowchart of FIG.
When entering the task switching routine, a check is first made to see if it is time to execute command l (initialization end and execution start) (step [phase]).

コマンド1の実行時であればステップ@ヘスキップし、
以降の処理により、先にコマンド0(初期設定)で登録
したタスク−の中から、まず、レディーQの先頭に接続
されているタスクのタスク制御ブロックTCBをレディ
ーQから切離しくステップ@)、このタスク制御ブロッ
クTCB内のタスク・スタック・ポインタ■(第3図参
照)の値を新スタック・ポインタ・レジスタSPNに書
込むいテップ■)。そして、タスク制御ブロックTCB
内のタスク−ステータス■にRUNフラグをセットして
(ステップ■))、マスタCPU2に対して割込みを要
求するため、割り込み(IP)フラグをセットして(ス
テップ■)、マスタCPU2からの割り込み応答を待つ
(ステップ(El))。マスタCPU割り込み応答待ち
ルーチンは、第28図で述べる。
When executing command 1, skip to step @,
Through the subsequent processing, first, from among the tasks previously registered with command 0 (initial setting), the task control block TCB of the task connected to the beginning of Ready Q is separated from Ready Q. Step (2) Write the value of the task stack pointer (see FIG. 3) in the task control block TCB to the new stack pointer register SPN. and task control block TCB
Set the RUN flag in the task status ■ (step ■)), set the interrupt (IP) flag to request an interrupt from the master CPU2 (step ■), and receive an interrupt response from the master CPU2. (Step (El)). The master CPU interrupt response waiting routine will be described in FIG.

マスタCPU2は、割り込みを受け付ければ、割り込み
を要求した制御素子に対応したタスク切換え割込みルー
チンにより準備された、新しいタスクのスタック・ポイ
ンタの値を読込み、割込みルーチンのリターンと同時に
、マスタCPU2の管理下においてそのタスクを実行す
る。マスクCPU2におけるタスク切り換えのための割
り込みルーチンは、第28図で詳しく述べる。
When the master CPU 2 receives an interrupt, it reads the value of the stack pointer of the new task prepared by the task switching interrupt routine corresponding to the control element that requested the interrupt, and at the same time as the interrupt routine returns, it manages the master CPU 2. Perform the task below. The interrupt routine for task switching in the mask CPU 2 will be described in detail in FIG.

コマンドlの実行時以外では、タスクが実行状態かどう
か検査される(ステップ[株])。実行状態でない場合
、ステップOヘスキップし、旧スタック・ポインタ・レ
ジスタSPBのデータを、前まで実行状態にあったタス
クのタスク制御ブロックTCB内のタスク・スタック・
ポインタ■領域に書込み、保存する。
At times other than when command l is executed, it is checked whether the task is in the execution state (step [share]). If it is not in the execution state, skip to step O and transfer the data in the old stack pointer register SPB to the task stack in the task control block TCB of the task that was in the execution state before.
Write to the pointer ■ area and save.

その後、コマンドを受け入れた制御素子11〜1mの管
理タスク中に、次に実行可能となるレディー状態のタス
クが存在するかを判断しくステップO)、存在すれば”
LEO(下位素子イネーブル出力)端子をLow”にし
て(ステップO)、下位のマルチ・タスク制御素子の実
行を禁止する。
Thereafter, it is determined whether there is a task in a ready state that can be executed next among the management tasks of the control elements 11 to 1m that have accepted the command.
The LEO (lower element enable output) terminal is set to "Low" (step O) to prohibit execution of the lower multi-task control element.

(初期設定時、LEO端子は“l L owIIにしで
ある。)もし、レディー状態のタスクが存在しなければ
、LEO端子を“High”にして(ステップO)、下
位のマルチ・タスク制御素子の割り込みを許可し、下位
の素子や管理下にあるタスクを実行可能にする。自分自
身は、ステップ■、Oをループして、レディ・タスクが
出現するまで待機する。
(At initial setting, the LEO terminal is set to "l Low II.") If there is no task in the ready state, the LEO terminal is set to "High" (step O) and the lower multi-task control element is Enables interrupts and enables execution of subordinate elements and tasks under management.The program itself loops through steps 2 and 0 and waits until a ready task appears.

同一素子の管理下のすべてのタスクが停止または待機状
態で、レディ・タスクが存在しない状態からレディ・タ
スクが出現するのは、本実施例では、コマンド5(TS
PD)によって外部イベント起動を指定していたタスク
が、ボート3の遷移により起動がかかり、レディー状態
になる場合である。
In this embodiment, a ready task appears from a state where all tasks under the control of the same element are stopped or in a standby state and no ready task exists. In this embodiment, command 5 (TS
This is a case where a task that has been designated to be activated by an external event (PD) is activated due to the transition of the boat 3 and becomes ready.

レディ・タスクが存在した場合、および存在せずにレデ
ィ・タスクが出現するまで待機していた場合もともに、
続いてステップ■〜C9■の処理を通して、別のタスク
を実行させる目的で。
Both when a ready task exists and when a ready task does not exist and is waiting until a ready task appears.
Subsequently, through the processing of steps ■ to C9■, the purpose is to execute another task.

マルチ・タスク制御素子11〜1mからマスタCPU2
に対して割り込みを要求するため、割り込み(IP)フ
ラグをセットし、マスタCPU2からの応答を待つ。割
り込みが受け付けられれ、ば、割り込みが発生し、本制
御素子11〜1mの管理下にあるタスクへの切り換えが
行われる。
From the multi-task control elements 11 to 1m to the master CPU 2
In order to request an interrupt from the master CPU 2, an interrupt (IP) flag is set and a response from the master CPU 2 is waited. If the interrupt is accepted, an interrupt is generated and switching to a task under the control of the control elements 11 to 1m is performed.

ここで、第23図のマスタCPU割り込み応答待ちルー
チンを説明する。それぞれマルチ・タスク制御素子11
〜1mの内部で割り込み(IP)フラグがセットされて
も、即マスタCPU2に対して割り込みがかかるとは限
らない。IPフラグがセットされて、割り込み信号IN
Tが“Low”になるのは、素子のIEI入力端子が”
High”の場合に限られる(第27図参照)。
The master CPU interrupt response wait routine shown in FIG. 23 will now be explained. Multi-task control element 11, respectively.
Even if the interrupt (IP) flag is set within ~1m, an interrupt is not necessarily applied to the master CPU 2 immediately. The IP flag is set and the interrupt signal IN
T becomes “Low” because the IEI input terminal of the element is “Low”.
"High" (see FIG. 27).

ところで、マルチ・タスク制御素子11〜1mには、各
素子間の割り込みを制御するために、IEI (割り込
みイネーブル入力)端子およびIEO(割り込みイネー
ブル出力)端子が備えられている。IEO端子はIEI
端子が”Low”の場合、およびIEI端子力(”Hi
gh”でしかも割り込み処理を実行している場合にIt
 L Ow jlになる端子である。また、LEO(下
位素子イネーブル出力)端子は上述のように、各素子が
自分の管理下のタスク中に、実行中またはレディー状態
のタスクが存在する場合、”L、o w”になる端子で
ある。
Incidentally, the multi-task control elements 11 to 1m are provided with an IEI (interrupt enable input) terminal and an IEO (interrupt enable output) terminal in order to control interrupts between the respective elements. IEO terminal is IEI
When the terminal is “Low” and IEI terminal force (“Hi”
It
This is the terminal that becomes L Ow jl. In addition, as mentioned above, the LEO (lower element enable output) terminal is a terminal that becomes "L, o w" when there is a task in execution or ready status among the tasks under each element's control. be.

(尚、マルチ・、タスク制御素子11〜1mは、これら
端子により第27図のようにカスケード接続されている
ものとする。)そのため、第22図のステップ■におい
てIPフラグをセットした後、23図参照)に入って、
割り込みが受け付けられたかどうかを判断する(ステッ
プO)。割り込セットされる。上位のマルチ・タスク制
御素子に実行可能なタスクが存在しなければ、割り込み
は即座に受け付けられる。しかし、存在すれば割り込み
は受け付けられず、IRTDSフラグをセットして(ス
テップ■))、上位のマルチ・タスク制御素子管理下の
実行可能なタスクがな(なる。即ち割り込みが受け付け
られるまで、ステップ○。
(It is assumed that the multi-task control elements 11 to 1m are connected in cascade through these terminals as shown in FIG. 27.) Therefore, after setting the IP flag in step 2 of FIG. (see figure).
It is determined whether the interrupt has been accepted (step O). Interrupt is set. If there is no executable task in the upper multi-task control element, the interrupt is immediately accepted. However, if the interrupt exists, the interrupt is not accepted, and the IRTDS flag is set (step ■)). ○.

■をループして待機する。割り込みが受け付けられれば
、IRTDSフラグをリセットして(ステップ0))、
リターンする。
■Loop and wait. If the interrupt is accepted, reset the IRTDS flag (step 0),
Return.

第22図のステップ[相]の判断において、タスクが実
行状態(RUN状態)であれば、時分割処理のタイム・
アップ時間かどうか検査される(ステップ[相])。時
分割処理指定のタスクがタイム・アップした時にはステ
ップ[相]ヘスキップする。このスキップルーチンは後
に説明する第25図フローチャートのタイマ割込み処理
中でしか通らない。
In the judgment of step [phase] in Fig. 22, if the task is in the execution state (RUN state), the time
Up time is checked (step [phase]). When the time is up for a task specified for time-sharing processing, it skips to step [phase]. This skip routine is executed only during timer interrupt processing in the flowchart of FIG. 25, which will be explained later.

タイム・アップ時でなければ、レディーQに接続されて
いるタスクがあるかどうかの検査を行なう(ステップ[
相])。なければ、すなわち現在実行状態のタスク以外
に実行待ち(レディー)状態のタスクがなければ、第6
図のメインルーチンに戻る。レディーQに接続されてい
るタスクがあれば、次に実行状態のタスクの優先度とレ
ディーQの先頭に接続されているタスクの優先度とを比
較する(ステップ[相])。実行状態のタスクの優先度
の方が高ければ、同じく第6図のメインルーチンに戻る
。ステップ[相]、[相]でメインルーチンに戻れば、
割込みが発生されず、現在実行中のタスクがそのまま実
行を続行することとなる。
If the time is not up, check whether there is a task connected to Ready Q (step [
phase]). If there is no task in the execution waiting (ready) state other than the task currently in the execution state, the sixth
Return to the main routine shown in the figure. If there is a task connected to the ready Q, then the priority of the task in the execution state is compared with the priority of the task connected to the beginning of the ready Q (step [phase]). If the priority of the task in the execution state is higher, the process returns to the main routine shown in FIG. 6 as well. If you return to the main routine with steps [phase] and [phase],
No interrupt is generated, and the currently executing task continues to execute.

レディーQの先頭に接続されているタスクの優先度の方
が高ければ、実行中のタスクのタスク制御ブロックTC
BをレディーQに接続するとともに、RUNフラグをリ
セットする(ステップ[相])。
If the priority of the task connected to the beginning of ready Q is higher, the task control block TC of the task being executed is
Connect B to ready Q and reset the RUN flag (step [phase]).

そして、旧スタック・ポインターレジスタSPBのデー
タをタスク・制御ブロックTCBのタスク・スタック・
ポインタ[有]領域に保存しくステップ[相])、以降
のステップ0−e)の処理を通して割込みを発生させる
。なお、ステップ■〜C)において、新しく実行状態と
なる別のタスクは、前述したようにレディーQの先頭に
接続されているタスクで、コマンド実行等により最も優
先度が高(なったタスクである。割込みを要求した後、
マスタCPU2により割り込みが受け付けられた後は、
第6図のメインルーチンに戻す、次のコマンド受は入れ
準備を行なう(第6図ステップ[相])。
Then, the data of the old stack pointer register SPB is transferred to the task stack of the task control block TCB.
It is stored in the pointer [existence] area and an interrupt is generated through the processing of step [phase]) and subsequent steps 0-e). In addition, in Steps - C), the other task that newly enters the execution state is the task that is connected to the beginning of Ready Q as described above, and is the task that has the highest priority (has become the highest priority due to command execution, etc.). .After requesting an interrupt,
After the interrupt is accepted by master CPU2,
Returning to the main routine in FIG. 6, preparations are made to receive the next command (step [phase] in FIG. 6).

第24図、第25図、第26図は第6図のメインルーチ
ンに対する割込み処理ルーチンのフローチャートである
24, 25, and 26 are flowcharts of the interrupt processing routine for the main routine of FIG. 6.

第24図はポート3への入力による割込み処理で、コマ
ンド5(タスクの停止、第12図フローチャート)によ
って停止状態にあるタスクを外部イベント起動するもの
である。
FIG. 24 shows interrupt processing by input to port 3, in which a task in a stopped state is activated by an external event by command 5 (stop task, flowchart in FIG. 12).

ポート8に入力されている信号の遷移によってこのルー
チンが起動される。このルーチンでは、コマンド5で外
部イベ〉ト起動を設定しているタスクのタスク制御ブロ
ックTCBを優先度順でレディーQに接続しくステップ
唾■)、そのタスク制御ブロックTCB内の5USPE
NDフラグをリセット、READYフラグをセットする
(ステップφつ)。すなわち、これによって停止状態の
タスクが再起動可能状態となるわけで、これが終れば割
込み処理ルーチンからリターンする。
This routine is activated by the transition of the signal input to port 8. In this routine, the task control block TCB of the task for which external event activation is set with command 5 is connected to the ready Q in order of priority.
Reset the ND flag and set the READY flag (step φ). That is, this enables the stopped task to be restarted, and once this is completed, the interrupt processing routine returns.

第25図はタイマによる割込み処理で、第2図のタイマ
TMからの信号を内部割込み信号として、これが一定時
間単位で発生するとタイマ割込み処理ルーチンに入る。
FIG. 25 shows interrupt processing by a timer. The signal from the timer TM in FIG. 2 is used as an internal interrupt signal, and when this occurs in fixed time units, a timer interrupt processing routine is entered.

タイマTMから内部割込み信号が発生すると、まず、シ
ステム・クロック領域SCAに登録されている時計の値
(時1分1秒のデータ)を進める(ステップO)。
When an internal interrupt signal is generated from the timer TM, first, the clock value (hour 1 minute 1 second data) registered in the system clock area SCA is advanced (step O).

次ニ、IRTDSフラグ(第23図参照)をチェックし
て、タスク切り換えのための割り込みがマスタCPU2
に受け付けられているか判定する(ステップe)。″も
し、IRTDSフラグがセットされていれば、即ち割り
込みが受け付けられていなければ、そのままリターンす
る。IRTDSフラグがリセットされていれば、時分割
処理のチェックに入る(ステップ■)。つまり、ステッ
プ(917)判定は、警13図のマスタCPU割り込み
応答待ちルーチン中の割り込み受け付は待ち(ステップ
@、 (E;) )、または第22図のタスク切り換え
ルーチン中のレディ・タスク待ち(ステップ■、■)の
状態であっても、システム・クロック領域SCAのカウ
ントを正常に行うためのものである。
Next, check the IRTDS flag (see Figure 23) and confirm that the interrupt for task switching is sent to the master CPU2.
It is determined whether the request has been accepted (step e). ``If the IRTDS flag is set, that is, if the interrupt is not accepted, return directly. If the IRTDS flag is reset, check the time-sharing processing (step ■). In other words, step ( 917) Judgment: Wait for interrupt acceptance in the master CPU interrupt response wait routine in Figure 13 (step @, (E;)) or wait for ready task in the task switching routine in Figure 22 (step ■, This is to ensure that the system clock area SCA can be counted normally even in the state (2).

ステップ〔)では、コマンド7(タスクの時分割処理の
設定、第7図フローチャート)で設定されたレジスタS
L I PRI に登録されている優先度と、現在実行
状態のタスクの優先度とを比較する。
In step [), the register S set by command 7 (setting of task time-sharing processing, flowchart in Figure 7) is
The priority registered in L I PRI is compared with the priority of the task currently in execution state.

時分割処理は指定した優先度より高いレディー状態のタ
スクが存在しない場合に限り有効である。
Time-sharing processing is effective only when there is no task in a ready state with a higher priority than the specified priority.

より高い優先度を持つレディー状態のタスクが存在すれ
ば、そのタスクが実行され時分割処理は無効となるが、
高い優先度のタスクがな(なれば有効となる。上記ステ
ップeの比較は、レジスタ5LIPRI に登録されて
いる優先度のタスクが実行中であるかどうか検査するこ
とと同等であり、時分割処理指定タスクが実行状態にな
い場合は直ちに割込み処理ルーチンからリターンする。
If there is a ready task with a higher priority, that task will be executed and time-sharing processing will be disabled.
It becomes valid if there are no tasks with a high priority.The comparison in step e above is equivalent to checking whether the task with the priority registered in the register 5LIPRI is being executed, and time-sharing processing is performed. If the specified task is not in the execution state, immediately return from the interrupt processing routine.

レジスタ5LIPRI に登録されている優先度と現在
実行状態のタスクの優先度と一致、つまり、現在実行状
態のタスクが時分割処理指定のタスクであれば、レジス
タ5LICNTで登録されている時間が経過したかどう
かの判定を行なう(ステップC)。経過していなければ
、この割込み処理ルーチンからリターンする。すなわち
、マルチ・タスク制御素子11〜1mはメインルーチン
に戻り次のコマンド受は込れ待ち状態となり、マスタC
PU2は時分割処理指定の現在実行状態にあるタスクを
続けて実行する。
If the priority registered in register 5LIPRI matches the priority of the currently running task, that is, if the currently running task is a task specified for time-sharing processing, then the time registered in register 5LICNT has elapsed. It is determined whether or not (step C). If the elapsed time has not elapsed, return from this interrupt processing routine. That is, the multi-task control elements 11 to 1m return to the main routine and enter a waiting state for receiving the next command, and the master C
The PU2 continues to execute the task currently in the execution state specified by the time-sharing process.

登録された時間が経過したときは、実行状態のタスクの
タスク制御ブロックTCBをレディーQの末尾に接続す
るとともに、RUNフラグをリセット、READYフラ
グをセットしくステップCD)、第22図のタスク切換
えルーチンをコールする(ステップO)。
When the registered time has elapsed, connect the task control block TCB of the task in execution state to the end of ready Q, reset the RUN flag, and set the READY flag (step CD), the task switching routine shown in FIG. (Step O).

第22図フローチャートにおいて、時分割処理指定のタ
スクがタイム・アップした場合は、ステップ[相]から
ステップ[相]ヘスキップする。そして、ステップ[相
]〜■の処理を行なう。これらによって前まで実行状態
にあったタスクのタスク・スタック・ポインタ■領域に
旧スタック・ポインタ・レジスタSPBのデータを保存
する(ステップ[相])。
In the flowchart of FIG. 22, when the time is up for a task designated for time-sharing processing, the process skips from step [phase] to step [phase]. Then, the processes of steps [phase] to (2) are performed. As a result, the data of the old stack pointer register SPB is saved in the task stack pointer area of the task that was previously in the execution state (step [phase]).

次に、ステップO1■を経て、時分割処理に指定された
同じ優先度を持つタスクのタスク制御ブロックTCBを
レディーQから切離しくステップ■)、このタスク制御
ブロックTCB内のタスク・スタック・ポインタ■領域
のデータを新スタック・ポインタ・レジスタSPNに書
込む(ステップe)。そして最後にタスク・ステータス
■にRUNフラグをセットする(ステップO)。
Next, through step O1■, the task control block TCB of the task with the same priority specified for time-sharing processing is separated from ready Q (step ■), and the task stack pointer in this task control block TCB is Write the data of the area to the new stack pointer register SPN (step e). Finally, the RUN flag is set in the task status ■ (step O).

こうしたタスク切換えルーチンを行なったのち割込みか
らリターンする。マスクCPtJ2では上述したマルチ
・タスク制御素子11〜1mの動作により、時分割処理
に指定した別のタスクを実行することとなる。
After performing such a task switching routine, the program returns from the interrupt. In the mask CPtJ2, another task designated for time-sharing processing is executed by the operations of the multi-task control elements 11 to 1m described above.

第26図は、IEI端子の立ち下がりで内部割り込みが
発生した際の処理のフローチャートである。
FIG. 26 is a flowchart of processing when an internal interrupt occurs at the falling edge of the IEI terminal.

第27図のように接続された複数のマルチ・タスク制御
素子11〜1mの中で、下位の制御素子(これをILと
呼ぶ)の管理下のタスクが実行中に、上位の制御素子(
これをIHと呼ぶ)の管理下のタスクの中にレディー状
態のタスクが出現した際、上位の制御素子IHがLEO
端子をLL0w 11にする(第22図−ステップ(I
FI))ために、その素子IHより下位のものはすべて
IE1入力およびIEO出力がIt L 0WIIとな
り、内部でI’EI割り込みが発生する。
Among the plurality of multi-task control elements 11 to 1m connected as shown in FIG.
When a task in the ready state appears among the tasks under the control of the IH (this is called an IH), the upper control element IH
Set the terminal to LL0w 11 (Figure 22 - Step (I)
FI)) Therefore, the IE1 input and IEO output of all elements lower than that element IH become It L 0WII, and an I'EI interrupt is generated internally.

この時、制御素子IHとILの間にある素子は、RUN
状態のタスクをもたないためそのままリターンする(ス
テ゛ツブO)。ただし、制御素子lLは、実行中9タス
クが存在するため、ステラmに進み割り込み(IP)フ
ラグをセットしくステップ■)、マスタCPU割り込み
応答待ちルーチンに入る(ステップ■)。この時点で、
上位の制御用素子IHはIEO端子を“Low”にした
後(第22図参照)、ステップ■〜■、■を経て割り込
みを発生する。制御素子lHは、その時点では最上位に
あるため、この割り込みは即座に受け付けられ、素子I
Hの管理下にあるタスクに実行が移る。そして、素子I
Lの管理下の実行中であったタスクは、本来なら実行状
態にあるにもかかわらず実行が中断される。゛ 実行が再開されるのは、素子ILより上位の素子の管理
下のタスク中でレディー状態のものがなくなり(第22
図・ステップ○、■)、素子ILのIEI端子が°’H
igh”になるまでである。
At this time, the element between the control elements IH and IL is RUN.
Since there is no task in the state, it returns as is (Step O). However, since there are 9 tasks currently being executed, the control element 1L proceeds to Stella m to set the interrupt (IP) flag (step 2), and enters the master CPU interrupt response waiting routine (step 2). at this point
After the upper control element IH sets the IEO terminal to "Low" (see FIG. 22), it generates an interrupt through steps (1) to (2) and (2). Since the control element IH is at the top level at that point, this interrupt is immediately accepted and the control element IH
Execution moves to the task under the control of H. And element I
The execution of the task being executed under the control of L is interrupted even though it should be in the execution state.゛Execution is resumed when there are no tasks in the ready state among the tasks under the management of an element higher than the element IL (the 22nd task).
Figure/Step ○, ■), IEI terminal of element IL is °'H
until it becomes “high”.

素子ILの内部処理は、ステップ■の割り込み応答待ち
ルーチン中(第28゛図参照)で、ステップe、Cjl
)をループして、IEI端子が“High”になるまで
待機する。IEI端子II H= gh Itになれば
、素子ILの割り込みが受け付けられ、素子IL管理下
の前に実行状態のまま中断されていたタスクが実行を再
開する。
The internal processing of the element IL is performed during the interrupt response wait routine of step (2) (see Figure 28),
) and waits until the IEI terminal becomes "High". When the IEI terminal II H=gh It, an interrupt from the element IL is accepted, and the task that was previously suspended while in the execution state under the control of the element IL resumes execution.

このようにIEI割込みは結局実行中のタスクを管理し
ていた下位制御素子の動作状態を、第22図又は第28
図のマスタCPU割込み応答待ちルーチンに入れ、実行
状態のまま上位の制御素子によって実行を中断されたタ
スクの実行再開を可能にする。
In this way, the IEI interrupt ultimately changes the operating state of the lower control element that is managing the task being executed, as shown in Figure 22 or 28.
The master CPU interrupt response wait routine shown in the figure is entered, and execution of a task whose execution has been interrupted by a higher-order control element can be resumed while remaining in an execution state.

第27図は、複数個のマルチ・タスク制御用素子と他の
周辺入出力素子との割り込み制御線の接続図である。各
マルチ・タスク制御素子は、割り込み制御線として8つ
の信号線LEO、IEO。
FIG. 27 is a connection diagram of interrupt control lines between a plurality of multi-task control elements and other peripheral input/output elements. Each multi-task control element has eight signal lines LEO and IEO as interrupt control lines.

IEIを備えている。例えば、今制御素子11の管理下
のタスクが実行している場合を想定して説明する。
Equipped with IEI. For example, the following description assumes that a task under the control of the control element 11 is currently being executed.

LEO端子は、素子11の管理タスク中で実行中または
レディー状態のタスクが存在する場合、下位の素子12
〜1mからの割り込みを禁止するためのものであり、こ
のようなタスクが存在する場合、LEO端子は’Low
”となり(レディ・タスクが存在しなくなれば、LEO
端子はII Hlgh IIとなる(第22図の説明、
ステップO9O・参照)。IEO端子は素子11がタス
ク切り換えの割り込みを実行中、下位の素子12〜1m
からの割り込みを禁止するためのものであり、割り込み
処理を実行中にはIEO端子は”Low”となる。
The LEO terminal is connected to the lower element 12 when there is a task in the running or ready state among the management tasks of the element 11.
This is to disable interrupts from ~1m, and if such a task exists, the LEO pin will be set to 'Low.
”(If the ready task no longer exists, LEO
The terminal becomes II Hlgh II (explanation of Fig. 22,
(See step O9O). The IEO terminal is connected to lower elements 12 to 1m while element 11 is executing a task switching interrupt.
The IEO terminal is set to "Low" while interrupt processing is being executed.

IEI端子は、下位の素子12〜1mが上位の素子11
から割り込みが許可されているかどうかを入力するため
のものであり、素子12〜1mはIEI端子が”Hig
h”でない限り、割り込みを要求できない。即ち、割り
込み信号I N T e Low ”にすることはでき
ない。また、IEI端子が“1LOW71になれば、I
EO端子は自動的にII L OW7+となる(第23
図説明参照)。
At the IEI terminal, the lower elements 12 to 1m are connected to the upper element 11.
This is for inputting whether or not interrupts are enabled from
It is not possible to request an interrupt unless the signal is "I N T e Low". In other words, the interrupt signal cannot be set to "I N T e Low". Also, if the IEI terminal becomes “1LOW71”, the IEI terminal becomes “1LOW71”.
The EO terminal automatically becomes II L OW7+ (23rd
(See illustration).

したがって、第27図のようにLEO,IEO。Therefore, LEO and IEO as shown in FIG.

IEI端子によって制御素子11〜1mを接続すれば、
素子12〜1mは、素子11の管理下のタスクが実行中
、または素子11が要求したタスク切り換えの割り込み
処理が実行中の間は、素子12〜1mのIEI端子はす
べて”Low”となり、素子12〜1mの割り込みは、
すべて禁止される。
If the control elements 11 to 1m are connected by the IEI terminal,
In the elements 12 to 1m, while a task under the control of the element 11 is being executed, or while an interrupt process for task switching requested by the element 11 is being executed, all IEI terminals of the elements 12 to 1m are set to "Low", and the elements 12 to 1m are in a low state. The 1m interruption is
All are prohibited.

このように、制御素子11〜1m間では、LEO。In this way, between the control elements 11 to 1m, LEO.

IEO,IEI端子によって割り込みの優先順位の決定
およびタスクの優先度による管理が可能である。
The IEO and IEI terminals allow determination of interrupt priorities and management based on task priorities.

また、制御素子11〜1mと他の周辺入出力素子51〜
5Pの間では、IEIとIEO端子によってのみ、割り
込み優先順位が制御される。つまり、他の周辺入出力素
子51〜5Pは、論理回路7により、制御素子11〜1
mのうちのいずれか(これを1xとする。)がタスク切
り換えのための割り込み処理を実行している時のみ、マ
スクCPtJに対する割り込みを禁止される。即ち、制
御i子lxのIEIがHi ghI+で、IEOが’ 
Low ’の時のみ、周辺入出力素子51のIEI端子
は′L0w″となる。したがって、周辺入出力素子51
〜5Pは、制御素子11〜1mのLEO端子の影響を受
けることはない。また、周辺入出力素子51〜5P同志
は、IEI、IEO端子にて直接接続される。
In addition, the control elements 11 to 1m and other peripheral input/output elements 51 to
Between 5Ps, interrupt priorities are controlled only by the IEI and IEO terminals. In other words, the other peripheral input/output elements 51 to 5P are connected to the control elements 11 to 1 by the logic circuit 7.
Interrupts to mask CPtJ are prohibited only when one of m (this is referred to as 1x) is executing interrupt processing for task switching. That is, the IEI of the control i child lx is High ghI+, and the IEO is '
Only when it is Low', the IEI terminal of the peripheral input/output element 51 becomes 'L0w'. Therefore, the peripheral input/output element 51
~5P is not affected by the LEO terminals of the control elements 11~1m. Further, the peripheral input/output elements 51 to 5P are directly connected through IEI and IEO terminals.

続いて、マスタCPU2側で用意するタスク切り換えの
割り込み処理について詳しく説明する。
Next, task switching interrupt processing prepared on the master CPU 2 side will be explained in detail.

第28図は、このタスク切り換え割り込みルーチンのフ
ローチャートである。第27図のように、複数個のマル
チ・タスク制御素子11〜1mを接続すれば、それぞれ
の素子に対応したタスク切り換え割り込みルーチンが必
要である。マスタCPU2は、割り込みを受け付けた時
、どの制御素子が割り込みを要求しているかは、第2図
の割り込みベクタ・レジスタMIVに書き込まれたベク
タによって識別でき、さらにどの割り込写処理ルーチン
を実行すべきか判断できる。
FIG. 28 is a flowchart of this task switching interrupt routine. If a plurality of multi-task control elements 11-1m are connected as shown in FIG. 27, a task switching interrupt routine corresponding to each element is required. When the master CPU 2 accepts an interrupt, it can identify which control element is requesting the interrupt by the vector written in the interrupt vector register MIV in FIG. 2, and which interrupt mapping processing routine should be executed. I can judge whether it is strong or not.

以下、第28図のフローチャートに従って説明する。今
、割り込みが受け付けられた制御素子を11とし、以下
制御素子11に対応する割り込み処理について説明する
。割り込みが発生すると、直前まで実行していたタスク
のレジスレをスタック領域にブツシュする(ステップe
)。次に、割り込みが受け付けられた制御素子(自分)
liの管理下のタスクの切り換えかどうかをスタック・
ポインタ(、S P )の値より判断する(ステップO
)。つまり、割り込みにより実行を中断したタスクが、
割り込みを発生した制御素子11の管理下にあるかどう
か判断する。各タスクのスタック領域は、第29図のよ
うに各タスク毎に用意し、さらに各制御素子11=1m
毎に識別できる様に用意されているものとする。そのた
め、ステップOにおいて、現在のSPの値を読み出し、
その値がどのアドレスの範囲内にあるかによって、どの
タスクが実行していたのか判断できる。
The process will be explained below according to the flowchart shown in FIG. Now, assuming that the control element for which the interrupt has been accepted is 11, the interrupt processing corresponding to the control element 11 will be described below. When an interrupt occurs, the register of the task that was being executed just before is pushed to the stack area (step e).
). Next, the control element (self) where the interrupt was accepted
Check whether the task under the control of li is to be switched or not.
Judging from the value of the pointer (, S P ) (step O
). In other words, a task whose execution was interrupted by an interrupt will
It is determined whether it is under the control of the control element 11 that generated the interrupt. A stack area for each task is prepared for each task as shown in FIG. 29, and each control element 11=1 m
It shall be prepared so that it can be identified. Therefore, in step O, read the current SP value,
Depending on which address range that value falls within, you can determine which task was being executed.

もし、同一素子11の管理下のタスクであれば、自分の
制御素子1iの旧スタック・ポインタ・レジスタSPB
に現在のSPの値を書き込む(ステップ−))。続いて
、新スタック・ポインタ・レジスタSPNより次に実行
すべきタスクのSPの値を読み出しくステップO)、S
Pをその値に書き換える(ステップO)。その後、レジ
スタをスタック領域よりポツプすれば(ステップe)、
次に実行すべきタスクのレジスタが復帰される。
If the tasks are under the control of the same element 11, the old stack pointer register SPB of its own control element 1i
Write the current SP value to (step -)). Next, steps O) and S read the value of SP of the task to be executed next from the new stack pointer register SPN.
Rewrite P to that value (step O). After that, if you pop the register from the stack area (step e),
The register of the task to be executed next is restored.

その後、割り込みよりリターンすれば、次のタス、りが
実行を開始する。
After that, when the program returns from the interrupt, the next task starts executing.

もし、ステップ■っで別の制御素子(これをIXと呼ぶ
)の管理下のタスクの実行を中断したのであれば、どの
制御素子の管理下のタスクが実行を中断したのかをSP
の値より判断する(ステップ○)。次に実行を中断した
タスクを管理する制御素子lxが、割り込みを発生した
自分自身1iよりも下位にあるかどうかを判断する(ス
テップO)。
If the execution of a task under the control of another control element (this is called IX) is interrupted in step 1, SP
Judging from the value of (Step ○). Next, it is determined whether the control element lx that manages the task whose execution was interrupted is lower than the control element 1i that generated the interrupt (step O).

もし、上位の制御素子(これをIXHと呼ぶ)であれば
、その制御素子IXHの下で実行していたタスクは、停
止または待機状態である。この場合には、制御素子IX
Hの旧スタック・ポインタ・レジスタSPHに現在のS
Pの値を書き込む(ステップO)。続いて、制御素子1
1自身のステップ■〜Oを実行し、割り込みよりリター
ンする。
If it is a higher control element (this is called IXH), the task being executed under that control element IXH is stopped or in a standby state. In this case, control element IX
The old stack pointer register SPH of H is set to the current stack pointer register SPH.
Write the value of P (step O). Next, control element 1
1 executes its own steps ① to ① and returns from the interrupt.

ステップQつにおいて、自分11より下位の制御素子(
これを1xLと呼ぶ)の場合であれ浴、制御素子1xL
の下で実行していたタスクは、実行状態のまま中断され
た場合である。そのため、この場合には、制御素子1x
Lの新スタック・ポインタ・レジスタSPNに現在のS
Pの値を保存(ステップ■))シた後、同様にステップ
○〜Oを実行後、リターンする。ステップCつで保存し
たSPの値は、制御素子1xLより上位の制御素子の管
理下で実行可能なタスクがすべてなくなった時点で、制
御素子1xLの割り込みが受け付けられ、このタスク切
り換えルーチンに入った時、ステップ■において新スタ
ック・ポインタ・レジスタSPNより読み出される。
In step Q, the control element (
(this is called 1xL), the bath, control element 1xL
This is the case when the task that was being executed under is interrupted while still in the running state. Therefore, in this case, the control element 1x
The new stack pointer register SPN of L is set to the current S
After saving the value of P (step ■), similarly executing steps ○ to O, the process returns. The value of SP saved in step C is determined when the interrupt of control element 1xL is accepted and this task switching routine is entered when there are no more executable tasks under the control of control elements higher than control element 1xL. At this time, the new stack pointer register SPN is read out in step (2).

く効果〉 以上のように、本発明によればカスケード接続された複
数のマルチ・タスク制御素子よりも優先順位の下位側に
接続された他の周辺入出力素子がマスタCPUに対して
割り込みを要求し、マスクCPUからの正常な割り込み
のサポートを受けることが可能であるという利点を得る
。又、簡単な論理回路を付けることによって、周辺入出
力素子はマルチ・タスク制御素子間のタスク切り換えの
ための割り込み制御(LEO信号による下位側の制御素
子の割り込み禁止)の影響を受けることがなくなるとい
う利点を有するものである。又、マスタCPUがこれら
の制御素子からの割り込み処理を実行中の場合のみ、周
辺入出力素子の割り込みが禁止されるだけであるので、
マスタCPUと周辺入出力素子間の通常の割り込み制御
が可能となるという利点をも有するものである。
Effect> As described above, according to the present invention, other peripheral input/output elements connected to a lower priority level than a plurality of cascade-connected multi-task control elements request an interrupt to the master CPU. However, it has the advantage of being able to receive normal interrupt support from the masked CPU. Additionally, by adding a simple logic circuit, peripheral input/output elements are no longer affected by interrupt control for task switching between multi-task control elements (disabling interrupts of lower control elements by LEO signals). This has the advantage that. Additionally, interrupts from peripheral input/output devices are only prohibited when the master CPU is processing interrupts from these control devices.
This also has the advantage of enabling normal interrupt control between the master CPU and peripheral input/output elements.

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

第1図は本発明の制御素子を使用したシステム構成例を
示す図、第2図は本発明の一実施例における制御素子の
内部構成例を示すブロック図、第3図は第2図のタスク
制御ブロックTCB領域を説明する図、第4図は第2図
のメモリ・マツプMEMMAP領域を説明する図、第5
図は制御素子で使用されるコマンドと入力パラメータお
よび出力パラメータを説明する図、第6図は制御素子の
メインルーチンの動作を説明するフローチャート、第7
図〜第21図は各コマンドによる処理ルーチンの動作を
説明するフローチャート、第22図は制御素子のタスク
切換ルーチンの動作を説明するフローチャート、第23
図は第22図のマスタCPU割り込み応答待ちルーチン
の詳細を示すフローチャート、第24図はイベント入力
による割込み処理ルーチンの動作を説明するフローチャ
ート、第25図はタイマ割込み処理ルーチンの動作を説
明するフローチャート、第26図はIEI割り込み処理
ルーチンの動作を説明するフローチャート、第27図は
複数の制御素子のカスケード接続例を示すブロック図、
第28図はマスタCPUにおけるタスク切換え割り込み
ルーチンの動作を説明するフローチャート、第29図は
マスタCPUのスタック領域を説明する図である。 1・・・マルチ・タスク制御素子群、11〜1m・・・
マルチ・タスク制御素子、2・・・マスタCPU、3・
・・プログラム・メモリ、6・・・データ・メモリ、7
・・・論理回路、INTC・・・割込み制御回路、IN
T・・・割込み信号、TCB・・タスク制御ブロック、
C0NT・・・内部演算制御回路、TM・・・タイマ、
SCA・・・システム・クロック領域、MIV・・・マ
スク割込み制御レジスタ、CPIO・・・コマンド・/
、eラメータ・レジスタ、SPN・・・新スタック・ポ
インタ・レジスタ、SPB・・・旧ツタ・ツク争ポイン
タ・レジスタ、IEI・・・割り込みイネーブル入力端
子、IEO・・・割り込みイネーブル出力端子、LEO
・・・下位素子イネーブル出力端子。 代理人 弁理士 福 士 愛 彦(他2名)第6図 第7図 第9図 第to図 第13図 第14図 第15図 第21図 第23WJ 第22図 第24図 第25WJ 第28111 ツタデグ摺戚 第2CIW!a
FIG. 1 is a diagram showing an example of a system configuration using a control element of the present invention, FIG. 2 is a block diagram showing an example of an internal configuration of a control element in an embodiment of the present invention, and FIG. 3 is a diagram showing an example of a system configuration using a control element of the present invention. FIG. 4 is a diagram explaining the control block TCB area, FIG. 4 is a diagram explaining the memory map MEMMAP area of FIG. 2, and FIG.
The figures are diagrams explaining commands, input parameters, and output parameters used in the control element, Figure 6 is a flowchart explaining the operation of the main routine of the control element, and Figure 7 is a diagram explaining the operation of the main routine of the control element.
21 is a flowchart explaining the operation of the processing routine by each command, FIG. 22 is a flowchart explaining the operation of the control element task switching routine, and FIG.
22 is a flowchart showing details of the master CPU interrupt response waiting routine, FIG. 24 is a flowchart explaining the operation of the interrupt processing routine based on event input, and FIG. 25 is a flowchart explaining the operation of the timer interrupt processing routine. FIG. 26 is a flowchart explaining the operation of the IEI interrupt processing routine, FIG. 27 is a block diagram showing an example of cascade connection of a plurality of control elements,
FIG. 28 is a flowchart explaining the operation of the task switching interrupt routine in the master CPU, and FIG. 29 is a diagram explaining the stack area of the master CPU. 1...Multi-task control element group, 11-1m...
Multi-task control element, 2... Master CPU, 3.
...Program memory, 6...Data memory, 7
...Logic circuit, INTC...Interrupt control circuit, IN
T...interrupt signal, TCB...task control block,
C0NT...internal calculation control circuit, TM...timer,
SCA...System clock area, MIV...Mask interrupt control register, CPIO...Command/
, e parameter register, SPN...new stack pointer register, SPB...old stack pointer register, IEI...interrupt enable input terminal, IEO...interrupt enable output terminal, LEO
...lower element enable output terminal. Agent Patent Attorney Aihiko Fuku (2 others) Figure 6 Figure 7 Figure 9 Figure to Figure 13 Figure 14 Figure 15 Figure 21 Figure 23 WJ Figure 22 Figure 24 Figure 25 WJ 28111 Tsutadegu Suriki 2nd CIW! a

Claims (1)

【特許請求の範囲】 1 マスタCPUにより実行される複数のタスクの管理
を行なう複数のマルチ・タスク制御素子に、各素子間の
割り込みを制御する制御信号が導入される割り込みイネ
ーブル入力端子(IEI端子)と、各素子間の割り込み
を制御する制御信号が導出される割り込みイネーブル出
力端子(IEO端子)と、各素子間が自分の管理下のタ
スクI実行中またはレディ状態のタスクが存在する場合
に下位の素子からの割り込みを禁止する制御信号が導出
される下位素子イネーブル出力端子(LEO端子)とが
設けられ、前記複数のマルチ・タスク制御素子はカスケ
ード接続され、該カスケード接続された複数のマルチ・
タスク制御素子より割り込み優先順位が下位側に接続さ
れた他の周辺入出力素子のマスタCPUへの割り込みを
可能とする前記IEI端子。 IEO端子、LEO端子と接続された論理回路とを備え
たことを特徴とするマルチ嗜タスク制御素子を内蔵した
コンピュータ周辺装置。
[Claims] 1. An interrupt enable input terminal (IEI terminal) into which a control signal for controlling interrupts between each element is introduced into a plurality of multi-task control elements that manage a plurality of tasks executed by a master CPU. ), an interrupt enable output terminal (IEO terminal) from which a control signal for controlling interrupts between each element is derived, and an interrupt enable output terminal (IEO terminal) from which a control signal for controlling interrupts between each element is derived. A lower element enable output terminal (LEO terminal) is provided from which a control signal for inhibiting an interrupt from a lower element is derived, the plurality of multi-task control elements are cascade-connected, and the plurality of cascade-connected multi-task control elements are・
The IEI terminal enables interrupts to the master CPU of other peripheral input/output elements connected to a lower interrupt priority level than the task control element. A computer peripheral device incorporating a multitasking control element, characterized by comprising an IEO terminal, a LEO terminal, and a connected logic circuit.
JP59072538A 1984-04-10 1984-04-10 Computer peripheral unit incorporating multi-task control element Pending JPS60215249A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59072538A JPS60215249A (en) 1984-04-10 1984-04-10 Computer peripheral unit incorporating multi-task control element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59072538A JPS60215249A (en) 1984-04-10 1984-04-10 Computer peripheral unit incorporating multi-task control element

Publications (1)

Publication Number Publication Date
JPS60215249A true JPS60215249A (en) 1985-10-28

Family

ID=13492225

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59072538A Pending JPS60215249A (en) 1984-04-10 1984-04-10 Computer peripheral unit incorporating multi-task control element

Country Status (1)

Country Link
JP (1) JPS60215249A (en)

Similar Documents

Publication Publication Date Title
US5168566A (en) Multi-task control device for central processor task execution control provided as a peripheral device and capable of prioritizing and timesharing the tasks
JPS6031648A (en) Controlling method of multitask
US7472214B2 (en) Real-time embedded simple monitor method and computer product
JPH04246740A (en) Microcomputer
CA1304513C (en) Multiple i/o bus virtual broadcast of programmed i/o instructions
US20020116438A1 (en) Method and apparatus for shared resource management in a multiprocessing system
EP0825539A2 (en) Data processing device having a DMA function
JP3644042B2 (en) Multitask processing device
JPS60215249A (en) Computer peripheral unit incorporating multi-task control element
JPH09223032A (en) Resources lock control mechanism
JPH0376500B2 (en)
JPH0376497B2 (en)
JPH0348538B2 (en)
JPS60114941A (en) Device for multi-task control
JPS60163133A (en) Multi-task control element
JPS63127303A (en) Programmable controller
JPH0376498B2 (en)
JP3361949B2 (en) Program verification device
JPH0421893B2 (en)
US7305508B2 (en) Semaphoring system between system firmware and hardware manipulation subsystem
JPH03116261A (en) Multiprocessor control system
JPS61143858A (en) File share method for plural operating systems
JP2023091314A (en) Semiconductor device, control method of semiconductor device, and program
JPS60114942A (en) Device for multi-task control
JPH0981526A (en) Multiprocessor system