JPH03266035A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH03266035A
JPH03266035A JP6425190A JP6425190A JPH03266035A JP H03266035 A JPH03266035 A JP H03266035A JP 6425190 A JP6425190 A JP 6425190A JP 6425190 A JP6425190 A JP 6425190A JP H03266035 A JPH03266035 A JP H03266035A
Authority
JP
Japan
Prior art keywords
task
address
execution
memory
register
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
JP6425190A
Other languages
Japanese (ja)
Inventor
Shigeki Masumura
茂樹 増村
Terumi Sawase
澤瀬 照美
Yasushi Akao
赤尾 泰
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.)
Hitachi ULSI Engineering Corp
Hitachi Ltd
Original Assignee
Hitachi ULSI Engineering Corp
Hitachi 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 Hitachi ULSI Engineering Corp, Hitachi Ltd filed Critical Hitachi ULSI Engineering Corp
Priority to JP6425190A priority Critical patent/JPH03266035A/en
Priority to US07/621,641 priority patent/US5307464A/en
Priority to KR1019900019976A priority patent/KR100212097B1/en
Priority to DE69032342T priority patent/DE69032342T2/en
Priority to EP96112686A priority patent/EP0740254A3/en
Priority to EP90123577A priority patent/EP0431641B1/en
Publication of JPH03266035A publication Critical patent/JPH03266035A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To dynamically change the execution sequence and the execution speed of plural tasks by providing a memory which can execute the programming of the execution sequence of plural tasks, and changing dynamically the address sequence for reading the memory. CONSTITUTION:In an execution task control memory 105 which can execute the programming of the execution sequence of plural tasks, a task execution train and control information for controlling the read-out sequence are stored, and the task corresponding to the task number read out by an execution task read-out register 106 is executed selectively and successively. The read-out address of this execution task control memory 105 is generated by the combining values of a first counter 101 and a second counter 102, and a register 103, and by changing this combining method, plural address sequences corresponding to its combining method are changed dynamically. In such a manner, the execution sequence of plural tasks can be changed dynamically.

Description

【発明の詳細な説明】[Detailed description of the invention] 【産業上の利用分野】[Industrial application field]

本発明は、複数タスクを実行可能なマイクロコンピュー
タに係り、特に実行タスク列の変更を行なうのに好適な
マイクロコンピュータに関する。 (従来の技術1 従来、マイクロコンピュータの高速化手法として、いわ
ゆるパイプライン型アーキテクチャが知られている。こ
のパイプライン型アーキテクチャにおいては、パイプラ
インの段数を増加させる(パイプラインの段数を深くす
る)ことにより、パイプラインを1段進めるための時間
を少なくすることができ、最大性能が向上する。 しかし、パイプライン段数が深くなると、パイプライン
内でそれぞれ実行中の命令同志が使用するリソースにた
いして競合が生じる。これを回避するためには、後続命
令をリソースの仕様可能時期まで遅らせて実行しなけれ
ばならず、パイプラインの実行性能が低下してしまう。 そこで、上記のようなリソース競合を起こさないような
複数のプログラム列を順番に実行させるマルチタスクア
ーキテクチャが提案されている。 このアーキテクチャの例としては、情報処理学会第35
回(昭和63年後期)全国大会講演論文集、第191頁
から第192頁、あるいは、情報処理学会第37回(昭
和63年後期)全国大会講演論文集、第123頁から第
124頁において論じられている。 また、マルチタスクアーキテクチャを用いて複数のマイ
クロプログラムを時分割的に実行する並列処理マイクロ
プロセッサとしては、特開昭56−99546号、及び
特公平1−23812号が知られている。
The present invention relates to a microcomputer capable of executing multiple tasks, and more particularly to a microcomputer suitable for changing the sequence of execution tasks. (Conventional technology 1) A so-called pipeline architecture has been known as a technique for speeding up microcomputers. In this pipeline architecture, the number of pipeline stages is increased (the number of pipeline stages is deepened). This reduces the time it takes to advance the pipeline one stage, improving maximum performance. However, as the number of pipeline stages increases, each instruction being executed in the pipeline competes for resources. In order to avoid this, subsequent instructions must be executed with a delay until the time when resources can be used, which degrades the execution performance of the pipeline. A multi-task architecture has been proposed that sequentially executes multiple program sequences that would otherwise not be possible.An example of this architecture is
Discussed in the Proceedings of the 37th (Late of 1988) National Convention, pp. 191 to 192, or the 37th (Late of 1988) National Convention of the Information Processing Society, pp. 123 to 124. It is being Further, as parallel processing microprocessors that execute a plurality of microprograms in a time-sharing manner using a multitasking architecture, Japanese Patent Laid-Open No. 56-99546 and Japanese Patent Publication No. 1-23812 are known.

【発明が解決しようとする課題】[Problem to be solved by the invention]

上記従来技術では、複数のタスクの実行順序や実行速度
を変更するためには、プログラムの書き替えやハードウ
ェアの論理変更が必要であった。 したがって、マイクロコンピュータの動作時において、
動的に複数タスクの実行順序や実行速度を変更すること
ができないという問題があった。 本発明の目的は、マイクロコンピュータの動作時におい
ても、種々の条件に対応して、実行するタスクの数や種
類、又、実行するタスクの順序やタスクごとの実行速度
を変更することが可能なマイクロコンピュータを提供す
ることにある。
In the conventional technology described above, in order to change the execution order and execution speed of a plurality of tasks, it is necessary to rewrite the program or change the logic of the hardware. Therefore, when the microcomputer operates,
There was a problem in that it was not possible to dynamically change the execution order and execution speed of multiple tasks. An object of the present invention is to make it possible to change the number and types of tasks to be executed, the order of tasks to be executed, and the execution speed of each task in response to various conditions even when a microcomputer is operating. Our goal is to provide microcomputers.

【課題を解決するための手段】[Means to solve the problem]

上記目的は、複数タスクの実行順序をプログラミングす
ることが可能なメモリを備え、該メモリを読みだすため
のアドレスシーケンスを動的に(すなわちマイクロコン
ピュータの動作中に)変更する手段を設けることにより
達成される。 すなわち、第1の手段として、該メモリを読みだすアド
レス生成のためのレジスタ、および複数個のカウンタを
設け、該メモリの1回のアクセスに対して、上記レジス
タ及び複数個のカウンタの内容を組合せてアドレスを生
成し、このアドレスを用いて該メモリから読みだしたタ
スク実行順序に従って、複数タスクを順に実行する。 より具体的な手段の例示としては、前記複数タスクの実
行順序をプログラミングするメモリは、複数のタスクを
識別するためのコードと共に、前記レジスタ及び複数個
のカウンタを制御するための制御コード含み、この制御
コードを読みだして該メモリのアドレスを生成する。又
、前記複数タスクの実行プログラムを格納するメモリと
該メモリを読みだすためのアドレスを保持しておくため
の複数のアドレスレジスタを設け、該アドレスレジスタ
の値と該アドレスレジスタに対応するタスク識別コード
から該メモリを読みだすためのアドレスを生成する機能
を設ける。さらに、前記アドレスレジスタは、該アドレ
スレジスタに対応するタスクの実行シーケンス1こ拘ら
ず、ある特定の値、又は任意の値を設定することが可能
な機能を有する。
The above object is achieved by providing a memory in which the execution order of multiple tasks can be programmed, and a means for dynamically changing the address sequence for reading the memory (i.e., while the microcomputer is operating). be done. That is, as a first means, a register for generating an address for reading the memory and a plurality of counters are provided, and the contents of the register and the plurality of counters are combined for one access to the memory. A plurality of tasks are executed in sequence according to the task execution order read from the memory using this address. As an example of a more specific means, the memory for programming the execution order of the plurality of tasks includes a code for identifying the plurality of tasks as well as a control code for controlling the register and the plurality of counters; The control code is read and the address of the memory is generated. Further, a plurality of address registers are provided for holding a memory for storing execution programs of the plurality of tasks and an address for reading the memory, and a value of the address register and a task identification code corresponding to the address register are provided. A function is provided to generate an address for reading the memory from. Furthermore, the address register has a function that allows a specific value or an arbitrary value to be set regardless of the execution sequence 1 of the task corresponding to the address register.

【作用) 上記手段によれば、複数タスクの実行順序をプログラミングすることが可能なメモリを読みだすためのアドレスを多次元的に制御することが可能となる。すなわち、該メモリを読みだすアドレス生成のための複数のカウンタ及びレジスタの組合せ方を変更することにより、その組合せ方に対応した複数のアドレスシーケンスを動的に変更することが出来る。従って、該アドレスシーケンスに対応して、複数タスクの実行順序を動的に変更することが可能となる。 又、前記アドレス生成のための複数のカウンタ及びレジスタの組合せ方や、カウンタのカウントアツプ及び初期化を制御する情報の一部を、あらかじめ前記複数タスクの実行順序をプログラミングすることが可能なメモリ内にプログラミングしておくことが可能となる。又、任意の時点で任意の期間だけレジスタの値を変更することにより、あらかじめプログラミングすることができないアドレスシーケンスについても動的に制御することが出来る。又、上記制御コード以外の手段で、任意の時点で任意の期間だけ前記複数のカウンタ及びレジスタの組合せ方を変更したり、カウンタのカウントアツプ及び初期化を行なっても、上記アドレスシーケンスに対する動的な制御が可能である。 さらに、上記より具体的な手段によれば、複数のタスクそれぞれに対応したアドレスレジスタの内容をもとに、各タスクの実行プログラムが格納されているメモリのアドレスを順次生成することが可能となる。ここで、該実行プログラムを格納するメモリを各タスクが共通に利用する場合に、それぞれの実行プログラムがどのタスクに対応するのかを判別する必要が生じる。従って、タスク識別コードを用いて、該メモリに対するアドレスを各タスク間で重複しないように生成する手段を設ける。アドレス生成の仕方については、全てのタスクの実行プログラムを、該メモリの互いに重複しないアドレス領域に設定する方法と、各タスクの実行プログラムの先頭アドレスのみ、又は先頭アドレスを含む一部分のみを互いに重複しないアドレス領域に設定する方法がある。また、上記より具体的−な手段によれば、各タスクそれぞれについて実行プログラムのシーケンスを動的に変更することが可能となる。すなわち、特定のタスクの実行プログラムを任意の時点で初期化したり、−時停止させたり、任意のアドレスにジャンプさせたりすることが可能となる。従って、実行タスク列だけでなく、各タスクで実行するプログラムのシーケンスを動的に変更することができ、複数タスクを並列に実行させる際に、実行プログラムのレベルにおいても動的なシーケンス制御が可能となる。 【実施例】[effect] According to the above means, it is possible to multidimensionally control the address for reading the memory, which allows programming of the execution order of multiple tasks. That is, by changing the combination of a plurality of counters and registers for generating an address for reading the memory, it is possible to dynamically change a plurality of address sequences corresponding to the combination. Therefore, it is possible to dynamically change the execution order of multiple tasks in accordance with the address sequence. Further, part of the information for controlling the combination of the plurality of counters and registers for generating the address, and the count-up and initialization of the counters is stored in a memory in which the execution order of the plurality of tasks can be programmed in advance. This makes it possible to program it in advance. Furthermore, by changing the value of the register at any time and for any period of time, it is possible to dynamically control address sequences that cannot be programmed in advance. Furthermore, even if the combination of the plurality of counters and registers is changed at any time and for any period of time, or the counters are counted up and initialized by means other than the above control code, the dynamic effect on the above address sequence cannot be changed. control is possible. Furthermore, according to the more specific means described above, it becomes possible to sequentially generate memory addresses in which execution programs for each task are stored, based on the contents of address registers corresponding to each of a plurality of tasks. . Here, when each task commonly uses the memory that stores the execution program, it becomes necessary to determine which task each execution program corresponds to. Therefore, means is provided for generating addresses for the memory using task identification codes so that they do not overlap between tasks. Regarding how to generate addresses, there are two methods: one is to set the execution programs of all tasks in address areas that do not overlap with each other in the memory, and the other is to set only the start address of the execution program of each task, or only a part including the start address, so that it does not overlap with each other. There is a way to set it in the address area. Further, according to the more specific means described above, it becomes possible to dynamically change the sequence of execution programs for each task. That is, it becomes possible to initialize the execution program of a specific task at any time, to stop it at -, or to jump to an arbitrary address. Therefore, it is possible to dynamically change not only the execution task sequence but also the sequence of programs executed by each task, and dynamic sequence control is also possible at the execution program level when multiple tasks are executed in parallel. becomes. 【Example】

以下1本発明の一実施例を図面を用いて説明する。 第1図は、複数タスクを時分割で順次並列に実行するこ
とのできるマイクロコンピュータのブロック図である。 実行タスク制御用メモリ105には、タスク実行列と読
みだしシーケンス制御用の制御情報が格納されている。 各タスクはタスク番号によって識別することとし、実行
タスク読みだしレジスタ106に読みだされたタスク番
号に対応するタスクを、選択的に順次実行していく、実
行タスク制御用メモリ105のデータ仕様については、
後に第2図により詳細に説明する。 実行タスク制御用メモリ105の読みだしアドレスは、
第1のカウンタ101と第2のカウンタ102、及びレ
ジスタ103の値を組合せて生成する。本実施例では、
第2のカウンタ102とレジスタ103をセレクタ10
4によって選択し。 第1のカウンタ101の値と共に実行タスク制御用メモ
リ105の読みだしアドレスとしている。 ここで、第1のカウンタ101のリセットと第2のカウ
ンタ102のカウントアツプ、及びセレクタ104の制
御は、実行タスク読みだしレジスタ106に読みだされ
た制御情報をもとに行なう。 制御情報仕様については、第2図で詳細に説明する。 アドレス管理用レジスタファイル107は、各タスクに
対応するマイクロプログラム格納用メモリ108に対す
るマイクロアドレスを、各タスクに対応するレジスタに
それぞれ保持している。マイクロアドレスは、実行タス
ク読みだしレジスタ106に読みだされたタスク番号を
もとにして、該タスク番号に対応するレジスタを選択的
に読みだすことで生成する。詳細な動作については、後
に第3図で説明する。 マイクロプログラム格納用メモリ108から読みだされ
た実行タスクのマイクロ命令は、マイクロ命令読みだし
レジスタ109に格納され、命令デコーダ110によっ
て解読し、演算実行部111で実行される。次アドレス
生成部112では、演算結果113とマイクロ命令の次
アドレス指定フィールドの内容から、次に実行するマイ
クロ命令に対応するアドレスを生成する。このアドレス
は、アドレス管理用レジスタファイル107の対応する
タスクのレジスタに書き込まれ、次に該タスクの実行順
番が回ってきたときに読みだされる。 次に、第2図を用いて、実行タスク制御用メモリ105
のデータ仕様、及びその動作について説明する。 201は、第1図の第1のカウンタ101の値を行アド
レスとし、第2のカウンタ102又はレジスタ103の
値を列アドレスとしたタスク制御マトリクスである。タ
スク制御マトリクス201の各格子が1回に読みだされ
る単位データで、該格子のそれぞれにタスク番号と制御
情報が格納されている。1格子分のデータ仕様を、20
2に示す。該格子は、m個のタスクを識別するためのn
ビットのタスク番号データ205と、R制御ビット20
4、E制御ビット203の各々1ビツトずつから成る。 R11J御ビツト204に1が読みだされると、第1の
カウンタ101が全てOにリセットされ、第2のカウン
タ102は1だけカウントアツプされる。R制御ビット
204が0のときは、第1のカウンタ101が1だけカ
ウントアツプされ、第2のカウンタ102はその時の値
をそのまま保持する。 E制御ビット203に1が読みだされると、タスク制御
マトリクス201の列アドレスがレジスタ103の値と
なり、Oのときは第2のカウンタ102の値となる。 又、第1のカウンタ101及び第2のカウンタ102は
、本マイクロコンピュータのリセット時に、初期状態と
して全てOにリセットされるものとする。 すなわち、R制御ビット204及びE制御ビット203
が共にOのとき、実行タスク列は、タスク制御マトリク
ス201の第1列の第1行目から順に下へ、格子番号0
O101,02の格子から読みだされていく。R制御ビ
ット204及びE制御ビット203が共にOのままだと
、第1列の格子をそのまま下へ順に読みだしていき、最
終行の格子番号Ojまでくると、格子番号OOへ戻って
再び第1列の格子を下へ順に読みだしていく。 このとき、任意の行でR制御ビット204に1が読みだ
されると、次に読みだされる格子は1つ右の列の先頭行
、すなわち第2列の1行目にあたる格子番号10となり
、以降第2列目の格子を下へ、格子番号10.11.1
2と順に読みだしていく。 又、任意の行でE制御ビット203に1が読みだされる
と、次に読みだされる格子の列アドレスがレジスタ10
3の値となる。すなわち、レジスタ103に所望の値を
セットすることにより、次の行から読みだされる格子を
任意の列から読みだすことができる。但し、E制御ビッ
トの効力は次に読みだす行のみに限定される。従って、
E制御ビット203に続けて1が読みだされないかぎり
、その次に読みだされる行の列アドレスは第2のカウン
タ102の値に戻ることになる。すなわち、あるタスク
実行列の読みだしシーケンスを初期化することなく、E
制御ビットによって一時的にタスク実行列を別のタスク
実行列に置き換えることができる。 本実施例では、行アドレスとしてカウンタ1の値を共通
に使用していることから、上記のように列アドレスを任
意の時点で変更してもタスク実行順序にある一定の条件
を設定することが可能となる。 一例として、実行パイプラインによる制限等から同じタ
スクを続けて実行することができない場合を考える。こ
の場合は、タスク制御マトリクス201上において、上
下に隣合う各行又はR制御ビットが1の格子を含む行と
第1行目との間で、同一タスクが存在しないようにして
おく、こうすることで、列アドレスを任意の時点で変更
しても、同じタスクが続けて実行されることを防ぐこと
ができる。 又、別の例として、複数の実行タスクのうち第1のタス
クと第2のタスクが交互に実行されないといけない場合
を考える。この場合は、タスク制御マトリクス201上
において、それぞれの行に第1のタスクと第2のタスク
が混在しないようにして、なおかつどちらかのタスクが
存在している行から下方へ見て始めて第1又は第2のタ
スクが存在する行、及びR制御ビットが1の格子を含む
行があれば第1行目に戻って下方へ始めて第1又は第2
のタスクが存在する行には、もう一方のタスクしか存在
しないようにしておく。こうすることで、列アドレスを
任意の時点で変更しても、必ず第1のタスクと第2のタ
スクを交互に実行することができる。 次に第3図を用いて、第1図のアドレス管理用レジスタ
ファイル107の詳細動作を説明する。 301は、各タスクのマイクロアドレスを格納するレジ
スタで、第1図のマイクロプログラム格納用メモリに対
するアドレスとして必要なビット長を持ち、タスク数分
のレジスタを備えている。 該レジスタの読みだし及び書き込み時の選択は、第1図
の実行タスク読みだしレジスタ106に読みだされたタ
スク番号に基づいて行なう。すなわち、該タスク番号は
デコーダ302によってデコードされ、読みだしセレク
タ303によって該タスク番号に対応するレジスタの内
容が読みだされる。又、該タスク番号は、該タスクの次
に実行するマイクロアドレスが生成されるまでデイレイ
回路306によって遅延保持され、デコーダ307によ
ってデコードしたのち、書き込みセレクタ308によ、
って該アドレスを書き込むレジスタを選択する。 又、アドレスレジスタ301は1本マイクロコンピュー
タのリセット時に、初期状態として全て0にリセットさ
れるものとする。 読みだしセレクタ303から読みだされたアドレスデー
タは、all”0″判定回路304に入力される。al
l”0”判定回路304は、入力されたアドレスデータ
が全て0ならば該アドレスデータをマイクロアドレスと
し、それ以外なら該アドレスデータを選択したタスク番
号をそのままマイクロアドレスとして出力するように、
セレクタ305を制御する。 すなわち、各タスクの先頭アドレスはそれぞれのタスク
番号となっており、初期状態からのスタート時と共に、
動作時においても次アドレスをall″′O″とするこ
とにより、任意の時点で任意のタスクを先頭アドレスに
戻すことができる。 次に、第1図のレジスタ103に対する値の設定方法に
ついて、第4図を用いて説明する。 401は、チップ外部からの入力信号に対するインタフ
ェースで、タイミング制御、並びにエツジ検出等の信号
入力仕様の制御を行なう。入出力インタフェース401
を介して入力された信号は、ビット単位で入出力制御が
可能なビットデータストレージ402に書き込まれ、プ
ライオリティエンコーダ403を介してレジスタ103
に書き込まれる。 プライオリティエンコーダ403は、ピットデータスト
レージ402の各ビットに対して優先順位を付けるため
の回路で、各ビットに応じて列アドレスを生成する際の
多重選択を防止している。 又、ピットデータストレージ402への値設定は、タス
ク実行部を介して本マイクロコンピュータ自身が行なう
こともできる。こうすることによって、チップ外部で発
生した条件に対しても、チップ内部で発生した条件に対
しても、上記レジスタ103の値を動的に変化させるこ
とができる。 すなわち、実行タスク制御部に対して、それぞれの条件
に対応する実行タスク列を動的に選択することができ、
チップ内部で発生する条件で、チップ外部で発生したあ
る条件をクリアすることもできるし、新たな値を設定す
ることもできる。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a microcomputer that can sequentially execute multiple tasks in parallel in a time-sharing manner. The execution task control memory 105 stores task execution sequences and control information for read sequence control. Each task is identified by a task number, and the tasks corresponding to the task numbers read into the execution task read register 106 are selectively and sequentially executed. Regarding the data specifications of the execution task control memory 105, ,
This will be explained in detail later with reference to FIG. The read address of the execution task control memory 105 is:
It is generated by combining the values of the first counter 101, the second counter 102, and the register 103. In this example,
The second counter 102 and register 103 are set by the selector 10
Select by 4. Together with the value of the first counter 101, this is used as the read address of the execution task control memory 105. Here, the resetting of the first counter 101, the counting up of the second counter 102, and the control of the selector 104 are performed based on the control information read out to the execution task reading register 106. The control information specifications will be explained in detail with reference to FIG. The address management register file 107 holds microaddresses for the microprogram storage memory 108 corresponding to each task in registers corresponding to each task. The microaddress is generated by selectively reading the register corresponding to the task number based on the task number read into the execution task reading register 106. The detailed operation will be explained later with reference to FIG. The microinstruction of the execution task read out from the microprogram storage memory 108 is stored in the microinstruction reading register 109, decoded by the instruction decoder 110, and executed by the arithmetic execution unit 111. The next address generation unit 112 generates an address corresponding to the next microinstruction to be executed from the operation result 113 and the contents of the next address designation field of the microinstruction. This address is written into the register of the corresponding task in the address management register file 107, and read out the next time it is the task's turn to execute. Next, using FIG. 2, the execution task control memory 105
We will explain the data specifications and its operation. 201 is a task control matrix in which the value of the first counter 101 in FIG. 1 is used as a row address, and the value of the second counter 102 or register 103 is used as a column address. Each grid of the task control matrix 201 is unit data that is read out at one time, and a task number and control information are stored in each grid. The data specifications for one grid are 20
Shown in 2. The grid has n for identifying m tasks.
Bit task number data 205 and R control bit 20
4 and E control bits 203, each consisting of one bit. When 1 is read in the R11J control bit 204, the first counter 101 is reset to all O's, and the second counter 102 is incremented by 1. When the R control bit 204 is 0, the first counter 101 is incremented by 1, and the second counter 102 maintains its current value. When 1 is read into the E control bit 203, the column address of the task control matrix 201 becomes the value of the register 103, and when it is O, the column address becomes the value of the second counter 102. Further, it is assumed that the first counter 101 and the second counter 102 are all reset to O as an initial state when the present microcomputer is reset. That is, R control bit 204 and E control bit 203
are both O, the execution task column is sequentially downward from the first row of the first column of the task control matrix 201, starting from the grid number 0.
The data is read out from the lattice of O101 and 02. If both the R control bit 204 and the E control bit 203 remain O, the grids in the first column are read out in sequence downwards, and when they reach the grid number Oj in the last row, they return to grid number OO and read out again. Read out one row of grids in order. At this time, if 1 is read in the R control bit 204 in any row, the next grid to be read will be grid number 10, which is the first row of the column to the right, that is, the first row of the second column. , and then move down the grid in the second column, grid number 10.11.1
2 and read them in order. Also, when 1 is read in the E control bit 203 in any row, the column address of the next grid to be read is stored in the register 10.
The value is 3. That is, by setting a desired value in the register 103, the grid to be read from the next row can be read from any column. However, the effect of the E control bit is limited to the next line to be read. Therefore,
Unless a 1 is read following the E control bit 203, the column address of the next row read will return to the value of the second counter 102. In other words, without initializing the read sequence of a certain task execution sequence, E
A control bit allows a task execution sequence to be temporarily replaced with another task execution sequence. In this example, since the value of counter 1 is commonly used as the row address, it is possible to set certain conditions for the task execution order even if the column address is changed at any time as described above. It becomes possible. As an example, consider a case where the same task cannot be executed consecutively due to limitations caused by the execution pipeline. In this case, on the task control matrix 201, make sure that the same task does not exist between each vertically adjacent row or the row containing the lattice with the R control bit of 1 and the first row. Even if you change the column address at any time, you can prevent the same task from being executed continuously. As another example, consider a case where the first task and the second task among a plurality of execution tasks must be executed alternately. In this case, on the task control matrix 201, make sure that the first task and the second task do not coexist in each row, and start from the row where either task exists and start with the first task. Or, if there is a row where the second task exists and a row containing a lattice with the R control bit set to 1, go back to the first row, start downwards, and select the first or second task.
In the row where one task exists, only the other task exists. By doing this, even if the column address is changed at any time, the first task and the second task can always be executed alternately. Next, the detailed operation of the address management register file 107 shown in FIG. 1 will be explained using FIG. 3. Reference numeral 301 denotes a register for storing the microaddress of each task, which has a bit length necessary as an address for the microprogram storage memory shown in FIG. 1, and has registers for the number of tasks. Selection at the time of reading and writing of the register is performed based on the task number read out to the execution task readout register 106 in FIG. That is, the task number is decoded by the decoder 302, and the read selector 303 reads out the contents of the register corresponding to the task number. Further, the task number is delayed and held by the delay circuit 306 until a microaddress to be executed next for the task is generated, and after being decoded by the decoder 307, the task number is stored by the write selector 308.
select the register to write the address. Further, it is assumed that all address registers 301 are reset to 0 as an initial state when the microcomputer is reset. The address data read from the read selector 303 is input to an all “0” determination circuit 304 . al
The l"0" determination circuit 304 outputs the task number that selected the address data as it is, if the input address data is all 0, then outputs the address data as a microaddress.
Controls selector 305. In other words, the start address of each task is its own task number, and when starting from the initial state,
Even during operation, by setting the next address to all'''O'', any task can be returned to the first address at any time. Next, a method of setting values for the register 103 in FIG. 1 will be explained using FIG. 4. Reference numeral 401 denotes an interface for input signals from outside the chip, which performs timing control and control of signal input specifications such as edge detection. Input/output interface 401
The signal inputted via the is written to the bit data storage 402 that can control input/output in bit units, and is sent to the register 103 via the priority encoder 403.
will be written to. The priority encoder 403 is a circuit for prioritizing each bit of the pit data storage 402, and prevents multiple selections when generating a column address according to each bit. Further, the value setting in the pit data storage 402 can also be performed by the microcomputer itself via the task execution unit. By doing so, the value of the register 103 can be dynamically changed in response to conditions occurring outside the chip as well as conditions occurring within the chip. In other words, it is possible to dynamically select an execution task sequence corresponding to each condition for the execution task control unit.
A condition that occurs inside the chip can clear a condition that occurred outside the chip, or a new value can be set.

【発明の効果】【Effect of the invention】

本発明によれば、複数のタスクを実行するためのタスク
実行順序を格納するメモリを有し、複数タスクの実行を
行なうマイクロコンピュータにおいて、該メモリの値を
書き換えることなく、該タスクの実行列を動的に変化さ
せることができるという効果がある。
According to the present invention, in a microcomputer that has a memory that stores a task execution order for executing multiple tasks and executes multiple tasks, the execution sequence of the tasks can be changed without rewriting the values in the memory. It has the effect of being able to change dynamically.

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

第1図は、複数タスクを時分割で順次並列に実行するこ
とのできるマイクロコンピュータのブロック図、第2図
はタスク制御マトリクス及びそのデータ仕様を示す図、
第3図はアドレス管理用レジスタファイルの詳細ブロッ
ク図、第4図は外部ビンによるタスク実行列変更手段を
示す図である。 符号の説明 101・・・実行タスク制御用メモリに対するアドレス
生成のための第1のカウンタ、102・・・実行タスク
制御用メモリに対するアドレス生成のための第2のカウ
ンタ、103・・・実行タスク制御用メモリに対するア
ドレス生成のためのレジスタ、104・・・実行タスク
制御用メモリに対するアドレス生成のためのセレクタ、
105・・・実行タスク制御用メモリ、106・・・実
行タスク読みだしレジスタ、107・・・アドレス管理
用レジスタファイル、201・・・タスク制御マトリク
ス、203・・・E制御ビレト、204・・・R制御ビ
ット、301・・・アドレスレジスタ、304 ・=a
ll” O”判定回路、305・・・マイクロアドレス
生成用セレクタ、402・・・共通書き込み可能なピッ
トデータストレージ、403・・・プライオリティエン
コーダ。 第1図 第2図 カウンタ2またはレジスタの値 203 204 05 第3図 第4図
FIG. 1 is a block diagram of a microcomputer that can execute multiple tasks sequentially and in parallel in a time-sharing manner; FIG. 2 is a diagram showing a task control matrix and its data specifications;
FIG. 3 is a detailed block diagram of the register file for address management, and FIG. 4 is a diagram showing task execution sequence changing means using an external bin. Description of symbols 101...First counter for generating an address for the execution task control memory, 102...Second counter for generating an address for the execution task control memory, 103...Execution task control a register for generating an address for the memory for controlling the execution task, 104... a selector for generating an address for the memory for controlling the execution task;
105... Memory for execution task control, 106... Execution task read register, 107... Register file for address management, 201... Task control matrix, 203... E control billet, 204... R control bit, 301...address register, 304 ・=a
ll"O" determination circuit, 305...Selector for micro address generation, 402...Common writable pit data storage, 403...Priority encoder. Figure 1 Figure 2 Value of counter 2 or register 203 204 05 Figure 3 Figure 4

Claims (1)

【特許請求の範囲】 1、複数のタスクを実行するためのタスク実行順序を格
納するメモリと、レジスタと、複数個のカウンタと、該
メモリの1回のアクセスに対して、前記レジスタおよび
複数個のカウンタの内容を組合せてアドレスを生成する
手段とを有し、該アドレスにより前記メモリから読みだ
したタスク実行順序に従って複数タスクを順に実行する
ことを特徴とするマイクロコンピュータ。 2、前記メモリは、複数のタスクを識別するためのコー
ドと共に前記レジスタおよび複数のカウンタを制御する
ための制御コードを格納し、上記制御コードを読みだし
て、該メモリのアドレスを生成することを特徴とする請
求項1記載のマイクロコンピュータ。 3、前記制御コードは、前記カウンタの初期化及びカウ
ントアップに関する第1の制御情報と、前記レジスタ及
びカウンタの組合せ方に関する第2の制御情報を含むこ
とを特徴とする請求項2記載のマイクロコンピュータ。 4、前記マイクロコンピュータは、前記レジスタに対し
て値を設定する手段を複数有し、前記複数の手段のうち
の一つは、前記マイクロコンピュータのチップ外部から
設定する手段であることを特徴とする請求項1ないし3
のいずれかに記載のマイクロコンピュータ。 5、複数タスクを実行するための手段として、該タスク
の実行プログラムを格納するメモリと該メモリを読みだ
すためのアドレスを保持しておくための複数のアドレス
レジスタを備え、該アドレスレジスタの値と該アドレス
レジスタに対応するタスク識別コードから該メモリを読
みだすためのアドレスを生成することを特徴とする請求
項1ないし4のいずれかに記載のマイクロコンピュータ
。 6、前記アドレスレジスタは、該アドレスレジスタに対
応するタスクの実行シーケンスに拘らず所定の値を設定
することが可能であることを特徴とする請求項5記載の
マイクロコンピュータ。
[Claims] 1. A memory that stores a task execution order for executing a plurality of tasks, a register, a plurality of counters, and a register and a plurality of counters for one access to the memory. and means for generating an address by combining the contents of the counters, and sequentially executes a plurality of tasks according to the task execution order read from the memory using the address. 2. The memory stores a code for identifying a plurality of tasks as well as a control code for controlling the register and a plurality of counters, and reads the control code to generate an address of the memory. The microcomputer according to claim 1, characterized in that: 3. The microcomputer according to claim 2, wherein the control code includes first control information regarding initialization and counting up of the counter, and second control information regarding how to combine the register and counter. . 4. The microcomputer has a plurality of means for setting values in the register, and one of the plurality of means is a means for setting values from outside the chip of the microcomputer. Claims 1 to 3
A microcomputer according to any of the above. 5. As a means for executing multiple tasks, a memory for storing the execution program of the task and a plurality of address registers for holding the address for reading the memory are provided, and the value of the address register and 5. The microcomputer according to claim 1, wherein an address for reading the memory is generated from a task identification code corresponding to the address register. 6. The microcomputer according to claim 5, wherein the address register can be set to a predetermined value regardless of the execution sequence of the task corresponding to the address register.
JP6425190A 1989-12-07 1990-03-16 Microcomputer Pending JPH03266035A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP6425190A JPH03266035A (en) 1990-03-16 1990-03-16 Microcomputer
US07/621,641 US5307464A (en) 1989-12-07 1990-12-03 Microprocessor and method for setting up its peripheral functions
KR1019900019976A KR100212097B1 (en) 1989-12-07 1990-12-06 Microprocessor and method for setting up its peripheral functions
DE69032342T DE69032342T2 (en) 1989-12-07 1990-12-07 Microprocessor and method for setting up its peripheral functions
EP96112686A EP0740254A3 (en) 1989-12-07 1990-12-07 Microprocessor and method for setting up its peripheral functions
EP90123577A EP0431641B1 (en) 1989-12-07 1990-12-07 Microprocessor and method for setting up its peripheral functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6425190A JPH03266035A (en) 1990-03-16 1990-03-16 Microcomputer

Publications (1)

Publication Number Publication Date
JPH03266035A true JPH03266035A (en) 1991-11-27

Family

ID=13252762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6425190A Pending JPH03266035A (en) 1989-12-07 1990-03-16 Microcomputer

Country Status (1)

Country Link
JP (1) JPH03266035A (en)

Similar Documents

Publication Publication Date Title
US4430706A (en) Branch prediction apparatus and method for a data processing system
US5367550A (en) Break address detecting circuit
US4446517A (en) Microprogram memory with page addressing and address decode in memory
KR19980063936A (en) Information processing unit with high hit rate branch prediction with small hardware
SU1082341A3 (en) Control device in data processing system
CA1050663A (en) Microprogram control units
JPH02227730A (en) Data processing system
US4047245A (en) Indirect memory addressing
JPS62164133A (en) Microprogram controller
US5642523A (en) Microprocessor with variable size register windowing
US6370638B1 (en) Apparatus and method of computer program control in computer systems using pipeline processing
US6981109B2 (en) Digital signal processor system having programmable random access memory that executes processing during downloading of a program
JP3035828B2 (en) Information processing device
JPH03266035A (en) Microcomputer
US5732252A (en) Program counter system capable of incrementing or decrementing after a conditional jump instruction
JPH0795269B2 (en) Instruction code decoding device
JP2000029508A (en) Programmable controller
JP2812610B2 (en) Pipeline control method
JPH0713758A (en) Instruction decoding method
KR20010106421A (en) A programmable controller
JPS59183434A (en) Prefetch control system of instruction
JPH0683986A (en) Single chip microcomputer
SU1151961A1 (en) Microprogram control device
JPS63129432A (en) Program address tracing device
JPS6250855B2 (en)