JPH0916409A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH0916409A
JPH0916409A JP7166443A JP16644395A JPH0916409A JP H0916409 A JPH0916409 A JP H0916409A JP 7166443 A JP7166443 A JP 7166443A JP 16644395 A JP16644395 A JP 16644395A JP H0916409 A JPH0916409 A JP H0916409A
Authority
JP
Japan
Prior art keywords
task
memory
register
data
switching
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
JP7166443A
Other languages
Japanese (ja)
Inventor
Toshimichi Matsuzaki
敏道 松崎
Toshifumi Hamaguchi
敏文 浜口
Hiroshi Tanase
寛 多那瀬
Masahiko Matsumoto
政彦 松本
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP7166443A priority Critical patent/JPH0916409A/en
Publication of JPH0916409A publication Critical patent/JPH0916409A/en
Pending legal-status Critical Current

Links

Abstract

(57)【要約】 【目的】 コストを増大させることなく高速にタスクを
切り換えるマイクロコンピュータを提供することを目的
とする。 【構成】 CPU4は、タスクスケジュールテーブル2
の実行順序に従ってタスクを切り換え、レジスタファイ
ル3の一方のレジスタセットを使用してタスクを実行す
る。また、タスク切り換え毎に、CPU4のタスク実行
に使用されるレジスタセットが交互に切り換えられる。
タスク切り換え毎に、転送部5は、CPU4の空バスサ
イクルを利用して、それぞれレジスタセット退避、復帰
を行う。これにより、レジスタセットを1つ分と、転送
手段をハードウェアとして追加するだけで、高速なタス
ク切り換えを実現することができる。
(57) [Abstract] [Purpose] An object of the present invention is to provide a microcomputer that switches tasks at high speed without increasing costs. [Structure] The CPU 4 has a task schedule table 2
The task is switched according to the execution order of, and the task is executed using one register set of the register file 3. Further, every time the task is switched, the register set used for the task execution of the CPU 4 is switched alternately.
Each time the task is switched, the transfer unit 5 uses the empty bus cycle of the CPU 4 to save and restore the register set, respectively. As a result, high-speed task switching can be realized simply by adding one register set and transfer means as hardware.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、複数のタスクを切り換
えながら実行するマイクロコンピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer for executing a plurality of tasks while switching them.

【0002】[0002]

【従来の技術】近年、マイクロコンピュータは、あらゆ
る機器に利用されており、処理能力の向上に伴ってより
広い分野でより複雑な制御に応用されている。組み込み
用途のマイクロコンピュータにおいても、より複雑な制
御に対応できるように、マルチタスク管理などより高度
な機能が望まれている。
2. Description of the Related Art In recent years, microcomputers have been used in all kinds of equipment, and have been applied to more complicated control in a wider field with the improvement of processing capacity. Even in microcomputers for embedded applications, more sophisticated functions such as multitask management are desired so that more complicated control can be handled.

【0003】図6は、第1の従来技術におけるマルチタ
スク機能を有するコンピュータの説明図である。同図に
おいてCPU10は、演算部11とレジスタセット12
とからなる。演算部11は、タスクを1つずつ実行す
る。レジスタセット12は、タスク実行に要するデータ
を保持する。
FIG. 6 is an explanatory diagram of a computer having a multitask function in the first conventional technique. In the figure, the CPU 10 includes an arithmetic unit 11 and a register set 12.
Consists of The calculation unit 11 executes the tasks one by one. The register set 12 holds data required for task execution.

【0004】メモリ13は、各タスク毎にコンテキスト
(レジスタセットのデータ、PCの内容、PSWの内容
等)を退避する領域であるコンテキストブロック14を
有する。同図では、コンテキストブロック14中にタス
ク1〜3用のコンテキスト退避領域が示されている。こ
の第1の従来例におけるタスクの管理はソフトウェア
(OS)によって行われる。例えばタスク1からタスク
2に切り換える場合、OSは、タスク切り換えを指示す
るイベント(タイマ割込み等)を受け付けると、まずC
PU10からメモリ13にタスク1のコンテキストを退
避し、次にメモリ13からCPU10にタスク2のコン
テキストを復帰し、さらにタスク2の実行を開始する。
The memory 13 has a context block 14 which is an area for saving contexts (register set data, PC contents, PSW contents, etc.) for each task. In the figure, the context save area for tasks 1 to 3 is shown in the context block 14. The task management in the first conventional example is performed by software (OS). For example, when switching from task 1 to task 2, when the OS receives an event (timer interrupt or the like) instructing task switching, first, C
The context of the task 1 is saved from the PU 10 to the memory 13, then the context of the task 2 is restored from the memory 13 to the CPU 10, and the execution of the task 2 is started.

【0005】上記のように第1の従来例では、ソフトウ
ェア(OS)によりマルチタスクを実現しているので、
ハードウェア規模が小さくて済むという利点がある。図
7は、第2の従来技術おけるマルチタスク機能を有する
コンピュータの説明図である。同図においてCPU20
は、演算部21、レジスタファイル22、レジスタセッ
ト切り換え部23、制御部24とからなる。
As described above, in the first conventional example, since multitasking is realized by software (OS),
There is an advantage that the hardware scale can be small. FIG. 7 is an explanatory diagram of a computer having a multitasking function in the second conventional technique. In the figure, the CPU 20
Is composed of an arithmetic unit 21, a register file 22, a register set switching unit 23, and a control unit 24.

【0006】演算部21は、タスクを1つずつ実行す
る。レジスタファイル22は、タスク実行に要するデー
タを保持する複数のレジスタセットからなる。レジスタ
セット切り換え部23は、現在実行中のタスクに対応す
るレジスタセットを有効にする。この有効なレジスタセ
ットのみが演算部21に使用される。
The calculation unit 21 executes tasks one by one. The register file 22 is composed of a plurality of register sets that hold data required for task execution. The register set switching unit 23 enables the register set corresponding to the currently executing task. Only this valid register set is used for the arithmetic unit 21.

【0007】制御部24は、タスクの切り換えを制御す
る。メモリ25は、レジスタセットのデータを除くコン
テキストの退避領域を有する。この第2の従来例におけ
るタスクの管理はハードウェアによって行われる。例え
ばタスク1からタスク2に切り換える場合、制御部24
は、タスク切り換えを指示するイベント(タイマ割込み
等)を受け付けると、レジスタセット切り換え部23に
タスク2に対応するレジスタセットを有効にするように
指示する共に、演算部21のPCの内容、PSWの内容
等をメモリ25に退避し、タスク2のPCの内容、PS
Wの内容等を演算部21に復帰する。その結果、演算部
21は、有効なレジスタセット2を用いてタスク2を実
行する。
The control unit 24 controls switching of tasks. The memory 25 has a context save area excluding register set data. The task management in the second conventional example is performed by hardware. For example, when switching from task 1 to task 2, the control unit 24
When receiving an event (timer interrupt or the like) instructing the task switching, the command instructs the register set switching unit 23 to validate the register set corresponding to the task 2, and the contents of the PC of the operation unit 21, the PSW Save the contents, etc. in the memory 25 and save the contents of the PC of task 2 and PS
The contents of W and the like are returned to the arithmetic unit 21. As a result, the arithmetic unit 21 executes the task 2 using the valid register set 2.

【0008】上記のように第2の従来例では、ハードウ
ェアによりマルチタスクを実現しているので、タスクの
切り換えが高速に行えるという利点がある。
As described above, in the second conventional example, since multitasking is realized by hardware, there is an advantage that tasks can be switched at high speed.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、上記従
来技術によれば、組み込み用途のマイクロコンピュータ
におけるマルチタスク管理には適していないという問題
があった。詳しくいうと、第1の従来例によれば、タス
ク切り換えに際してコンテキストの退避および復帰をソ
フトウェア(OS)により実現するので切り換え速度が
遅く、リアルタイム性を要求される制御を行う組み込み
用途のマイクロコンピュータには適していない。また、
第2の従来例によれば、タスク数を同数のレジスタセッ
トを必要とし、タスク切り換え行う制御部をハードウェ
アにて実現するので、ハードウェア規模が大きくなる。
その結果コストが高くなり組み込み用途のマイクロコン
ピュータには適していない。
However, according to the above-mentioned prior art, there is a problem that it is not suitable for multitask management in a microcomputer for embedded use. More specifically, according to the first conventional example, the context save and restore are realized by software (OS) at the time of task switching, so that the switching speed is slow, and the microcomputer for embedded use for performing control requiring real-time performance is realized. Is not suitable. Also,
According to the second conventional example, since a register set having the same number of tasks is required and the control unit for switching tasks is realized by hardware, the hardware scale becomes large.
As a result, the cost is high, and the microcomputer is not suitable for embedded microcomputers.

【0010】本発明は上記の問題点に鑑み、コストを増
大させることなく高速にタスクを切り換えるマイクロコ
ンピュータを提供することを目的とする。
In view of the above problems, it is an object of the present invention to provide a microcomputer that switches tasks at high speed without increasing costs.

【0011】[0011]

【課題を解決するための手段】上記課題を解決するた
め、請求項1の発明は、複数のタスクを順に切り換えな
がら実行するマイクロコンピュータであって、同一のレ
ジスタ構成をもち、タスク実行に一方が使用される2つ
のレジスタセットと、タスク切り換えと同時に、タスク
実行に使用されるレジスタセットを他方に切り換える切
り換え手段と、レジスタセットに接続された内部バス、
およびメモリに接続されたメモリバスそれぞれの空サイ
クルを検出する検出手段と、タスク切り換え毎に、検出
されたバスの空サイクルを利用して、タスク実行に使用
されていないレジスタセットのデータをメモリに退避
し、次の切り換え後に実行すべきタスク用のデータをメ
モリから当該レジスタセットに復帰する転送手段とを備
える。
In order to solve the above-mentioned problems, the invention of claim 1 is a microcomputer which executes a plurality of tasks while switching them in order, and has the same register configuration, and one of them can execute a task. Two register sets used, a switching means for switching the register set used for task execution to the other simultaneously with task switching, and an internal bus connected to the register set,
And a detection means for detecting an empty cycle of each memory bus connected to the memory, and an empty cycle of the detected bus is used every time the task is switched, and the data of the register set not used for task execution is stored in the memory. And a transfer unit that saves and restores data for a task to be executed after the next switching from the memory to the register set.

【0012】請求項2の発明は、請求項1において前記
転送手段が、内部バスの空サイクルにおいて、タスク実
行に使用されていないレジスタセットのレジスタデータ
を読み出すレジスタ読み出し手段と、メモリバスの空サ
イクルにおいて、レジスタ読み出し手段により読み出さ
れたデータをメモリに書き込むメモリ書き込み手段と、
メモリ書き込み手段による書き込み完了後、メモリバス
の空サイクルにおいて、次に実行すべきタスク用のデー
タをメモリから読み出すメモリ読み出し手段と、内部バ
スの空サイクルにおいて、メモリ読み出し手段により読
み出されたデータを、タスク実行に使用されていないレ
ジスタセットに書き込むレジスタ書き込み手段とを有し
ている。
According to a second aspect of the present invention, in the first aspect, the transfer means reads register data of a register set which is not used for task execution in an empty cycle of the internal bus, and an empty cycle of the memory bus. In, memory writing means for writing the data read by the register reading means to the memory,
After the writing by the memory writing means is completed, in the empty cycle of the memory bus, the memory reading means for reading the data for the task to be executed next from the memory and the data read by the memory reading means in the empty cycle of the internal bus , Register writing means for writing to a register set that is not used for task execution.

【0013】請求項3の発明は、複数のタスクを順に切
り換えながら実行するマイクロコンピュータであって、
複数のタスクプログラムを記憶し、各タスクに対応する
データ退避領域を有するメモリと、複数のタスクの実行
順序を記憶するテーブル手段と、同一のレジスタ構成を
もつ2つのレジスタセットと、テーブル手段の実行順序
に従ってタスクを切り換え、レジスタセットの一方を使
用してタスクを実行する中央演算処理手段と、タスク切
り換え毎に、中央演算処理手段のタスク実行に使用され
るレジスタセットを交互に切り換える切り換え手段と、
レジスタセットに接続された内部バス、およびメモリに
接続されたメモリバスそれぞれの空サイクルを検出する
検出手段と、タスク切り換え毎に、検出されたバスの空
サイクルを利用して、タスク実行に使用されていないレ
ジスタセットのデータを、切り換え前のタスクに対応す
るデータ退避領域に退避する退避手段と、退避手段によ
る退避後、検出されたバスの空サイクルを利用して、中
央演算処理手段による実行中タスクの次のタスクに対応
するデータ退避領域のデータを、タスク実行に使用され
ていないレジスタセットに復帰させる復帰手段とを備え
る。
According to a third aspect of the present invention, there is provided a microcomputer which executes a plurality of tasks while sequentially switching the tasks.
A memory that stores a plurality of task programs and has a data save area corresponding to each task, a table means that stores the execution order of a plurality of tasks, two register sets that have the same register configuration, and the execution of the table means. A central processing unit that switches the tasks according to the order and executes the tasks using one of the register sets; and a switching unit that alternately switches the register set used for the task execution of the central processing unit at each task switching.
Detecting means for detecting empty cycles of the internal bus connected to the register set and the memory bus connected to the memory, and the empty cycle of the detected bus is used for each task switching and used for task execution. The data in the register set that has not been switched is saved in the data save area corresponding to the task before switching, and after being saved by the save means, the detected empty cycle of the bus is used to execute it by the central processing unit. And a restoring unit that restores the data in the data save area corresponding to the task next to the task to the register set that is not used for executing the task.

【0014】請求項4の発明は、請求項3において、前
記メモリは、各タスク毎のスタック領域内に前記データ
退避領域を有し、前記テーブル手段は、タスクの実行順
序と、各タスクに対応するスタックポインタの内容とを
記憶する。請求項5の発明は、請求項3又は4におい
て、前記退避手段は、内部バスの空サイクルにおいて、
タスク実行に使用されていないレジスタセットのレジス
タデータを順に読み出すレジスタ読み出し手段と、メモ
リバスの空サイクルにおいて、レジスタ読み出し手段に
より読み出されたデータを順に、切り換え前のタスクに
対応するデータ退避領域に書き込むメモリ書き込み手段
とを有し、前記復帰手段は、メモリ書き込み手段による
書き込み完了後、メモリバスの空サイクルにおいて、中
央演算処理手段による実行中タスクの次のタスクに対応
するデータ退避領域のデータを順にメモリから読み出す
メモリ読み出し手段と、内部バスの空サイクルにおい
て、メモリ読み出し手段により読み出されたデータを、
タスク実行に使用されていないレジスタセットに書き込
むレジスタ書き込み手段とを有する。
According to a fourth aspect of the present invention, in the third aspect, the memory has the data save area in a stack area for each task, and the table means corresponds to an execution order of tasks and each task. And the contents of the stack pointer to be stored. According to a fifth aspect of the present invention, in the third or fourth aspect, the evacuation unit is an empty cycle of the internal bus,
Register reading means that sequentially reads the register data of the register set that is not used for task execution, and the data read by the register reading means in the empty cycle of the memory bus in order to the data save area corresponding to the task before switching. And a memory writing unit for writing, wherein the restoring unit writes data in a data save area corresponding to a task next to the task being executed by the central processing unit in an empty cycle of the memory bus after the writing by the memory writing unit is completed. Memory reading means for reading from the memory in order, and data read by the memory reading means in an empty cycle of the internal bus,
Register writing means for writing to a register set not used for task execution.

【0015】請求項6の発明は、請求項3、4又5はに
おいて、さらに、中央演算処理手段に動作クロックを供
給するクロック供給手段と、復帰手段による復帰動作中
に、中央演算処理手段によりタスク切り換えが発生した
場合に、当該復帰動作が完了するまでの間クロック供給
手段の動作クロックの供給を停止する停止手段とを備え
る。
According to a sixth aspect of the present invention, in addition to the third, fourth or fifth aspect, a clock supply means for supplying an operation clock to the central processing means, and the central processing means during the returning operation by the returning means. When task switching occurs, a stop means for stopping the supply of the operation clock of the clock supply means until the restoration operation is completed.

【0016】[0016]

【作用】上記の手段により、請求項1の発明に係るマイ
クロコンピュータでは、切り換え手段は、タスク切り換
えと同時に、タスク実行に使用されるレジスタセットを
切り換える。タスク切り換え毎に、転送手段は、検出さ
れたバスの空サイクルを利用して、タスク実行に使用さ
れていないレジスタセットのデータをメモリに退避し、
次の切り換え後に実行すべきタスク用のデータをメモリ
から当該レジスタセットに復帰する。これにより、レジ
スタセットを1つ分と、転送手段をハードウェアとして
追加するだけで、高速なタスク切り換えを実現すること
ができる。
By the above means, in the microcomputer according to the first aspect of the invention, the switching means switches the register set used for task execution at the same time as the task switching. Each time the task is switched, the transfer means uses the detected empty cycle of the bus to save the data of the register set not used for task execution to the memory,
After the next switching, the data for the task to be executed is restored from the memory to the register set. As a result, high-speed task switching can be realized simply by adding one register set and transfer means as hardware.

【0017】請求項2の発明に係るマイクロコンピュー
タでは、請求項1の前記転送手段において、レジスタ読
み出し手段とメモリ書き込み手段とにより退避が行わ
れ、メモリ読み出し手段とレジスタ書き込み手段とによ
り復帰が行われる。その際、レジスタ読み出し手段と、
レジスタ書き込み手段とは内部バスの空サイクルにおい
てレジスタにアクセスし、メモリ読み出し手段とメモリ
書き込み手段とはメモリバスの空サイクルにおいてメモ
リにアクセスする。これにより、タスク実行を全く妨げ
ることなく、退避と復帰を実現できる。
According to a second aspect of the present invention, in the transfer means of the first aspect, the register reading means and the memory writing means perform saving, and the memory reading means and the register writing means perform restoration. . At that time, register reading means,
The register writing means accesses the register in the empty cycle of the internal bus, and the memory reading means and the memory writing means access the memory in the empty cycle of the memory bus. As a result, saving and restoring can be realized without hindering task execution.

【0018】請求項3の発明に係るマイクロコンピュー
タでは、中央演算処理手段は、テーブル手段の実行順序
に従ってタスクを切り換え、レジスタセットの一方を使
用してタスクを実行する。切り換え手段は、タスク切り
換え毎に、中央演算処理手段のタスク実行に使用される
レジスタセットを交互に切り換える。タスク切り換え毎
に、退避手段、復帰手段は、検出されたバスの空サイク
ルを利用して、それぞれ退避、復帰を行う。これによ
り、レジスタセットを1つ分と、転送手段をハードウェ
アとして追加するだけで、高速なタスク切り換えを実現
することができる。
In the microcomputer according to the third aspect of the present invention, the central processing unit switches the task according to the execution order of the table unit and executes the task using one of the register sets. The switching means alternately switches the register set used for task execution of the central processing unit each time the task is switched. Each time the task is switched, the save means and the restore means perform save and restore, respectively, by utilizing the detected empty cycle of the bus. As a result, high-speed task switching can be realized simply by adding one register set and transfer means as hardware.

【0019】請求項4の発明に係るマイクロコンピュー
タでは、請求項3において、前記データ退避領域が、メ
モリ中の各タスク毎のスタック領域内に設けられ、前記
テーブル手段は、タスクの実行順序と、各タスクに対応
するスタックポインタの内容とを記憶する。これによ
り、タスクの実行順序として1つのタスクを複数指定す
るだけで、中央演算処理手段におけるタスクの占有率を
簡単に制御できる。
According to a fourth aspect of the present invention, in the third aspect of the present invention, the data save area is provided in a stack area for each task in the memory, and the table means sets the execution order of the tasks. The contents of the stack pointer corresponding to each task are stored. As a result, the task occupancy rate in the central processing unit can be easily controlled by simply specifying one task as the task execution order.

【0020】請求項5の発明に係るマイクロコンピュー
タでは、請求項3又は4において、レジスタ読み出し手
段とメモリ書き込み手段とにより退避が行われ、メモリ
読み出し手段とレジスタ書き込み手段とにより復帰が行
われる。その際、レジスタ読み出し手段と、レジスタ書
き込み手段とは内部バスの空サイクルにおいてレジスタ
にアクセスし、メモリ読み出し手段とメモリ書き込み手
段とはメモリバスの空サイクルにおいてメモリにアクセ
スする。これにより、タスク実行を全く妨げることな
く、退避と復帰を実現できる。
According to a fifth aspect of the present invention, in the microcomputer according to the third or fourth aspect, the saving is performed by the register reading means and the memory writing means, and the restoration is performed by the memory reading means and the register writing means. At this time, the register reading unit and the register writing unit access the register in the empty cycle of the internal bus, and the memory reading unit and the memory writing unit access the memory in the empty cycle of the memory bus. As a result, saving and restoring can be realized without hindering task execution.

【0021】請求項6の発明に係るマイクロコンピュー
タでは、停止手段は、復帰手段による復帰動作中に、中
央演算処理手段によりタスク切り換えが発生した場合
に、当該復帰動作が完了するまでの間クロック供給手段
の動作クロックの供給を停止する。これにより、退避・
復帰に要するよりも短い周期でタスク切り換えの要求が
発生しても適切にタスクを切り換えることができるの
で、タスク切り換え周期を幅広く設定することができ
る。
In the microcomputer according to the sixth aspect of the invention, the stopping means supplies the clock until the returning operation is completed when the central processing unit switches the task during the returning operation by the returning means. The supply of the operating clock of the means is stopped. This saves
Even if a task switching request is made in a cycle shorter than that required for restoration, the task can be switched appropriately, so that the task switching cycle can be set broadly.

【0022】[0022]

【実施例】図1は、本発明の実施例におけるマイクロコ
ンピュータの主要な概略構成を示すブロック図である。
このマイクロコンピュータは、メモリ1、タスクスケジ
ュールテーブル2、レジスタファイル3、CPU4、転
送部5を有する。メモリ1は、複数のタスクからなるプ
ログラムやデータを記憶し、また、各タスク用の退避領
域を有する。この退避領域には、レジスタセットの内
容、プログラムカウンタの内容、プロセッサステータス
ワードの内容等を含むコンテキストが退避される。
1 is a block diagram showing the main schematic configuration of a microcomputer according to an embodiment of the present invention.
This microcomputer has a memory 1, a task schedule table 2, a register file 3, a CPU 4, and a transfer unit 5. The memory 1 stores programs and data including a plurality of tasks, and has a save area for each task. In this save area, the context including the contents of the register set, the contents of the program counter, the contents of the processor status word, etc. is saved.

【0023】タスクスケジュールテーブル2は、物理的
にはメモリ1内に設けられ、タスクの実行順序を保持す
る。レジスタファイル3は、レジスタセットAとレジス
タセットBとからなる。この2つのレジスタセットA、
Bは、タスクの切り換え毎に交互に切り換えられ、常に
一方がCPU4のタスク実行に使用される。
The task schedule table 2 is physically provided in the memory 1 and holds the execution order of tasks. The register file 3 includes a register set A and a register set B. These two register set A,
B is alternately switched every time the task is switched, and one of them is always used for task execution by the CPU 4.

【0024】CPU4は、複数のタスクを順に切り換え
ながら実行する。CPU4が実行するタスクは、タスク
切り換えを指示するイベントが発生する毎に、タスクス
ケジュールテーブル2の内容に従って切り換えられる。
ここでイベントは、例えば、周期的なタイマー割込み、
タスクスイッチ命令、特定ポート(シリアルポートな
ど)割り込み等である。
The CPU 4 executes a plurality of tasks while sequentially switching them. The task executed by the CPU 4 is switched according to the contents of the task schedule table 2 each time an event instructing task switching occurs.
Here, the event is, for example, a periodic timer interrupt,
These include task switch instructions and specific port (serial port etc.) interrupts.

【0025】転送部5は、タスクが切り換えられる毎
に、CPU4によるタスク実行と独立して、CPU4に
より使用されていないレジスタセット内のデータをメモ
リに退避し、次に実行すべきタスク用のデータをメモリ
から当該レジスタセットに復帰する。図2は、図1に示
したマイクロコンピュータのより詳細な構成を示すブロ
ック図である。
Each time the task is switched, the transfer unit 5 saves the data in the register set which is not used by the CPU 4 to the memory independently of the task execution by the CPU 4, and the data for the task to be executed next. From the memory to the register set. FIG. 2 is a block diagram showing a more detailed configuration of the microcomputer shown in FIG.

【0026】同図に示すように、本マイクロコンピュー
タは、ROM101、RAM102、インクリメンタ4
01、セレクタ402、命令アドレスバッファ403、
命令フェッチバッファ405、プロセッサステータスワ
ード(以下PSWと略す)406、命令バッファ40
7、命令レジスタ408、ステータスレジスタ409、
PLA410、マイクロ命令レジスタ411、ALU4
12、ALOB413、オペランドアドレスバッファ4
14、ストアバッファ415、ロードバッファ416、
セレクタ417、転送制御部501、PLA502、マ
イクロ命令レジスタ503、TSTB504、TSTP
505、オペランドアドレスバッファ506、ストアバ
ッファ507、ロードバッファ508、加算器509、
定数発生器510とから構成され、ROM101および
RAM102は、図1に示したメモリ1に相当し、複数
のタスクを含むプログラム、タスクスケジュールテーブ
ル2、タスク用退避領域を有する。このプログラムはR
OM101に記憶され、タスクスケジュールテーブル2
は、ROM101またはRAM102に設けられ、タス
ク用退避領域はRAM102に設けられる。
As shown in the figure, the microcomputer includes a ROM 101, a RAM 102, and an incrementer 4.
01, selector 402, instruction address buffer 403,
Instruction fetch buffer 405, processor status word (hereinafter abbreviated as PSW) 406, instruction buffer 40
7, instruction register 408, status register 409,
PLA410, micro instruction register 411, ALU4
12, ALOB413, operand address buffer 4
14, store buffer 415, load buffer 416,
Selector 417, transfer control unit 501, PLA 502, microinstruction register 503, TSTB 504, TSTP
505, an operand address buffer 506, a store buffer 507, a load buffer 508, an adder 509,
The ROM 101 and the RAM 102, which are composed of the constant generator 510, correspond to the memory 1 shown in FIG. 1, and have a program including a plurality of tasks, a task schedule table 2, and a task save area. This program is R
Task schedule table 2 stored in OM101
Are provided in the ROM 101 or the RAM 102, and the task save area is provided in the RAM 102.

【0027】レジスタセット301とレジスタセット3
02とは、同一のレジスタ構成であり、それぞれデータ
レジスタ(D1、D0)と、アドレスレジスタ(A1,
A0)と、スタックポインタ(SP)と、これらからの
データを選択的に出力するセレクタとを有する。インク
リメンタ401、セレクタ402、命令アドレスバッフ
ァ403、命令フェッチバッファ405からなる回路部
分は、ROM101から命令を順時プリフェッチする命
令準備部である。
Register set 301 and register set 3
02 has the same register configuration, and each has a data register (D1, D0) and an address register (A1,
A0), a stack pointer (SP), and a selector for selectively outputting data from these. A circuit portion including the incrementer 401, the selector 402, the instruction address buffer 403, and the instruction fetch buffer 405 is an instruction preparation unit that sequentially prefetches instructions from the ROM 101.

【0028】ステータスレジスタ406は、CPU4の
動作状態を表す各種フラグを有するレジスタである。命
令バッファ407からなる回路部分は、命令準備部によ
りプリフェッチされた複数の命令を保持する命令キュー
である。命令レジスタ408、ステータスレジスタ40
9、PLA410、マイクロ命令レジスタ411からな
る回路部分は、命令準備部又は命令キューから供給され
る命令を解読し、その実行を制御する命令制御部であ
る。また、この命令制御部は、タスク切り換えを指示す
るイベントが発生する毎に、タスクスケジュールテーブ
ル2の内容に従ってタスクを切り換える制御およびレジ
スタセットを交互に切り換える制御を行う。本実施例で
は上記イベントは、タイマー(図外)による200mS
毎の周期的な割込みとする。また、命令制御部は、内部
バス418に対してデータを入出力する制御を行う。
The status register 406 is a register having various flags indicating the operating state of the CPU 4. The circuit portion including the instruction buffer 407 is an instruction queue that holds a plurality of instructions prefetched by the instruction preparation unit. Instruction register 408, status register 40
The circuit portion including the PLA 410 and the micro instruction register 411 is an instruction control unit that decodes the instruction supplied from the instruction preparation unit or the instruction queue and controls its execution. In addition, this instruction control unit performs control for switching tasks according to the contents of the task schedule table 2 and control for alternately switching register sets each time an event for instructing task switching occurs. In this embodiment, the above event is 200 ms by a timer (not shown).
It is a periodic interrupt for each. The instruction control unit also controls the input / output of data to / from the internal bus 418.

【0029】ALU412、ALOB413、オペラン
ドアドレスバッファ414、ストアバッファ415、ロ
ードバッファ416、セレクタ417からなる回路部分
は、命令制御部の制御に従って命令を実行する命令実行
部である。内部バス418は、2本のバスからなり、主
としてレジスタファイル3に対して読み書きされるデー
タを伝達する。
The circuit portion including the ALU 412, the ALOB 413, the operand address buffer 414, the store buffer 415, the load buffer 416, and the selector 417 is an instruction execution unit that executes an instruction under the control of the instruction control unit. The internal bus 418 is composed of two buses and mainly transfers data to be read from and written to the register file 3.

【0030】メモリバス419は、アドレスバスとデー
タバスとからなり、主としてROM101、RAM10
2、周辺回路に対してアドレス、データを伝達する。バ
スコントローラ420は、メモリバス419を使用する
アクセスが競合する場合、例えば、命令準備部によるプ
リフェッチと、命令実行部によるオペランドデータのロ
ード/ストアとが競合する場合に、バス使用を調停す
る。バスコントローラ420は、この調停によりメモリ
バス419に対してデータを入出力するための各種制御
信号を出力する。
The memory bus 419 is composed of an address bus and a data bus, and mainly includes the ROM 101 and the RAM 10.
2. Transfer addresses and data to peripheral circuits. The bus controller 420 arbitrates the bus usage when the accesses using the memory bus 419 compete, for example, when the prefetch by the instruction preparation unit and the load / store of operand data by the instruction execution unit compete. The bus controller 420 outputs various control signals for inputting / outputting data to / from the memory bus 419 by this arbitration.

【0031】クロック供給部421は、CPU4及び転
送部5に対して動作クロックを供する。転送制御部50
1は、PLA502、マイクロ命令レジスタ503から
なり、命令制御部によりタスクの切り換えが行われた直
後に、CPU4により使用されていない方のレジスタセ
ットの内容を、切り換えの直前に実行されていたのタス
クの退避領域に退避し、さらに、現在実行されているタ
スクの次に実行すべきタスクの退避領域の内容を当該レ
ジスタセットに復帰する制御を行う。
The clock supply unit 421 supplies an operation clock to the CPU 4 and the transfer unit 5. Transfer control unit 50
1 includes a PLA 502 and a microinstruction register 503, and immediately after the task switching is performed by the instruction control unit, the contents of the register set not used by the CPU 4 are executed immediately before the switching. Of the task to be executed next to the currently executed task is restored to the register set.

【0032】PLA502は、前記退避及び復帰を実現
するマイクロ命令を発行する。マイクロ命令レジスタ5
03は、PLA502からのマイクロ命令に対応する制
御信号を出力する。TSTB(Task Schedule Table Ba
se)504は、RAM102内に設けられたタスクスケ
ジュールテーブルの先頭アドレスを保持するレジスタで
ある。
The PLA 502 issues a microinstruction for realizing the save and restore. Micro instruction register 5
03 outputs a control signal corresponding to the micro instruction from the PLA 502. TSTB (Task Schedule Table Ba
se) 504 is a register that holds the start address of the task schedule table provided in the RAM 102.

【0033】TSTP(Task Schedule Table Pointe
r)505は、タスクスケジュールテーブルにおいて、
タスク切り換え要求が発生した時点で現在実行中のタス
クの次に実行すべきタスクを指すポインタを保持するレ
ジスタである。オペランドアドレスバッファ(以下、D
OABと略す)506は、上記退避及び復帰に際してメ
モリアドレスを保持し、メモリバス中のアドレスバスを
介してメモリ1に出力する。
TSTP (Task Schedule Table Pointe)
r) 505 is the task schedule table
This is a register that holds a pointer that points to a task to be executed next to the task that is currently being executed when a task switching request is issued. Operand address buffer (hereinafter D
An OAB (abbreviated as OAB) 506 holds a memory address at the time of saving and restoring and outputs it to the memory 1 via the address bus in the memory bus.

【0034】ストアバッファ(以下、DSTBと略す)
507は、上記退避に際して退避すべきデータを保持
し、メモリバス419中のデータバスを介してメモリ1
に出力する。ロードバッファ(以下、DSTBと略す)
508は、上記復帰に際して、メモリ1から読み出され
た復帰すべきデータを、メモリバス419中のデータバ
スを介して入力して保持する。
Store buffer (hereinafter abbreviated as DSTB)
Reference numeral 507 holds the data to be saved at the time of saving, and the data is stored in the memory 1 via the data bus in the memory bus 419.
Output to Load buffer (abbreviated as DSTB below)
At the time of the restoration, the data 508 inputs and holds the data to be restored read from the memory 1 via the data bus in the memory bus 419.

【0035】加算器509は、DOAB506の内容
と、定数発生器510からの定数加算し、加算結果をD
OAB506に出力する。これにより退避時および復帰
時に、それぞれの退避領域の個々データ格納場所のアド
レスを先頭から順に生成する。図3は、タスクスケジュ
ールテーブル、タスク用退避領域のメモリマップの一例
を示す。
The adder 509 adds the contents of the DOAB 506 and the constant from the constant generator 510, and the addition result is D
Output to OAB506. As a result, the addresses of the individual data storage locations in the respective save areas are sequentially generated from the beginning at the time of saving and returning. FIG. 3 shows an example of a task schedule table and a memory map of a task save area.

【0036】同図において、「TSTB」は、タスクス
ケジュールテーブルの先頭アドレスを指すポインタであ
り、TSTB504に保持される。「TSTP」は、タ
スク切り換え要求が発生した時点で現在実行中のタスク
の次に実行すべきタスクを指すポインタあり、TSTP
505に保持される。「タスクスケジュールテーブル」
は、各タスク用のスタックポインタの退避場所を示すア
ドレスを、タスクの実行順に保持し、末尾にはx’FF
(16進数)を保持する。同図の例では、4つのタスク
1〜4が、1→2→3→1→4の順に実行することが指
定されている。この例ではタスク1が2回指定されてい
るので、タスク1〜4のそれぞれのCPU占有率は、4
0%、20%、20%、20%となる。
In the figure, “TSTB” is a pointer that points to the start address of the task schedule table and is held in the TSTB 504. “TSTP” is a pointer that points to the task that should be executed next to the task that is currently being executed when the task switching request is issued.
Held at 505. "Task schedule table"
Holds the address indicating the stack pointer save location for each task in the order in which the tasks are executed, with x'FF at the end.
Holds (hexadecimal number). In the example of the figure, four tasks 1 to 4 are specified to be executed in the order of 1 → 2 → 3 → 1 → 4. In this example, task 1 is specified twice, so the CPU occupancy of each of tasks 1 to 4 is 4
It becomes 0%, 20%, 20%, 20%.

【0037】「タスク用退避領域」には、「コンテキス
ト退避領域」と、「スタックポインタ退避領域」とから
なる。「コンテキスト退避領域」は、本実施例では各タ
スク用のスタック領域内に設けられている。つまりスタ
ック領域は、通常のスタックとしての使用に加えてコン
テキストの退避領域としても用いられる。同図では、タ
スク1〜4それぞれのコンテキストとして、A1、A
0、D1、D0、PSW、PC(このPCはIAB40
3またはPFC404の内容)の各レジスタの内容が記
憶される。
The "task save area" includes a "context save area" and a "stack pointer save area". The “context save area” is provided in the stack area for each task in this embodiment. That is, the stack area is used not only as a normal stack but also as a context save area. In the figure, the contexts of tasks 1 to 4 are A1 and A, respectively.
0, D1, D0, PSW, PC (This PC is IAB40
3 or the contents of the PFC 404).

【0038】「スタックポインタ退避領域」は、各タス
ク毎にスタックポインタの内容を記憶する。同図ではタ
スク1〜4の各スタックポインタの内容が記憶されてい
る。この領域に退避されているスタックポインタの値
は、現在実行されていない各タスクについて、コンテキ
スト退避領域の先頭位置を指す示す。例えば、退避され
たタスク3用スタックポインタの値は、タスク3からタ
スク1に切り換えられた直後である場合には、タスク3
の実行で用いられていたスタック領域の先頭位置を指し
示すが、タスク3のコンテキストの退避が完了した後
は、コンテキスト退避領域の先頭位置を指し示す。さら
にその後、タスク3のコンテキストの復帰が完了した後
は、タスク3のスタック領域の先頭位置を指し示す。タ
スク3の実行中は意味を持たない。
The "stack pointer save area" stores the contents of the stack pointer for each task. In the figure, the contents of each stack pointer of tasks 1 to 4 are stored. The value of the stack pointer saved in this area indicates the start position of the context saving area for each task that is not currently executed. For example, when the value of the saved stack pointer for task 3 is immediately after switching from task 3 to task 1,
It indicates the top position of the stack area used in the execution of, but after the context save of task 3 is completed, it indicates the start position of the context save area. After that, after the context of task 3 is completely restored, the start position of the stack area of task 3 is indicated. It has no meaning during the execution of task 3.

【0039】同図ではタスク3から1への切り換え直後
に、タスク3のコンテキストが退避され、次のタスク切
り換え要求発生後に実行すべきタスク4のコンテキスト
が復帰される様子を示している。このとき、コンテキス
ト退避領域のアドレスはDOAB506により指定さ
れ、退避データはDSTB507によりメモリ1に出力
され、復帰データはDLDB508によりメモリ1から
入力される。
In the figure, the context of task 3 is saved immediately after switching from task 3 to 1, and the context of task 4 to be executed is restored after the next task switching request is issued. At this time, the address of the context save area is designated by the DOAB 506, the save data is output to the memory 1 by the DSTB 507, and the restore data is input from the memory 1 by the DLDB 508.

【0040】図4は、転送制御部501の機能的な構成
を示すブロック図である。転送制御部501は、物理的
には図2に示したPLA502とマイクロ命令レジスタ
503から構成されるが、機能的には図4のように表す
ことができる。この転送制御部501は、内部バス空き
検出回路51、メモリバス空き検出回路52、レジスタ
読み出し制御部53、メモリ書き込み制御部54、メモ
リ読み出し制御部55、レジスタ書き込み制御部56か
ら構成される。
FIG. 4 is a block diagram showing the functional configuration of the transfer control unit 501. The transfer control unit 501 is physically composed of the PLA 502 and the micro instruction register 503 shown in FIG. 2, but can be functionally represented as shown in FIG. The transfer control unit 501 includes an internal bus vacancy detection circuit 51, a memory bus vacancy detection circuit 52, a register read control unit 53, a memory write control unit 54, a memory read control unit 55, and a register write control unit 56.

【0041】内部バス空き検出回路51は、内部バス4
18が空きである(CPUによって使用されていない)
サイクルを検出する。より具体的には、内部バス空き検
出回路51は、マイクロ命令レジスタ411の内部バス
制御フィールドがNOP(ノー・オペレーション)を示
す場合に空きであると判定するとともに、空きである場
合にレジスタ読み出し制御部53及びレジスタ書き込み
制御部56にレジスタへのアクセスを許可する。ここ
で、内部バス制御フィールドとは、マイクロ命令レジス
タ411から出力される各種制御信号群のうち、内部バ
スに対するデータ入出力を指示する制御信号からなるフ
ィールドをいう。またNOPとは、当該フィールド内の
全ての制御信号がアクティブでない状態をいう。
The internal bus vacancy detection circuit 51 uses the internal bus 4
18 is empty (not used by CPU)
Detect cycles. More specifically, the internal bus vacancy detection circuit 51 determines that the internal bus control field of the micro instruction register 411 is vacant when the internal bus control field indicates NOP (no operation), and controls the register read control when it is vacant. The unit 53 and the register write control unit 56 are permitted to access the register. Here, the internal bus control field refers to a field of control signals for instructing data input / output to / from the internal bus among various control signal groups output from the micro instruction register 411. Further, NOP means a state in which all control signals in the field are inactive.

【0042】メモリバス空き検出回路52は、メモリバ
ス419が空きである(CPUによって使用されていな
い)サイクルを検出する。より具体的には、メモリバス
空き検出回路52は、バスコントローラ420のメモリ
バス制御フィールドがNOPを示す場合に空きであると
判定するとともに、空きである場合にメモリ書き込み制
御部54及びメモリ読み出し制御部55にメモリへのア
クセスを許可する。ここで、メモリバス制御フィールド
とは、バスコントローラ420から出力される全ての制
御信号フィールドのうち、メモリバスに対するデータ入
出力を指示する制御信号からなるフィールドをいう。
The memory bus empty detection circuit 52 detects a cycle in which the memory bus 419 is empty (not used by the CPU). More specifically, the memory bus vacancy detection circuit 52 determines that the memory bus control field of the bus controller 420 is vacant when the memory bus control field indicates NOP, and when it is vacant, the memory write control unit 54 and the memory read control. The unit 55 is allowed to access the memory. Here, the memory bus control field is a field including control signals for instructing data input / output to / from the memory bus among all control signal fields output from the bus controller 420.

【0043】レジスタ読み出し制御部53は、内部バス
空き検出回路51によりレジスタへのアクセスが許可さ
れているときに、CPUのタスク実行に使用されていな
いレジスタセットから個々のレジスタデータを順に読み
出してDSTB507に格納する。メモリ書き込み制御
部54は、メモリバス空き検出回路52によりメモリ1
へのアクセスが許可されているときに、DSTB507
に格納されたデータをメモリ1のコンテキスト退避領域
に順に書き込む。その際、メモリ書き込み制御部54
は、まず、現在実行中のタスクの1つ前のタスクのコン
テキスト退避領域の先頭アドレスをDOAB506に設
定し、以降、データを書き込む毎にDOAB506を更
新する。
When the internal bus vacancy detection circuit 51 permits access to the registers, the register read control unit 53 sequentially reads individual register data from the register set that is not used for CPU task execution, and the DSTB 507. To store. The memory write control unit 54 causes the memory bus availability detection circuit 52 to execute the memory 1
Access to DSTB 507 when access is allowed
The data stored in 1 is sequentially written in the context save area of the memory 1. At that time, the memory write control unit 54
First, the head address of the context save area of the task immediately before the currently executing task is set in the DOAB 506, and thereafter, the DOAB 506 is updated every time data is written.

【0044】メモリ読み出し制御部55は、コンテキス
トの退避完了後、メモリバス空き検出回路52によりメ
モリ1へのアクセスが許可されているときに、メモリ1
のコンテキスト退避領域からデータを順に読み出してD
LDB508に格納する。その際、メモリ読み出し制御
部55は、まず、現在実行中のタスクの次のタスクのコ
ンテキスト退避領域の先頭アドレスをDOAB506に
設定し、以降、データを書き込む毎にDOAB506を
更新する。
After the context saving is completed, the memory read control unit 55, when the access to the memory 1 is permitted by the memory bus availability detection circuit 52, the memory 1
Data in sequence from the context save area of
Store in LDB 508. At that time, the memory read control unit 55 first sets the start address of the context save area of the task next to the currently executing task in the DOAB 506, and thereafter updates the DOAB 506 every time data is written.

【0045】レジスタ書き込み制御部56は、内部バス
空き検出回路51によりレジスタへのアクセスが許可さ
れているときに、DLDB508のデータを、CPUの
タスク実行に使用されていないレジスタセットの対応す
るレジスタを順に書き込む。図5は、CPU4によるタ
スク切り換え処理、及び、転送部5による詳細なコンテ
キスト退避・復帰処理を表すフローチャートである。
The register write control unit 56 transfers the data of the DLDB 508 to the corresponding register of the register set which is not used for the task execution of the CPU when the access to the register is permitted by the internal bus vacancy detection circuit 51. Write in order. FIG. 5 is a flowchart showing task switching processing by the CPU 4 and detailed context saving / restoring processing by the transfer unit 5.

【0046】まず、タスク切り換え処理について説明す
る。CPU4は、タスク切り換え要求が発生すると、I
AB403またはPFC404の内容をタスク復帰時の
戻りPC値として当該タスクのスタック領域に退避する
とともに、PSWの内容も退避し(ステップ501)、
タスク実行で使用していたレジスタセットを他方のレジ
スタセットに切り換え、転送制御部501を起動する
(ステップ502)。このとき、新たなレジスタセット
には次に実行すべきタスクのコンテキストが復帰されて
いるので、CPU4は、次タスクのスタック領域からP
SWと戻りPC値とを復帰させることにより次タスクの
実行を開始する(ステップ503)。
First, the task switching process will be described. When the task switching request is issued, the CPU 4
The contents of AB403 or PFC404 are saved in the stack area of the task as a return PC value at the time of task recovery, and the contents of PSW are also saved (step 501).
The register set used for task execution is switched to the other register set, and the transfer control unit 501 is activated (step 502). At this time, since the context of the task to be executed next has been restored to the new register set, the CPU 4 sets P from the stack area of the next task.
The execution of the next task is started by restoring the SW and the return PC value (step 503).

【0047】次に、転送部5によるコンテキスト退避・
復帰処理を説明する。なお、フローチャート中”I”を
記した各ステップは、内部バス空き検出回路51により
内部バスが空いていると検出されたサイクルにおいて実
行されること示し、”M”を記した各ステップは、メモ
リバス空き検出回路52によりメモリバスが空いている
と検出されたサイクルにおいて実行されることを示す。
Then, the transfer unit 5 saves the context
The return process will be described. Note that each step marked "I" in the flowchart is executed in a cycle in which the internal bus vacancy detection circuit 51 detects that the internal bus is vacant, and each step marked "M" is a memory. This indicates that the processing is executed in the cycle in which the bus vacancy detection circuit 52 detects that the memory bus is vacant.

【0048】転送部5の起動後、レジスタ読み出し制御
部53は、ステップ502の切り換えによりCPUに使
用されなくなったレジスタセットのSPの内容を読み出
し、DOAB506に格納する(ステップ504)。こ
のときDOAB506の内容は、スタック領域内に設け
られたコンテキスト退避領域の先頭アドレスを表す。レ
ジスタ読み出し制御部53およびメモリ書き込み制御部
54は、レジスタセットの各レジスタの内容をコンテキ
スト退避領域に退避する(ステップ505〜508)。
さらに、メモリ読み出し制御部55及びメモリ書き込み
制御部54は、この時点のDOAB506の内容をスタ
ックポインタ退避領域に退避する(ステップ509〜5
11)。これにより退避後のコンテキスト退避領域の先
頭アドレスがスタックポインタ退避領域に退避される。
これでコンテキストの退避が完了する。
After the transfer unit 5 is activated, the register read control unit 53 reads the contents of the SP of the register set that is no longer used by the CPU due to the switching of step 502 and stores it in the DOAB 506 (step 504). At this time, the contents of DOAB 506 represent the start address of the context save area provided in the stack area. The register read control unit 53 and the memory write control unit 54 save the contents of each register of the register set in the context save area (steps 505 to 508).
Further, the memory read control unit 55 and the memory write control unit 54 save the contents of the DOAB 506 at this point in the stack pointer save area (steps 509 to 5).
11). As a result, the start address of the context saving area after saving is saved in the stack pointer saving area.
This completes saving the context.

【0049】次に、メモリ読み出し制御部55は、TS
TP505の内容を現在実行中の次に実行すべきタスク
を指すように更新し(ステップ512)、次タスクのコ
ンテキスト退避領域の先頭アドレスをスタックポインタ
退避領域から読み出し、DOAB506に格納する(ス
テップ513)。このときDOAB506の内容がx’
FF(16進数)であれば、テーブルの末尾を表すので
TSTP505の内容をTSTB504に保持された先
頭アドレスに更新してから再度ステップ513を行う
(ステップ514、515)。
Next, the memory read control unit 55 causes the TS
The contents of the TP 505 are updated to point to the next task to be executed currently (step 512), the start address of the context save area of the next task is read from the stack pointer save area, and stored in the DOAB 506 (step 513). . At this time, the content of DOAB506 is x '.
If it is FF (hexadecimal number), it indicates the end of the table, so the contents of TSTP 505 are updated to the start address held in TSTB 504, and then steps 513 are performed again (steps 514 and 515).

【0050】さらに、メモリ読み出し制御部55及びレ
ジスタ書き込み制御部56は、次タスクのコンテキスト
退避領域の各データを、レジスタセットに復帰する(ス
テップ516〜519)。さらに、レジスタ書き込み制
御部56は、この時点のDOAB506の内容をレジス
タセットのSPに書き込む(ステップ520)。これに
より次タスクのスタック領域の先頭アドレスがSPに設
定される。これで次タスクのコンテキストの復帰が完了
する。
Further, the memory read control unit 55 and the register write control unit 56 restore each data in the context save area of the next task to the register set (steps 516 to 519). Further, the register write control unit 56 writes the contents of the DOAB 506 at this point in the SP of the register set (step 520). As a result, the start address of the stack area of the next task is set to SP. This completes the restoration of the context of the next task.

【0051】以上のように構成された本発明の実施例に
おけるマイクロコンピュータについて、タスク切り換え
動作を説明する。今、タスクスケジュールテーブル2
は、図3に示したように4つのタスク1〜4が、1→2
→3→1→4の順に実行することが指定されていて、タ
スク3が実行中であるものとする。この状態でタイマー
割込みが、タスク切り換えを要求するイベントとして発
生した場合、CPU4は、割込み処理においてタスク3
の戻りPC及びPSWの退避、レジスタセットの切り換
え、タスク1のPSW及び戻りPCの復帰(図5のステ
ップ501〜503)をすることにより、タスク3から
タスク1に切り換える。
The task switching operation of the microcomputer according to the embodiment of the present invention configured as above will be described. Now, task schedule table 2
As shown in FIG. 3, the four tasks 1-4 are 1 → 2.
It is assumed that the execution is specified in the order of → 3 → 1 → 4 and that task 3 is being executed. If a timer interrupt occurs as an event requesting task switching in this state, the CPU 4 causes the task 3
The task 3 is switched to the task 1 by saving the return PC and PSW, switching the register set, and restoring the task 1 PSW and the return PC (steps 501 to 503 in FIG. 5).

【0052】転送部5は、レジスタセットの切り換えと
同時に起動され、CPU4のタスク1実行中に内部バス
418、メモリバス419の空きサイクルを利用して、
図3および図5に示したように、タスク3のコンテキス
トの退避処理と、タスク4のコンテキスト復帰処理とを
行う。以上説明してきたように本発明のマイクロコンピ
ュータによれば、CPU4は、戻りPC及びPSWの退
避・復帰と、レジスタセットの切り換えを行うだけでタ
スクを切り換えることができるので、タスク切り換えに
よるCPUのオーバーヘッドが極めて少なく、高速なタ
スク切り換えを実現する。しかも、タスク切り換えに必
要なハードウェア構成は、レジスタセットを1つ分と転
送部を追加するだけなので、より小さいハードウェア規
模で実現できるという利点がある。この点、特に組み込
み用途の1チップマイクロコンピュータに適している。
The transfer unit 5 is started at the same time as the register set is switched, and while the task 1 of the CPU 4 is executing, the transfer unit 5 uses an empty cycle of the internal bus 418 and the memory bus 419,
As shown in FIGS. 3 and 5, the context saving process of the task 3 and the context restoring process of the task 4 are performed. As described above, according to the microcomputer of the present invention, the CPU 4 can switch the task only by saving / restoring the return PC and PSW and switching the register set. Realize fast task switching with very few. In addition, the hardware configuration required for task switching has an advantage that it can be realized with a smaller hardware scale because only one register set and a transfer unit are added. In this respect, it is particularly suitable for a one-chip microcomputer for embedded applications.

【0053】また転送部5は、CPU4のタスク実行中
に内部バス及びメモリバスの空きサイクルを利用してコ
ンテキストの退避・復帰を行うので、CPUのタスク実
行を全く妨げないので、CPUの処理能力を最大限に活
用することができる。さらに、2つのレジスタセットを
交互にタスクに割当てるので、CPUが実行するタスク
数に制限がない。このタスク数は、コンテキスト退避領
域を設けることが前提なので、メモリ容量の許す限りタ
スク数を増やすことができる。
Further, since the transfer unit 5 saves and restores the context by utilizing the empty cycles of the internal bus and the memory bus during the task execution of the CPU 4, it does not hinder the task execution of the CPU at all. Can make the most of. Further, since the two register sets are alternately assigned to the tasks, there is no limit to the number of tasks executed by the CPU. Since the number of tasks is based on the provision of the context save area, the number of tasks can be increased as long as the memory capacity permits.

【0054】また、タスクスケジュールテーブル2内に
同一タスクを複数記述するだけで、タスクのCPU占有
時間の制御を容易にすることができる。例えば、図3の
例ではタスク1は、テーブル内の2箇所に記述されるだ
けで、他のタスク2、3、4の2倍の占有時間(40
%)を確保している。なお、上記実施例では、タスク切
り換えを要求するイベントを、周期200mSのタイマ
ー割込とした。イベント周期は、転送部5がCPU4の
タスク実行の背後でバスの空きサイクルを利用してコン
テキストの転送(退避・復帰)を行っているので、タス
ク実行においてバスの空サイクル数が十分生じるだけの
時間を確保する必要がある。本実施例の構成ではイベン
ト周期として数百μS〜数mS以上が望ましい。
Further, by describing a plurality of the same tasks in the task schedule table 2, it is possible to easily control the CPU occupation time of the tasks. For example, in the example of FIG. 3, task 1 is described only in two places in the table, and the occupied time (40 times) of other tasks 2, 3, and 4 (40
%) Is secured. In the above embodiment, the event requesting task switching is a timer interrupt with a cycle of 200 mS. In the event cycle, since the transfer unit 5 transfers (saves / restores) the context by utilizing an empty cycle of the bus behind the task execution of the CPU 4, only a sufficient number of empty cycles of the bus are generated in the task execution. It is necessary to secure time. In the configuration of this embodiment, it is desirable that the event cycle be several hundreds μS to several mS or more.

【0055】また、上記実施例では、イベントをタイマ
ー割込としたが、これ以外にもタスクスイッチ命令、特
定ポート(シリアルポートなど)の割り込み等であって
もよい。上記実施例では、図3に示したようにタスク退
避領域をSP退避領域とコンテキスト退避領域とに分け
て構成したが、1つの領域にまとめてもよい。また、タ
スクスケジュールテーブル2にはタスク毎にSP退避領
域のアドレスを格納するよう構成したが、タスク番号を
格納する構成としてもよい。この場合、タスク番号に対
応するSP退避領域のアドレスを求めるためのテーブル
を設ければよい。
In the above embodiment, the event is the timer interrupt, but other than this, it may be a task switch command, a specific port (serial port, etc.) interrupt, or the like. In the above embodiment, the task save area is divided into the SP save area and the context save area as shown in FIG. 3, but may be combined into one area. Although the task schedule table 2 is configured to store the address of the SP save area for each task, it may be configured to store the task number. In this case, a table may be provided for obtaining the address of the SP save area corresponding to the task number.

【0056】図8は、本発明の他の実施例におけるマイ
クロコンピュータの詳細な構成を占めずブロック図であ
る。同図の構成は、図2に対してクロック供給部421
の代わりにクロック供給部422が設けられている点
と、停止回路511が追加されている点のみが異なる。
これらの点以外は先の実施例と同じなので異なる点のみ
を説明ずる。
FIG. 8 is a block diagram not occupying a detailed configuration of a microcomputer in another embodiment of the present invention. The configuration of the figure is similar to that of FIG.
The difference is that a clock supply unit 422 is provided instead of the above, and a stop circuit 511 is added.
Except for these points, it is the same as the previous embodiment, and only different points will be described.

【0057】クロック供給部422は、CPU4および
転送部5に動作クロックを供給する点は同じであるが、
CPU4に対しては停止部511の指示に従って動作ク
ロックの供給を停止する点が異なる。停止部511は、
転送部5の転送動作中に、タスク切り換えを要求するイ
ベントが発生した場合に、転送動作が終了するまでの間
クロック供給部422によるCPU4へのクロック供給
を停止する。具体的には、転送部5が転送動作中である
ことを示す転送中フラグを内部に有し、退避開始時点で
セットし、復帰終了時点でリセットする。また、停止部
511は、前記イベントを表すタイマー割り込み信号が
アクティブで、かつ、フラグがセットされていれば、ク
ロック供給部422にCPU4への動作クロック供給を
停止するよう指示する。その後フラグがリセットされた
時点で、前記停止指示を解除する。
The clock supply unit 422 is the same in that the operation clock is supplied to the CPU 4 and the transfer unit 5, but
It differs from the CPU 4 in that the supply of the operation clock is stopped in accordance with an instruction from the stop unit 511. The stop unit 511 is
When an event requesting task switching occurs during the transfer operation of the transfer unit 5, the clock supply unit 422 stops the clock supply to the CPU 4 until the transfer operation ends. Specifically, the transfer unit 5 internally has a transfer flag indicating that the transfer operation is in progress, and the transfer flag is set at the start of saving and reset at the end of return. Further, the stop unit 511 instructs the clock supply unit 422 to stop the supply of the operation clock to the CPU 4 when the timer interrupt signal indicating the event is active and the flag is set. After that, when the flag is reset, the stop instruction is released.

【0058】以上のように構成された本実施例のマイク
ロコンピュータの動作を以下説明する。転送部5により
退避・復帰動作は先の実施例と全く同じである。この退
避・復帰動作中に、タスク切り換えを要求するタイマー
割込みが発生したものとする。この場合、停止部511
の指示によってクロック供給部422がCPU4への動
作クロックの供給を停止する。これによりCPU4は、
その動作を停止する。転送部5への動作クロックは供給
されているので、復帰動作の完了後には、前記フラグが
リセットされる。これにより停止部511は、前記停止
指示を解除するので、CPU4によるタスク切り換えお
よびタスク実行の動作が再開される。
The operation of the microcomputer of this embodiment constructed as described above will be described below. The save / restore operation by the transfer unit 5 is exactly the same as in the previous embodiment. During this save / restore operation, it is assumed that a timer interrupt requesting task switching occurs. In this case, the stop 511
Instruction, the clock supply unit 422 stops the supply of the operation clock to the CPU 4. This causes the CPU 4 to
Stop the operation. Since the operation clock is supplied to the transfer unit 5, the flag is reset after the restoration operation is completed. As a result, the stop unit 511 releases the stop instruction, and the operations of task switching and task execution by the CPU 4 are restarted.

【0059】以上のように本実施例では、転送部5によ
る転送動作が終了しないうちに、タスク切り換えを要求
するイベントが発生した場合には、CPU4の動作を止
めて転送を完了させてからCPU4の動作を再開させ
る。これにより、転送部5の転送時間がイベント発生間
隔よりも短い場合に、適切にタスク切り換えを実行する
ことができる。例えば、イベントが周期的な割込みでは
なく不定期に発生する割込みである場合や、内部バス4
18、メモリバス419の空きサイクルがほとんど発生
しないようなタスク(メモリデータの転送が大部分であ
るようなタスク)が存在する場合に、動作が停止する分
だけCPU4の処理能力が低くなるが、適切にタスク切
り換えを実行することができる。
As described above, in the present embodiment, when an event requesting task switching occurs before the transfer operation by the transfer unit 5 is completed, the operation of the CPU 4 is stopped to complete the transfer, and then the CPU 4 Restart the operation of. Accordingly, when the transfer time of the transfer unit 5 is shorter than the event occurrence interval, task switching can be appropriately executed. For example, if the event is an interrupt that occurs irregularly rather than a periodic interrupt, or if the internal bus 4
18. If there is a task (a task in which memory data is mostly transferred) in which a free cycle of the memory bus 419 hardly occurs, the processing capacity of the CPU 4 is reduced by the amount of the operation stopped, Appropriate task switching can be performed.

【0060】[0060]

【発明の効果】以上説明したように、請求項1の発明に
よれば、レジスタセットを1つ分と、転送手段をハード
ウェアとして追加するだけで、高速なタスク切り換えを
実現することができるという効果がある。特に組み込み
用途のマイクロコンピュータにおいては、ハードウェア
規模の制約があっても、タスクの高速切り換えを実現で
きるので、組み込み先の装置におけるリアルタイム制御
を可能にする。
As described above, according to the first aspect of the present invention, high-speed task switching can be realized only by adding one register set and transfer means as hardware. effective. Especially in a microcomputer for embedded use, high-speed switching of tasks can be realized even if there is a restriction on the hardware scale, and thus real-time control is possible in the device at the embedded destination.

【0061】請求項2の発明によれば、請求項1の効果
に加えて、タスク実行を全く妨げることなく、退避と復
帰を実現できるという効果がある。請求項3の発明によ
れば、レジスタセットを1つ分と、転送手段をハードウ
ェアとして追加するだけで、高速なタスク切り換えを実
現することができるという効果がある。特に組み込み用
途のマイクロコンピュータにおいては、ハードウェア規
模の制約があっても、タスクの高速切り換えを実現でき
るので、組み込み先の装置におけるリアルタイム制御を
可能にする。
According to the second aspect of the present invention, in addition to the effect of the first aspect, there is an effect that the saving and restoring can be realized without hindering the task execution at all. According to the invention of claim 3, there is an effect that high-speed task switching can be realized only by adding one register set and transfer means as hardware. Especially in a microcomputer for embedded use, high-speed switching of tasks can be realized even if there is a restriction on the hardware scale, and thus real-time control is possible in the device at the embedded destination.

【0062】請求項4の発明によれば、請求項3の効果
に加えて、タスクの実行順序として1つのタスクを複数
指定するだけで、中央演算処理手段におけるタスクの占
有率を簡単に制御できるという効果がある。請求項5の
発明によれば、請求項3又は4の効果に加えて、タスク
実行を全く妨げることなく、退避と復帰を実現できると
いう効果がある。
According to the invention of claim 4, in addition to the effect of claim 3, the task occupancy rate in the central processing unit can be easily controlled only by specifying a plurality of tasks as the task execution order. There is an effect. According to the invention of claim 5, in addition to the effect of claim 3 or 4, there is an effect that the saving and restoring can be realized without obstructing the task execution at all.

【0063】請求項6の発明によれば、請求項3、4又
は5の効果に加えて、退避・復帰に要するよりも短い周
期でタスク切り換えの要求が発生しても適切にタスクを
切り換えることができるので、タスク切り換え周期を幅
広く設定することができる。
According to the invention of claim 6, in addition to the effect of claim 3, 4 or 5, the task can be switched appropriately even if a task switching request is generated in a cycle shorter than that required for save / restore. Therefore, the task switching cycle can be set widely.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施例におけるマイクロコンピュータ
の主要な概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a main schematic configuration of a microcomputer according to an embodiment of the present invention.

【図2】同実施例におけるマイクロコンピュータのより
詳細な構成を示すブロック図である。
FIG. 2 is a block diagram showing a more detailed configuration of the microcomputer in the embodiment.

【図3】同実施例におけるタスクスケジュールテーブ
ル、タスク用退避領域のメモリマップの一例を示す。
FIG. 3 shows an example of a task schedule table and a memory map of a task save area in the embodiment.

【図4】同実施例における転送制御部501の機能的な
構成を示すブロック図である。
FIG. 4 is a block diagram showing a functional configuration of a transfer control unit 501 in the embodiment.

【図5】同実施例におけるCPU4によるタスク切り換
え処理、及び、転送部5による詳細なコンテキスト退避
・復帰処理を表すフローチャートである。
FIG. 5 is a flowchart showing a task switching process by the CPU 4 and a detailed context save / restore process by the transfer unit 5 in the embodiment.

【図6】第1の従来技術におけるマルチタスク機能を有
するコンピュータの説明図である。
FIG. 6 is an explanatory diagram of a computer having a multitask function according to a first conventional technique.

【図7】第2の従来技術におけるマルチタスク機能を有
するコンピュータの説明図である。
FIG. 7 is an explanatory diagram of a computer having a multitask function according to a second conventional technique.

【図8】本発明の他の実施例におけるマイクロコンピュ
ータの詳細は構成を示すブロック図である。
FIG. 8 is a block diagram showing a detailed configuration of a microcomputer according to another embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 メモリ 2 タスクスケジュールテーブル 3 レジスタファイル 4 CPU 5 転送部 51 内部バス空き検出回路 52 メモリバス空き検出回路 53 レジスタ読み出し制御部 54 メモリ書き込み制御部 55 メモリ読み出し制御部 56 レジスタ書き込み制御部 422 クロック供給部 501 転送制御部 502 PLA 503 マイクロ命令レジスタ 504 TSTB 504 ステップ 505 TSTP 506 DOAB 507 DSTB 508 DLDB 509 加算器 510 定数発生器 511 停止部 1 memory 2 task schedule table 3 register file 4 CPU 5 transfer unit 51 internal bus vacancy detection circuit 52 memory bus vacancy detection circuit 53 register read control unit 54 memory write control unit 55 memory read control unit 56 register write control unit 422 clock supply unit 501 transfer control unit 502 PLA 503 micro instruction register 504 TSTB 504 step 505 TSTP 506 DOAB 507 DSTB 508 DLDB 509 adder 510 constant generator 511 stop unit

フロントページの続き (72)発明者 松本 政彦 大阪府門真市大字門真1006番地 松下電器 産業株式会社内Front page continuation (72) Inventor Masahiko Matsumoto 1006 Kadoma, Kadoma City, Osaka Prefecture Matsushita Electric Industrial Co., Ltd.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 複数のタスクを順に切り換えながら実行
するマイクロコンピュータであって、 同一のレジスタ構成をもち、タスク実行に一方が使用さ
れる2つのレジスタセットと、 タスク切り換えと同時に、タスク実行に使用されるレジ
スタセットを他方に切り換える切り換え手段と、 レジスタセットに接続された内部バス、およびメモリに
接続されたメモリバスそれぞれの空サイクルを検出する
検出手段と、 タスク切り換え毎に、検出されたバスの空サイクルを利
用して、タスク実行に使用されていないレジスタセット
のデータをメモリに退避し、次の切り換え後に実行すべ
きタスク用のデータをメモリから当該レジスタセットに
復帰する転送手段とを備えることを特徴とするマイクロ
コンピュータ。
1. A microcomputer for executing a plurality of tasks while switching them in order, and two register sets having the same register configuration, one of which is used for task execution, and the other of which is used for task execution simultaneously with task switching. Switching means for switching the registered register set to the other, detecting means for detecting an empty cycle of each of the internal bus connected to the register set and the memory bus connected to the memory, and a detected bus for each task switching. A transfer means for saving data of a register set that is not used for task execution to a memory by utilizing an empty cycle and restoring data for the task to be executed from the memory to the register set after the next switching is provided. Microcomputer characterized by.
【請求項2】 前記転送手段は、 内部バスの空サイクルにおいて、タスク実行に使用され
ていないレジスタセットのレジスタデータを読み出すレ
ジスタ読み出し手段と、 メモリバスの空サイクルにおいて、レジスタ読み出し手
段により読み出されたデータをメモリに書き込むメモリ
書き込み手段と、 メモリ書き込み手段による書き込み完了後、メモリバス
の空サイクルにおいて、次のタスク用のデータをメモリ
から読み出すメモリ読み出し手段と、 内部バスの空サイクルにおいて、メモリ読み出し手段に
より読み出されたデータを、タスク実行に使用されてい
ないレジスタセットに書き込むレジスタ書き込み手段と
を有することを特徴とする請求項1記載のマイクロコン
ピュータ。
2. The transfer means reads register data of a register set which is not used for task execution in an empty cycle of the internal bus and register read means in an empty cycle of the memory bus. Memory write means for writing the data to the memory, and memory read means for reading the data for the next task from the memory in the empty cycle of the memory bus after the completion of the writing by the memory write means, and memory read in the empty cycle of the internal bus 2. The microcomputer according to claim 1, further comprising register writing means for writing the data read by the means to a register set that is not used for task execution.
【請求項3】 複数のタスクを順に切り換えながら実行
するマイクロコンピュータであって、 複数のタスクプログラムを記憶し、各タスクに対応する
データ退避領域を有するメモリと、 複数のタスクの実行順序を記憶するテーブル手段と、 同一のレジスタ構成をもつ2つのレジスタセットと、 テーブル手段の実行順序に従ってタスクを切り換え、レ
ジスタセットの一方を使用してタスクを実行する中央演
算処理手段と、 タスク切り換え毎に、中央演算処理手段のタスク実行に
使用されるレジスタセットを交互に切り換える切り換え
手段と、 レジスタセットに接続された内部バス、およびメモリに
接続されたメモリバスそれぞれの空サイクルを検出する
検出手段と、 タスク切り換え毎に、検出されたバスの空サイクルを利
用して、タスク実行に使用されていないレジスタセット
のデータを、切り換え前のタスクに対応するデータ退避
領域に退避する退避手段と、 退避手段による退避後、検出されたバスの空サイクルを
利用して、中央演算処理手段による実行中タスクの次の
タスクに対応するデータ退避領域のデータを、 タスク実行に使用されていないレジスタセットに復帰さ
せる復帰手段とを備えることを特徴とするマイクロコン
ピュータ。
3. A microcomputer for executing a plurality of tasks while switching them in order, storing a plurality of task programs, a memory having a data save area corresponding to each task, and an execution order of the plurality of tasks. A table means, two register sets having the same register configuration, a central processing unit for switching tasks according to the execution order of the table means and executing the task using one of the register sets, and a central processing unit for each task switching. Switching means for alternately switching the register set used for executing the task of the arithmetic processing means, detection means for detecting an empty cycle of each of the internal bus connected to the register set and the memory bus connected to the memory, and task switching Each time, the empty cycle of the detected bus is used to execute the task execution. A central processing unit that saves the data of the register set that is not used for saving to the data saving area corresponding to the task before switching and the detected empty cycle of the bus after saving by the saving unit. And a restoring means for restoring the data in the data save area corresponding to the next task of the task under execution to the register set not used for task execution.
【請求項4】前記メモリは、各タスク毎のスタック領域
内に前記データ退避領域を有し、 前記テーブル手段は、タスクの実行順序と、各タスクに
対応するスタックポインタの内容とを記憶することを特
徴とする請求項3記載のマイクロコンピュータ。
4. The memory has the data save area in a stack area for each task, and the table means stores an execution order of tasks and contents of a stack pointer corresponding to each task. The microcomputer according to claim 3, wherein
【請求項5】 前記退避手段は、 内部バスの空サイクルにおいて、タスク実行に使用され
ていないレジスタセットのレジスタデータを順に読み出
すレジスタ読み出し手段と、 メモリバスの空サイクルにおいて、レジスタ読み出し手
段により読み出されたデータを順に、切り換え前のタス
クに対応するデータ退避領域に書き込むメモリ書き込み
手段とを有し、 前記復帰手段は、 メモリ書き込み手段による書き込み完了後、メモリバス
の空サイクルにおいて、中央演算処理手段による実行中
タスクの次のタスクに対応するデータ退避領域のデータ
を順にメモリから読み出すメモリ読み出し手段と、 内部バスの空サイクルにおいて、メモリ読み出し手段に
より読み出されたデータを、タスク実行に使用されてい
ないレジスタセットに書き込むレジスタ書き込み手段と
を有することを特徴とする請求項3又は4記載のマイク
ロコンピュータ。
5. The saving means reads the register data of a register set which is not used for task execution in order in the empty cycle of the internal bus, and the register reading means in the empty cycle of the memory bus. Memory recovery means for sequentially writing the stored data to the data save area corresponding to the task before switching, and the recovery means is a central processing unit in an empty cycle of the memory bus after the writing by the memory writing means is completed. The memory read means for sequentially reading the data in the data save area corresponding to the next task of the task under execution from the memory from the memory and the data read by the memory read means in the empty cycle of the internal bus are used for the task execution. Cash register to write to no register set Claim 3 or 4 microcomputer wherein a and a data writing means.
【請求項6】 前記マイクロコンピュータは、さらに、 中央演算処理手段に動作クロックを供給するクロック供
給手段と、 復帰手段による復帰動作中に、中央演算処理手段により
タスク切り換えが発生した場合に、当該復帰動作が完了
するまでの間クロック供給手段の動作クロックの供給を
停止する停止手段とを備えることを特徴とする請求項
3、4又は5記載のマイクロコンピュータ。
6. The microcomputer further comprises a clock supply means for supplying an operation clock to the central processing means, and a recovery operation when the central processing means switches the task during the recovery operation by the recovery means. 6. The microcomputer according to claim 3, further comprising stop means for stopping the supply of the operation clock of the clock supply means until the operation is completed.
JP7166443A 1995-06-30 1995-06-30 Microcomputer Pending JPH0916409A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7166443A JPH0916409A (en) 1995-06-30 1995-06-30 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7166443A JPH0916409A (en) 1995-06-30 1995-06-30 Microcomputer

Publications (1)

Publication Number Publication Date
JPH0916409A true JPH0916409A (en) 1997-01-17

Family

ID=15831507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7166443A Pending JPH0916409A (en) 1995-06-30 1995-06-30 Microcomputer

Country Status (1)

Country Link
JP (1) JPH0916409A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003512671A (en) * 1999-10-20 2003-04-02 ソニー エレクトロニクス インク Method for supporting isochronous processing using parallel context switching
JP2007087108A (en) * 2005-09-22 2007-04-05 Fujitsu Ltd Arithmetic processing device, information processing device, and register file control method
WO2008023426A1 (en) * 2006-08-24 2008-02-28 Netcleus Systems Corporation Task processing device
US7386707B2 (en) 2002-01-09 2008-06-10 Matsushita Electric Industrial Co., Ltd. Processor and program execution method capable of efficient program execution
JP2008234075A (en) * 2007-03-16 2008-10-02 Fujitsu Ltd Arithmetic processing unit
US7600101B2 (en) 2005-01-13 2009-10-06 Hewlett-Packard Development Company, L.P. Multithreaded hardware systems and methods
US7735087B2 (en) 2003-03-13 2010-06-08 Panasonic Corporation Task switching apparatus, method and program
CN102436393A (en) * 2006-08-24 2012-05-02 科尼龙硅公司 Task treatment device
US8327379B2 (en) 2006-08-24 2012-12-04 Kernelon Silicon Inc. Method for switching a selected task to be executed according with an output from task selecting circuit
KR101353065B1 (en) * 2011-11-11 2014-01-20 재단법인대구경북과학기술원 Task Management Apparatus and Method used Task Scheduling Table of Real-time Operating System
US12481523B2 (en) 2017-12-26 2025-11-25 Silicon Mobility Sas Flexible logic unit adapted for real-time task switching

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003512671A (en) * 1999-10-20 2003-04-02 ソニー エレクトロニクス インク Method for supporting isochronous processing using parallel context switching
US8719827B2 (en) 2002-01-09 2014-05-06 Panasonic Corporation Processor and program execution method capable of efficient program execution
US7386707B2 (en) 2002-01-09 2008-06-10 Matsushita Electric Industrial Co., Ltd. Processor and program execution method capable of efficient program execution
US8006076B2 (en) 2002-01-09 2011-08-23 Panasonic Corporation Processor and program execution method capable of efficient program execution
US7921281B2 (en) 2002-01-09 2011-04-05 Panasonic Corporation Processor and program execution method capable of efficient program execution
US7930520B2 (en) 2002-01-09 2011-04-19 Panasonic Corporation Processor and program execution method capable of efficient program execution
US9823946B2 (en) 2002-01-09 2017-11-21 Socionext Inc. Processor and program execution method capable of efficient program execution
US8276156B2 (en) 2003-03-13 2012-09-25 Panasonic Corporation Task switching based on assigned time slot
US7735087B2 (en) 2003-03-13 2010-06-08 Panasonic Corporation Task switching apparatus, method and program
US7950016B2 (en) 2003-03-13 2011-05-24 Panasonic Corporation Apparatus for switching the task to be completed in a processor by switching to the task assigned time slot
US7600101B2 (en) 2005-01-13 2009-10-06 Hewlett-Packard Development Company, L.P. Multithreaded hardware systems and methods
JP2007087108A (en) * 2005-09-22 2007-04-05 Fujitsu Ltd Arithmetic processing device, information processing device, and register file control method
CN102436393A (en) * 2006-08-24 2012-05-02 科尼龙硅公司 Task treatment device
US8327379B2 (en) 2006-08-24 2012-12-04 Kernelon Silicon Inc. Method for switching a selected task to be executed according with an output from task selecting circuit
US9342350B2 (en) 2006-08-24 2016-05-17 Renesas Electronics Corporation System for selecting a task to be executed according to an output from a task control circuit
US9753729B2 (en) 2006-08-24 2017-09-05 Renesas Electronics Corporation System for selecting a task to be executed according to an output from a task control circuit
WO2008023426A1 (en) * 2006-08-24 2008-02-28 Netcleus Systems Corporation Task processing device
JP2008234075A (en) * 2007-03-16 2008-10-02 Fujitsu Ltd Arithmetic processing unit
KR101353065B1 (en) * 2011-11-11 2014-01-20 재단법인대구경북과학기술원 Task Management Apparatus and Method used Task Scheduling Table of Real-time Operating System
US12481523B2 (en) 2017-12-26 2025-11-25 Silicon Mobility Sas Flexible logic unit adapted for real-time task switching

Similar Documents

Publication Publication Date Title
US5557766A (en) High-speed processor for handling multiple interrupts utilizing an exclusive-use bus and current and previous bank pointers to specify a return bank
EP0955583A2 (en) Context switching technique for processors with large register files
US20020083373A1 (en) Journaling for parallel hardware threads in multithreaded processor
US7590774B2 (en) Method and system for efficient context swapping
JP4226085B2 (en) Microprocessor and multiprocessor system
JPH08305585A (en) Interrupt control device
JP3605978B2 (en) Microcomputer
JPH0916409A (en) Microcomputer
KR970003321B1 (en) System using microprocessor address lines coprocessor selection within a multi-coprocessor apparatus
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
US20050125801A1 (en) Method and apparartus for context switching in computer operating systems
US5948093A (en) Microprocessor including an interrupt polling unit configured to poll external devices for interrupts when said microprocessor is in a task switch state
JP2001249808A (en) Information processing device
JP4160228B2 (en) Microprocessor
JP2009193378A (en) Vector processing device
JPH08255476A (en) Apparatus and method for memory extended stack in data-processing system
JPH0668725B2 (en) Device for responding to interrupt condition in data processing system and method for responding to asynchronous interrupt condition
JPH056281A (en) Information processor
JP3077807B2 (en) Microcomputer system
JPH03257665A (en) Information processor
JPH0377137A (en) Information processor
JP5185478B2 (en) Pipeline processing method and pipeline processing apparatus using the method
JPH05165641A (en) Single chip microcomputer
JP3071210B2 (en) Task management control method
JP2002278753A (en) Data processing system