JPH10143376A - Information processing device - Google Patents
Information processing deviceInfo
- Publication number
- JPH10143376A JPH10143376A JP8298318A JP29831896A JPH10143376A JP H10143376 A JPH10143376 A JP H10143376A JP 8298318 A JP8298318 A JP 8298318A JP 29831896 A JP29831896 A JP 29831896A JP H10143376 A JPH10143376 A JP H10143376A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- register
- processing unit
- register file
- level
- 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
Links
Abstract
(57)【要約】
【課題】 割込みによって複数レジスタファイルを切り
替えて複数のタスクを実行し、タスクの優先順位の変更
を処理のオーバーヘッドを少くすることを目的とする。
【解決手段】 各レジスタファイル100,200,30
0内の状態レジスタ101,201,301に割込み要因
フィールド及び割込みマスクフィールドを保持し、割込
み要因及び割込みレベル103,203,303を用い
て、レジスタファイル切り替え手段30によるタスク切
り替えを制御する。
(57) [Summary] An object of the present invention is to execute a plurality of tasks by switching a plurality of register files by interruption, and to reduce the processing overhead for changing the priority of the tasks. SOLUTION: Each register file 100, 200, 30
The interrupt factor field and the interrupt mask field are held in the status registers 101, 201, and 301 in 0, and the task switching by the register file switching means 30 is controlled using the interrupt factor and the interrupt levels 103, 203, and 303.
Description
【0001】[0001]
【発明の属する技術分野】本発明は複数のタスクを実行
する情報処理装置に係り、特に、ハードウェア化に適し
たコンテキストスイッチを可能とし、割込みハンドラを
介在せずに割込み要因に対応するタスクを直接起動させ
ることにより、タスクの応答を高速にした情報処理装置
に関する。[0001] 1. Field of the Invention [0002] The present invention relates to an information processing apparatus for executing a plurality of tasks, and more particularly, to a context switch suitable for hardware, enabling a task corresponding to an interrupt factor without intervening an interrupt handler. The present invention relates to an information processing apparatus that has a high-speed task response by being directly activated.
【0002】[0002]
【従来の技術】従来、このような情報処理装置は特開平
7−44404号公報に記載されたものが知られてい
る。以下、この公報に記載の情報処理装置を従来技術と
して説明する。2. Description of the Related Art Conventionally, such an information processing apparatus is known from Japanese Patent Application Laid-Open No. 7-44404. Hereinafter, the information processing apparatus described in this publication will be described as a conventional technique.
【0003】この情報処理装置は、複数のレジスタファ
イル(コンテキストレジスタ)を備え、その夫々のレジ
スタファイルは、現在実行中のタスクのタスク優先度を
保持するタスク優先度レジスタによって選択される。ま
た、それぞれのタスクが起動可能であるかの情報をレデ
ィーレジスタに保持し、また、外部割込みによりレディ
ーレジスタのビットを操作して、タスクの実行可能また
は不可能の状態を変更し、レディーレジスタの実行可能
状態を示すビットに対応するタスク優先順位をプライオ
リティエンコーダによって割出してタスク優先度レジス
タに格納し、タスク優先度レジスタが変化した時に、そ
のタスク優先度に対応するレジスタファイルに切り替え
るものである。This information processing apparatus includes a plurality of register files (context registers), and each of the register files is selected by a task priority register that holds a task priority of a currently executing task. In addition, information on whether each task can be activated is held in the ready register, and the ready register is changed by operating the ready register bit by an external interrupt to change the ready or impossible state of the task. The task priority corresponding to the bit indicating the executable state is determined by the priority encoder and stored in the task priority register, and when the task priority register changes, the task is switched to a register file corresponding to the task priority. .
【0004】これにより、タスクのスケジューリング操
作をハードウェア化して、割込みハンドラを介在せずに
タスクの応答を高速にしている。[0004] Thus, the task scheduling operation is implemented by hardware, and the response of the task is made faster without the intervention of an interrupt handler.
【0005】[0005]
【発明が解決しようとする課題】しかし、上記の情報処
理装置においては、タスクの優先順位は、レディーレジ
スタのビット位置によって決定され、また、その優先順
位によってレジスタファイルが選択されるために、タス
クの優先順位を変更するためには、そのタスクに対する
レジスタファイルの割付けを変更する必要があり、その
ために、処理のオーバーヘッドが生じるという問題があ
る。However, in the above information processing apparatus, the priority of a task is determined by the bit position of the ready register, and the register file is selected according to the priority. In order to change the priority of the task, it is necessary to change the assignment of the register file to the task, which causes a problem that processing overhead occurs.
【0006】本発明は、上記問題を解決するもので、割
込みハンドラを介在せずにタスクの応答を高速化し、さ
らに、タスクの優先順位の変更に対しての処理のオーバ
ーヘッドを軽減する情報処理装置を提供することを目的
とする。An object of the present invention is to solve the above-mentioned problem, and to increase the speed of task response without the intervention of an interrupt handler, and to reduce the processing overhead for changing the priority of tasks. The purpose is to provide.
【0007】[0007]
【課題を解決するための手段】この課題を解決するため
に請求項1記載の本発明は、複数の割込み要因及び割込
みレベルを有する情報処理装置において、少くとも複数
のレジスタファイルを備え、前記レジスタファイルの1
つを選択して、該レジスタファイルの内容を使用して、
複数のタスクを時分割で実行する命令実行ユニットと、
前記複数のレジスタファイルの夫々に含まれ、少くと
も、前記割込み要因の夫々に対応し、前記割込み要因を
処理するタスクであるか、ないかを示す複数のビットか
ら成る割込み要因フィールドと、前記割込み要因に対す
る前記割込みレベルをマスクする割込みマスクフィール
ドから構成される複数の状態レジスタと、前記割込み要
因の発生に基づいて、前記割込み要因に対する前記割込
みレベルが現在選択されている前記レジスタファイル中
の前記状態レジスタの前記割込みマスクフィールドより
高位である場合、前記複数のレジスタファイル中の全て
の前記状態レジスタの前記割込み要因フィールド中の前
記発生した割込み要因に対応するビットを走査し、前記
割込み要因を処理するタスクの使用する前記レジスタフ
ァイルを検出し、前記検出したレジスタファイルに切り
替えるレジスタファイル切り替え手段とを備えた情報処
理装置である。According to a first aspect of the present invention, there is provided an information processing apparatus having a plurality of interrupt factors and interrupt levels, comprising at least a plurality of register files, File 1
Choose one and use the contents of the register file to
An instruction execution unit that executes a plurality of tasks in a time-sharing manner;
An interrupt factor field including a plurality of bits included in each of the plurality of register files and corresponding to at least each of the interrupt factors and indicating whether the task is a task for processing the interrupt factor or not; A plurality of status registers comprising an interrupt mask field for masking the interrupt level for the cause, and the status in the register file where the interrupt level for the interrupt cause is currently selected based on the occurrence of the interrupt cause. If it is higher than the interrupt mask field of the register, scan the bit corresponding to the generated interrupt factor in the interrupt factor field of all the status registers in the plurality of register files and process the interrupt factor. Detects the register file used by the task and An information processing apparatus that includes a register file switch means for switching to the detected register file.
【0008】上記請求項1記載の発明によれば、前記割
込み要因に対するタスクの応答を高速にし、さらに、前
記割込みマスクによりタスクのスケジュールを行うこと
が可能であるのでタスクの優先順位を変更しても処理の
オーバーヘッドが少い。According to the first aspect of the present invention, the task response to the interrupt cause can be made faster, and the task can be scheduled by the interrupt mask. Also has low processing overhead.
【0009】さらに、請求項2に記載の本発明は、処理
ユニット起動命令によって処理を起動し、前記起動され
た処理の実行の完了を割込みによって通知する複数の処
理ユニットと、前記それぞれの処理ユニットを選択的に
起動する処理ユニット起動手段と、前記それぞれの処理
ユニットを処理ユニット起動命令によって処理を起動す
る時に、該処理の完了時の割込みレベルを前記処理ユニ
ットに指定する割込みレベル指定手段を備え、前記それ
ぞれの処理ユニットは、実行の完了時に割込みレベル指
定手段によって指定された割込みレベルを発生し、前記
レジスタファイル切り替え手段は、前記処理ユニットの
発生する前記割込み要因及び前記割込みレベルに基づ
き、レジスタファイル切り替えを行うことを特徴とする
請求項1記載の情報処理装置である。Further, according to a second aspect of the present invention, a plurality of processing units which start processing by a processing unit start command and notify completion of execution of the started processing by interruption, and the respective processing units Processing unit activation means for selectively activating the processing unit, and interrupt level designation means for designating an interruption level upon completion of the processing to the processing unit when the processing unit is activated by a processing unit activation instruction. Each of the processing units generates an interrupt level designated by an interrupt level designating means upon completion of execution, and the register file switching means registers a register based on the interrupt factor and the interrupt level generated by the processing unit. 2. The information according to claim 1, wherein file switching is performed. It is a management apparatus.
【0010】上記請求項2記載の発明によれば、処理ユ
ニット起動命令によって、起動される処理ユニットの実
行完了時の割込みレベルを指定し、処理ユニットが実行
完了時に起動時に指定された割込みレベルによって割込
むことにより、さらに細かいスケジューリングを可能と
することができる。According to the second aspect of the present invention, the interrupt level at the time of completion of the execution of the processing unit to be started is designated by the processing unit start instruction, and the interrupt level specified at the time of the start of the processing unit at the time of completion of execution of the processing unit is specified. By interrupting, finer scheduling can be enabled.
【0011】[0011]
【発明の実施の形態】以下、本発明の実施の形態につい
て、図1と図2を用いて説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS.
【0012】(実施の形態1)図1は本発明の情報処理
装置のブロック図を示す。図1においては、説明のため
に、本発明に関与する部分のみ示しており、本発明の情
報処理装置は、その他に、命令フェッチを行う命令フェ
ッチ手段や、命令デコーダや、シーケンサや、レジスタ
ファイルから読み出したデータを演算する演算器や、メ
モリに対してデータの読み書きを行うデータフェッチ部
など通常の情報処理装置を構成するものから構成される
ものである。(Embodiment 1) FIG. 1 is a block diagram of an information processing apparatus according to the present invention. FIG. 1 shows only a part related to the present invention for the purpose of explanation, and the information processing apparatus of the present invention additionally includes an instruction fetch unit for performing instruction fetch, an instruction decoder, a sequencer, a register file, and the like. And a data fetch unit for reading and writing data from and to a memory.
【0013】図1において100,200及び300
は、それぞれ情報処理装置で実行される異るタスクの実
行状態を保持する作用を行うレジスタファイルで、それ
ぞれ、PC(プログラムカウンタ),状態レジスタ10
1,201,301及びn+1個(nは0以上の整数)の
汎用レジスタG0〜Gnから構成されている。In FIG. 1, 100, 200 and 300
Is a register file that functions to hold the execution state of different tasks executed by the information processing apparatus.
1, 201, 301 and n + 1 (n is an integer of 0 or more) general-purpose registers G0 to Gn.
【0014】400,401〜40NはN+1個(Nは
0以上の整数)の割込み信号で、それぞれ割込み要因及
び割込みレベルから構成される。Reference numerals 400, 401 to 40N denote N + 1 (N is an integer of 0 or more) interrupt signals, each of which comprises an interrupt factor and an interrupt level.
【0015】状態レジスタ101,201及び301
は、少くともそのレジスタファイルを使用しているタス
クの割込みマスクフィールドと割込み信号400,40
1〜40Nにそれぞれ対応するN+1ビットの割込み要
因フィールドから構成される。The status registers 101, 201 and 301
Are the interrupt mask fields and interrupt signals 400 and 40 of at least the task using the register file.
It comprises an N + 1 bit interrupt factor field corresponding to each of 1 to 40N.
【0016】ここで、前記割込み要因フィールドは、割
込み要因の夫々に対応し、割込み要因を処理するタスク
であるか、ないかを示す複数のビットから成る。また、
前記割込みマスクフィールドは、割込み要因に対する割
込みレベルをマスクする機能を有する。Here, the interrupt factor field includes a plurality of bits corresponding to each of the interrupt factors and indicating whether the task is a task for processing the interrupt factor or not. Also,
The interrupt mask field has a function of masking an interrupt level for an interrupt factor.
【0017】30はレジスタファイル切り替え手段であ
り、割込み要因の発生に基づいて、前記割込み要因に対
する割込みレベルが現在選択されているレジスタファイ
ル中の状態レジスタの割込みマスクフィールドより高位
である場合、複数のレジスタファイル中の全ての状態レ
ジスタの割込み要因フィールド中の発生した割込み要因
に対応するビットを走査し、割込み要因を処理するタス
クの使用するレジスタファイルを検出し、前記検出した
レジスタファイルに切り替える。Numeral 30 denotes a register file switching means. When the interrupt level for the interrupt factor is higher than the interrupt mask field of the status register in the currently selected register file based on the occurrence of the interrupt factor, a plurality of register file switching means 30 are provided. The bit corresponding to the generated interrupt factor is scanned in the interrupt factor field of all the status registers in the register file to detect the register file used by the task for processing the interrupt factor, and the detected file is switched to the detected register file.
【0018】31は、レジスタファイル指定で、レジス
タファイル100,200及び300中のどのレジスタ
ファイルを選択するかを、選択手段10及び20に指示
するものである。Reference numeral 31 designates a register file to instruct the selection means 10 and 20 which register file among the register files 100, 200 and 300 is to be selected.
【0019】103,203及び303は、それぞれ状
態レジスタ101,201及び301の割込みマスクフ
ィールドと割込み要因フィールドである。Reference numerals 103, 203 and 303 are an interrupt mask field and an interrupt factor field of the status registers 101, 201 and 301, respectively.
【0020】図1において、本発明の情報処理装置は、
以下のように命令実行を行なう。命令のメモリからの読
み出しは、レジスタファイル指定31でレジスタファイ
ル100,200及び300の中から指定されたレジス
タファイル中のPC(プログラムカウンタ)を命令アド
レスとしてメモリから読み出される。読み出された命令
は、命令デコーダ(図示せず)によって解読され、さら
にシーケンサ(図示せず)によって制御されて実行され
る。In FIG. 1, the information processing apparatus of the present invention
The instruction is executed as follows. The instruction is read from the memory by using the PC (program counter) in the register file specified from the register files 100, 200, and 300 by the register file specification 31 as the instruction address. The read instruction is decoded by an instruction decoder (not shown), and further controlled and executed by a sequencer (not shown).
【0021】また、実行する命令によって、読み出され
るレジスタは、レジスタファイル100,200及び3
00の中から、レジスタファイル指定31で指定され、
読み出されたデータは選択手段20によってデータバス
21及び22に出力される。The registers read out by the instruction to be executed are stored in register files 100, 200 and 3
00, specified by the register file specification 31;
The read data is output to the data buses 21 and 22 by the selecting means 20.
【0022】データバス21及び22は、演算器(図示
せず)または、データフェッチ部(図示せず)に接続さ
れ、実行する命令によって、演算またはメモリへの書き
込みが行われる。The data buses 21 and 22 are connected to a computing unit (not shown) or a data fetch unit (not shown), and perform an operation or write to a memory according to an instruction to be executed.
【0023】さらに、実行する命令によって、書き込ま
れるレジスタも同様に、レジスタファイル100,20
0及び300の中から、レジスタファイル指定31で指
定され、データバス11を選択手段10によって選択
し、選択されたレジスタファイル中のレジスタに書き込
まれる。また、データバス21には、演算器出力または
メモリからの読み出しデータが接続される。Further, the registers to be written in accordance with the instruction to be executed are similarly stored in the register files 100 and 20.
The data bus 11 is designated by the register file designation 31 from 0 and 300, and the data bus 11 is selected by the selection means 10 and written into the register in the selected register file. The data bus 21 is connected to the output of the arithmetic unit or the data read from the memory.
【0024】従って、3つのレジスタファイル100,
200及び300から実行中の命令列が使用するレジス
タファイルを選択して使用することにより、3つのタス
クの実行状態を保持することが可能である。Therefore, three register files 100,
By selecting and using the register file used by the instruction sequence being executed from 200 and 300, it is possible to hold the execution state of the three tasks.
【0025】ここで、3つのレジスタファイル100,
200及び300の切り替えは、従来通り、レジスタフ
ァイル切り替え手段30の状態を変更する命令を実行す
ることによっても可能であり、レジスタファイル切り替
え手段30は、その命令によって、どのレジスタファイ
ルを選択するかを変更する構成にもなっている。Here, three register files 100,
Switching between 200 and 300 can also be performed by executing an instruction to change the state of the register file switching means 30 as in the past, and the register file switching means 30 determines which register file is to be selected by the instruction. The configuration is also changed.
【0026】従って、3つのレジスタファイル100,
200及び300に割付けられた3つのタスクを高速に
切り替えながら実行することが可能であるという従来か
らの情報処理装置の特徴を持っている。Therefore, three register files 100,
It has a feature of a conventional information processing apparatus that can execute the three tasks assigned to 200 and 300 while switching at high speed.
【0027】ここで、本発明の特徴である割込み40
0,401〜40Nによって、レジスタファイルを切り
替える動作について説明する。Here, the interrupt 40 which is a feature of the present invention is described.
The operation of switching register files according to 0, 401 to 40N will be described.
【0028】図2は、割込みによるレジスタファイル切
り替え動作を示すフローチャート図である。FIG. 2 is a flowchart showing a register file switching operation by an interrupt.
【0029】図2において、1は、割込みの発生を検出
する割込み検出ステップである。2は、発生した割込み
のレベルが現在選択されているレジスタファイルの状態
レジスタの割込みマスクより高位であることを検出する
割込みレベル検出ステップである。In FIG. 2, reference numeral 1 denotes an interruption detecting step for detecting occurrence of an interruption. 2 is an interrupt level detecting step for detecting that the level of the generated interrupt is higher than the interrupt mask of the status register of the currently selected register file.
【0030】3は、すべての状態レジスタの割込み要因
フィールドを走査して、発生した割込みを処理するレジ
スタファイルを検出するレジスタファイル検出ステップ
である。Reference numeral 3 denotes a register file detecting step of scanning the interrupt factor fields of all the status registers and detecting a register file for processing the generated interrupt.
【0031】4は、検出したレジスタファイルに切り替
えるレジスタファイル切り替えステップである。Step 4 is a register file switching step for switching to the detected register file.
【0032】以下具体的な説明のために、Nは7の場
合、つまり、8本の割込み400〜407がある場合に
限定する。この限定は、本発明を限定するものでないこ
とは明かである。また、割込みレベルは7段階とする。In the following, for the sake of specific description, the case where N is 7, that is, the case where there are eight interrupts 400 to 407 is limited. It is clear that this limitation does not limit the invention. Also, there are seven interrupt levels.
【0033】したがって、状態レジスタ101,201
及び301は、それぞれ、割込みの本数に対応する8ビ
ットの割込み要因フィールドと、7段階の割込みレベル
を表わす最小限のビット数である3ビットの割込みマス
クフィールドを持つ。また、割込み要因フィールドはビ
ット0から順に割込み400と対応している。Therefore, the status registers 101 and 201
And 301 each have an 8-bit interrupt factor field corresponding to the number of interrupts and a 3-bit interrupt mask field which is the minimum number of bits representing seven levels of interrupt levels. The interrupt factor field corresponds to the interrupt 400 in order from bit 0.
【0034】最初に、各状態レジスタは、(表1)のよ
うに設定されているとする。First, it is assumed that each status register is set as shown in (Table 1).
【0035】[0035]
【表1】 [Table 1]
【0036】したがって、レジスタファイル100を使
用しているタスクAは、割込みマスクが1で、割込み4
00及び402を処理するよう設定されている。また、
レジスタファイル200を使用しているタスクBは、割
込みマスクが2で、割込み403及び404を処理する
よう設定されている。さらにレジスタファイル300を
使用されているタスクCは、割込みマスクが5で、割込
み401,405及び407を処理するように設定され
ている。Therefore, the task A using the register file 100 has an interrupt mask of 1 and an interrupt of 4
00 and 402 are set to be processed. Also,
Task B using the register file 200 has an interrupt mask of 2 and is set to process interrupts 403 and 404. Further, the task C using the register file 300 has an interrupt mask of 5, and is set to process interrupts 401, 405 and 407.
【0037】ここで説明のために、割込みレベルは、0
が最高位で順に6が最低位、そして7が割込み要因が発
生していないことを示すことにする。For the sake of explanation, the interrupt level is 0
Is the highest order, 6 is the lowest order, and 7 indicates that no interrupt factor has occurred.
【0038】さらに、レジスタファイル切り替え手段3
0は、レジスタファイル200を選択しているとする。
つまり、レジスタファイル200中のPCを使用して命
令フェッチを行い、フェッチされた命令の実行をレジス
タファイル200を使用して行っている。当然状態レジ
スタ201が選択されているので、現在の割込みマスク
は2である。したがって、割込みレベルが0または1の
割込みを受け付ける状態にあることになる。Further, register file switching means 3
0 indicates that the register file 200 is selected.
That is, the instruction fetch is performed using the PC in the register file 200, and the execution of the fetched instruction is performed using the register file 200. Since the status register 201 is selected, the current interrupt mask is 2. Therefore, the interrupt level of 0 or 1 is accepted.
【0039】この状態で、現在選択されていないレジス
タファイル100中の状態レジスタ101の割込み要因
フィールドで割込み処理を行うことが示されている割込
み要因(つまり、状態レジスタ101の割込み要因フィ
ールドで”1”であるビットに対応する割込み要因40
0及び402)が発生した場合の動作について説明す
る。In this state, the interrupt factor indicated in the interrupt factor field of the status register 101 in the currently unselected register file 100 indicates that the interrupt processing is to be performed (that is, "1" in the interrupt factor field of the status register 101). Interrupt cause 40 corresponding to the bit of ""
0 and 402) will be described.
【0040】(1)割込み402がレベル1で発生(割
込み402が001を示す) (2)現在選択中の状態レジスタ201の割込みレベル
より割込み402のレベルが高位 (3)割込み402に対応する割込み要因ビットをすべ
ての状態レジスタに対して走査状態レジスタ101の割
込み402に対する割込み要因ビットが”1”を検出 (4)レジスタファイル100を選択するという、図2
に示した4つのステップによって、割込み402を処理
するタスクAが割付けられているレジスタファイル10
0に切り替えることができる。(1) Interrupt 402 occurs at level 1 (interrupt 402 indicates 001) (2) Interrupt 402 is higher than interrupt level of status register 201 currently selected (3) Interrupt corresponding to interrupt 402 The cause bits are detected for all the state registers. The interrupt cause bit for the interrupt 402 of the scan state register 101 detects "1". (4) The register file 100 is selected.
The register file 10 to which the task A that processes the interrupt 402 is assigned by the four steps shown in FIG.
Can be switched to zero.
【0041】この例では割込み402を処理するレジス
タファイル100を使用しているタスクAの優先順位
が、レジスタファイル200を使用しているタスクBよ
り高い場合、状態レジスタ201の割込みマスクフィー
ルドを割込み402の割込みレベルより低位にしておく
ことによって、タスク間の優先順位を制御することが可
能である。In this example, if the priority of the task A using the register file 100 that processes the interrupt 402 is higher than the priority of the task B using the register file 200, the interrupt mask field of the status register 201 is changed to the interrupt 402. , It is possible to control the priority between tasks.
【0042】また、初期状態において、状態レジスタ2
01の割込みマスクフィールドを1にした場合には、ス
テップ(2)において、現在選択中の状態レジスタ20
1の割込みマスクフィールドより割込み402のレベル
が高位でないのでレジスタの切り替えは行われない。こ
れは、図2のステップ2でNOの経路が選択されるため
である。この場合、割込み402を処理するタスクAの
優先順位が現在実行中のタスクBより優先順位が低位で
あるように制御している例であり、状態レジスタ201
の割込みマスクフィールドを割込み402の割込みレベ
ルより高位にするだけで、タスク間の優先順位を制御す
ることが可能であることがわかる。In the initial state, the status register 2
01 is set to 1 in step (2), the currently selected status register 20
Since the level of the interrupt 402 is not higher than the interrupt mask field of No. 1, the register is not switched. This is because the NO route is selected in step 2 of FIG. In this case, the task A that processes the interrupt 402 is controlled so that the priority of the task A is lower than that of the task B currently being executed.
It is understood that it is possible to control the priority between tasks simply by setting the interrupt mask field of “1” higher than the interrupt level of the interrupt 402.
【0043】したがって、本実施の形態によれば、タス
クの優先順位を制御することが可能であり、さらに、状
態レジスタの割込みマスクフィールドを書換えることに
より、タスクの優先順位を変更することが可能である。Therefore, according to the present embodiment, the priority of a task can be controlled, and the priority of a task can be changed by rewriting the interrupt mask field of the status register. It is.
【0044】(実施の形態2)図3は請求項2に記載の
情報処理装置のブロック図を示し、図3において図1と
同一物には同一符号を付している。(Embodiment 2) FIG. 3 is a block diagram of an information processing apparatus according to a second embodiment, and in FIG. 3, the same components as those in FIG. 1 are denoted by the same reference numerals.
【0045】図3において、1000は、命令によって
実行を行う命令実行ユニットで、少なくとも図1に示し
た情報処理装置の本発明に関与する部分に加えて、割込
みレベル指定手段1010と、処理ユニット起動手段1
020から構成されている。In FIG. 3, reference numeral 1000 denotes an instruction execution unit for executing an instruction. In addition to at least the part of the information processing apparatus shown in FIG. Means 1
020.
【0046】処理ユニット起動手段1020は、処理ユ
ニットの起動命令が実行された時に、その起動命令によ
って指定された処理ユニットを起動信号1021によっ
て選択的に起動するものである。The processing unit activation means 1020 selectively activates the processing unit specified by the activation instruction by the activation signal 1021 when the activation instruction of the processing unit is executed.
【0047】割込みレベル指定手段1010は、処理ユ
ニット起動手段1020が選択的に処理ユニット110
0,1200〜1N00を起動する際に、起動する処理
ユニットに実行完了時の割込みレベルを割込みレベル指
定1011によって通知するものである。The interrupt level designating means 1010 is selectively operated by the processing unit starting means 1020.
When starting 0, 1200 to 1N00, the processing unit to be started is notified of the interrupt level at the time of completion of execution by the interrupt level designation 1011.
【0048】また、N+1個(Nは0以上の整数)の処
理ユニット1100,1200〜1N00は、命令実行
ユニットから処理を起動され、その処理の完了を割込み
400,401〜40Nによって命令実行ユニットに通
知するものである。The N + 1 (N is an integer of 0 or more) processing units 1100, 1200 to 1N00 are activated by the instruction execution unit, and the completion of the processing is notified to the instruction execution unit by interrupts 400, 401 to 40N. Notify.
【0049】割込みレベル指定手段1010は、たとえ
ば、処理ユニット起動命令中に、その起動する処理ユニ
ットが完了する際の割込みレベルを示す割込みレベル情
報を示すフィールドを設けておき、その処理ユニット起
動命令の実行時に該フィールドを割込みレベル指定10
11によって通知することによって行うことができる。The interrupt level designating means 1010 provides, for example, in a processing unit start instruction, a field indicating interrupt level information indicating an interrupt level when the processing unit to be started is completed. Specify this field as an interrupt level at execution 10
11 can be performed.
【0050】ここで、本発明の動作を説明する。命令実
行ユニットは、実行処理ユニットに起動を要求する処理
ユニット起動命令を実行すると、該処理ユニット起動命
令で指定された処理ユニットを処理ユニット起動信号1
021によって選択的に起動すると同時に、選択された
処理ユニットに対して、割込みレベル指定手段1010
は、割込みレベル指定1011を通じて、該処理ユニッ
トの実行完了時の割込みレベルを通知する。処理ユニッ
ト起動命令の実行後、命令実行ユニットは、処理を継続
する。Here, the operation of the present invention will be described. When the instruction execution unit executes a processing unit start instruction requesting the execution processing unit to start, the instruction execution unit sets the processing unit specified by the processing unit start instruction to the processing unit start signal 1.
021, and at the same time, the interrupt level specifying means 1010
Notifies the interrupt level at the completion of the execution of the processing unit through the interrupt level designation 1011. After executing the processing unit activation instruction, the instruction execution unit continues the processing.
【0051】起動中の処理ユニットは、実行を完了する
と該処理ユニットが起動された時に割込みレベル指定1
011によって指定された割込みレベル及び割込み要因
を該処理ユニットと命令実行ユニットを接続する割込み
(400,401〜40Nのどれかひとつ)に出力す
る。Upon completion of the execution, the processing unit that has been started up has an interrupt level designation 1 when the processing unit is started up.
The interrupt level and the interrupt factor designated by 011 are output to an interrupt (any one of 400, 401 to 40N) connecting the processing unit and the instruction execution unit.
【0052】そして、割込みを検出したレジスタファイ
ル切り替え手段30は、実施の形態1において説明した
動作を行い、レジスタを必要に応じて切り替える。Then, the register file switching means 30 which detects the interrupt performs the operation described in the first embodiment, and switches the register as required.
【0053】これにより、状態レジスタの割込みマスク
フィールドの変更によるだけでなく、割込みレベルを命
令によって変更することが可能になるので、タスクの優
先順位を変更することがさらに柔軟に制御可能である。As a result, not only can the interrupt mask field of the status register be changed, but also the interrupt level can be changed by an instruction, so that the task priority can be changed more flexibly.
【0054】なお、処理ユニット起動命令によって起動
される処理ユニットは、単独でも複数でも良い。The number of processing units activated by the processing unit activation instruction may be one or more.
【0055】なお、以上の説明では、割込みレベル指定
手段1010は、処理ユニット起動命令中の割込みレベ
ルフィールドを基に、起動する処理ユニットに対する割
込みレベルを通知するとして説明したが、処理ユニット
起動命令実行時に選択されているレジスタファイル中の
状態レジスタの割込みマスクフィールドを基に起動する
処理ユニットに対する割込みレベルを通知することも可
能であり、これによって、タスクの優先順位を情報処理
装置の状態によって動的に変化させることが可能であ
る。In the above description, the interrupt level specifying means 1010 has been described as notifying the interrupt level to the processing unit to be activated based on the interrupt level field in the processing unit activation instruction. It is also possible to notify the interrupt level to the processing unit to be activated based on the interrupt mask field of the status register in the register file which is selected at the time, whereby the priority of the task can be dynamically determined according to the state of the information processing apparatus. Can be changed to
【0056】なお、処理ユニット起動命令の実行によっ
て、選択されているレジスタファイル中の状態レジスタ
の割込み要因フィールドの、起動する処理ユニットが出
力する割込みに対応するビットを”1”に設定する処理
ユニット起動命令を備えることによって、命令数を削減
することが可能である。The processing unit which sets the bit corresponding to the interrupt output by the processing unit to be activated in the interrupt factor field of the status register in the selected register file to "1" by executing the processing unit activation instruction. By providing a start instruction, the number of instructions can be reduced.
【0057】[0057]
【発明の効果】以上のように本発明によれば、それぞれ
のレジスタファイル内の状態レジスタに割込み要因フィ
ールド及び割込みマスクフィールドを保持し、割込み要
因及び割込みレベルを用いて、レジスタファイル切り替
えによるタスク切り替えを制御することによって、タス
クの実行中に状態レジスタの割込み要因フィールドを変
更することによって、少い処理のオーバーヘッドでタス
クスケージューリング処理を行うことができるという有
利な効果が得られる。As described above, according to the present invention, the task switching by register file switching is performed using the interrupt factor and the interrupt level by holding the interrupt factor field and the interrupt mask field in the status register in each register file. By changing the interrupt factor field of the status register during the execution of the task, the task scheduling process can be performed with a small processing overhead.
【0058】さらに、処理ユニット起動命令によって、
または、処理ユニット起動命令実行時に選択されている
状態レジスタの割込みマスクフィールドに基づいて、起
動される処理ユニットの実行完了時の割込みレベルを指
定し、処理ユニットが実行完了時に起動時に指定された
割込みレベルによって割込むことにより、さらに細かい
スケジューリングを可能とすることができる。Further, according to the processing unit start instruction,
Alternatively, based on the interrupt mask field of the status register selected at the time of execution of the processing unit start instruction, specify the interrupt level at the time of completion of execution of the processing unit to be started, and specify the interrupt level specified at the time of completion of execution of the processing unit. By interrupting by level, more detailed scheduling can be made possible.
【0059】また、処理ユニット起動命令が、選択され
ている状態レジスタの割込み要因フィールドの該処理ユ
ニット起動命令によって起動される処理ユニットが発生
する割込み要因に対応するビットを設定することによ
り、命令数を削減することが可能である。The processing unit activation instruction sets the bit corresponding to the interruption factor generated by the processing unit activated by the processing unit activation instruction in the interrupt factor field of the selected status register. Can be reduced.
【図1】本発明の実施の形態1における情報処理装置の
ブロック図FIG. 1 is a block diagram of an information processing apparatus according to Embodiment 1 of the present invention.
【図2】本実施の形態における割込みによるレジスタフ
ァイル切り替え動作を示すフローチャートFIG. 2 is a flowchart showing a register file switching operation by an interrupt according to the embodiment;
【図3】本発明の実施の形態2における情報処理装置の
ブロック図FIG. 3 is a block diagram of an information processing device according to a second embodiment of the present invention.
30 レジスタファイル切り替え手段 100,200,300 レジスタファイル 400,401〜40N 割込み 1000 命令実行ユニット 1100,1200〜1N00 処理ユニット 30 register file switching means 100, 200, 300 register file 400, 401 to 40N interrupt 1000 instruction execution unit 1100, 1200 to 1N00 processing unit
Claims (5)
する情報処理装置において、 少くとも複数のレジスタファイルを備え、前記レジスタ
ファイルの1つを選択して、該レジスタファイルの内容
を使用して、複数のタスクを時分割で実行する命令実行
ユニットと、 前記複数のレジスタファイルの夫々に含まれ、少くと
も、前記割込み要因の夫々に対応し、前記割込み要因を
処理するタスクであるか、ないかを示す複数のビットか
ら成る割込み要因フィールドと、前記割込み要因に対す
る前記割込みレベルをマスクする割込みマスクフィール
ドから構成される複数の状態レジスタと、 前記割込み要因の発生に基づいて、前記割込み要因に対
する前記割込みレベルが現在選択されている前記レジス
タファイル中の前記状態レジスタの前記割込みマスクフ
ィールドより高位である場合、前記複数のレジスタファ
イル中の全ての前記状態レジスタの前記割込み要因フィ
ールド中の前記発生した割込み要因に対応するビットを
走査し、前記割込み要因を処理するタスクの使用する前
記レジスタファイルを検出し、前記検出したレジスタフ
ァイルに切り替えるレジスタファイル切り替え手段とを
備えた情報処理装置。An information processing apparatus having a plurality of interrupt causes and interrupt levels, comprising at least a plurality of register files, selecting one of the register files, and using the contents of the register file to select a plurality of register files. An instruction execution unit that executes the task in a time-division manner, and whether or not the task is included in each of the plurality of register files and at least corresponds to each of the interrupt causes and processes the interrupt cause. And a plurality of status registers each comprising an interrupt mask field for masking the interrupt level for the interrupt factor, and an interrupt level for the interrupt factor based on the occurrence of the interrupt factor. Is the interrupt of the status register in the register file currently selected If it is higher than the mask field, scan the bit corresponding to the generated interrupt factor in the interrupt factor field of all the status registers in the plurality of register files, and use the task for processing the interrupt factor. An information processing apparatus comprising: a register file switching unit that detects the register file and switches to the detected register file.
動され、前記起動された処理の実行の完了を割込みによ
って通知する複数の処理ユニットと、 前記それぞれの処理ユニットを選択的に起動する処理ユ
ニット起動手段と、 前記それぞれの処理ユニットを処理ユニット起動命令に
よって処理を起動する時に、該処理の完了時の割込みレ
ベルを前記処理ユニットに指定する割込みレベル指定手
段を備え、 前記それぞれの処理ユニットは、実行の完了時に割込み
レベル指定手段によって指定された割込みレベルを発生
し、前記レジスタファイル切り替え手段は、前記処理ユ
ニットの発生する前記割込み要因及び前記割込みレベル
に基づき、レジスタファイル切り替えを行うことを特徴
とする請求項1記載の情報処理装置。2. A plurality of processing units which are activated by a processing unit activation instruction and notify completion of execution of the activated processing by an interrupt, and processing unit activation means for selectively activating each of the processing units. And an interrupt level designating unit for designating an interrupt level at the time of completion of the processing to the processing unit when the processing unit is activated by a processing unit activation instruction. Upon completion, an interrupt level specified by an interrupt level specifying unit is generated, and the register file switching unit performs register file switching based on the interrupt factor generated by the processing unit and the interrupt level. Item 10. The information processing apparatus according to Item 1.
ユニット起動命令中の割込みレベル情報を基に割込みレ
ベルを指定することを特徴とする請求項2記載の情報処
理装置。3. An information processing apparatus according to claim 2, wherein said interrupt level specifying means specifies an interrupt level based on interrupt level information in said processing unit activation instruction.
ユニット起動命令を実行したときに選択されている前記
レジスタファイル中の前記状態レジスタの前記割込みマ
スクフィールドの情報を基に割込みレベルを指定するこ
とを特徴とする請求項2記載の情報処理装置。4. The interrupt level specifying means specifies an interrupt level based on information in the interrupt mask field of the status register in the register file selected when the processing unit start instruction is executed. 3. The information processing apparatus according to claim 2, wherein:
て、前記選択されているレジスタファイル中の前記状態
レジスタの前記割込み要因フィールド中の該処理ユニッ
ト起動命令によって選択的に起動される処理ユニットが
発生する前記割込み要因に対応するビットを設定するこ
とを特徴とする請求項2記載の情報処理装置。5. The execution of the processing unit start instruction generates a processing unit selectively activated by the processing unit start instruction in the interrupt factor field of the status register in the selected register file. 3. The information processing apparatus according to claim 2, wherein a bit corresponding to the interrupt factor is set.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8298318A JPH10143376A (en) | 1996-11-11 | 1996-11-11 | Information processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8298318A JPH10143376A (en) | 1996-11-11 | 1996-11-11 | Information processing device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH10143376A true JPH10143376A (en) | 1998-05-29 |
Family
ID=17858101
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP8298318A Pending JPH10143376A (en) | 1996-11-11 | 1996-11-11 | Information processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH10143376A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002312302A (en) * | 2001-04-09 | 2002-10-25 | Denso Corp | Peripheral equipment |
| US7386707B2 (en) | 2002-01-09 | 2008-06-10 | Matsushita Electric Industrial Co., Ltd. | Processor and program execution method capable of efficient program execution |
| US7735087B2 (en) | 2003-03-13 | 2010-06-08 | Panasonic Corporation | Task switching apparatus, method and program |
-
1996
- 1996-11-11 JP JP8298318A patent/JPH10143376A/en active Pending
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002312302A (en) * | 2001-04-09 | 2002-10-25 | Denso Corp | Peripheral equipment |
| US7386707B2 (en) | 2002-01-09 | 2008-06-10 | Matsushita Electric Industrial Co., Ltd. | 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 |
| US8006076B2 (en) | 2002-01-09 | 2011-08-23 | Panasonic Corporation | Processor and program execution method capable of efficient program execution |
| US8719827B2 (en) | 2002-01-09 | 2014-05-06 | 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 |
| 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 |
| US8276156B2 (en) | 2003-03-13 | 2012-09-25 | Panasonic Corporation | Task switching based on assigned time slot |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6075546A (en) | Packetized command interface to graphics processor | |
| JPH0454255B2 (en) | ||
| JP3970609B2 (en) | Processor system | |
| JPH10143376A (en) | Information processing device | |
| JP2003058381A (en) | Processor that enables exception handling setting by program | |
| JPH0668725B2 (en) | Device for responding to interrupt condition in data processing system and method for responding to asynchronous interrupt condition | |
| JP2585905B2 (en) | Multitask execution device | |
| JPH0377137A (en) | Information processor | |
| JP2000076095A (en) | Program trace device, program trace method, and storage medium storing the program | |
| JPS60263238A (en) | Information processor | |
| JP2853647B2 (en) | Function addition method to interpreter with debugger | |
| JP2899009B2 (en) | Information processing device | |
| JPH02214938A (en) | Data processor | |
| JPH0756633B2 (en) | Task switching method | |
| JPH056280A (en) | Interruption control system | |
| JPH0821027B2 (en) | Microcomputer with built-in A / D converter | |
| JP2584082B2 (en) | High-speed interrupt processing device | |
| JPH0415831A (en) | Time sharing multitask controller | |
| JPH0198023A (en) | Conditional subroutine calling system | |
| JPS6111880A (en) | Vector processor | |
| JPS63229530A (en) | Interruption control system | |
| JPS638841A (en) | Interruption accepting system | |
| JPS63120336A (en) | Switching system for memory access mode | |
| JPS62209641A (en) | Converting circuit for bank memory address | |
| JPH0240722A (en) | Arithmetic processor |