JP2007280023A - Interrupt controller - Google Patents
Interrupt controller Download PDFInfo
- Publication number
- JP2007280023A JP2007280023A JP2006105335A JP2006105335A JP2007280023A JP 2007280023 A JP2007280023 A JP 2007280023A JP 2006105335 A JP2006105335 A JP 2006105335A JP 2006105335 A JP2006105335 A JP 2006105335A JP 2007280023 A JP2007280023 A JP 2007280023A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- processor
- interrupt request
- waiting
- request
- 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
Images
Landscapes
- Bus Control (AREA)
Abstract
Description
本発明は、割込み制御装置に係り、特に外部装置に要求された外部割込みを受付ける割込み制御装置に関する。 The present invention relates to an interrupt control device, and more particularly to an interrupt control device that accepts an external interrupt requested by an external device.
現在、プロセッサに複数のモジュールを接続して構成される装置がある。このような装置の例として、例えば、携帯電話が挙げられる。携帯電話は、プロセッサが通信やカメラ、キーボードといった複数のモジュールと接続し、プロセッサ内部で発生する処理(通常処理)を実行しながらモジュールによって要求される割込み処理を実行する。
外部のモジュールによって要求される割込み処理(外部割込み)は、通常処理から外部割込みへの処理の移行や外部割込みの終了後、通常処理への復帰までの間プロセッサを停止させる。このため、外部割込みによってプロセッサが停止する時間を短縮し、プロセッサの処理効率を高める技術が提案されている。
Currently, there are devices configured by connecting a plurality of modules to a processor. An example of such a device is a mobile phone. In the mobile phone, a processor connects to a plurality of modules such as communication, a camera, and a keyboard, and executes interrupt processing required by the module while executing processing (normal processing) generated inside the processor.
Interrupt processing (external interrupt) requested by an external module stops the processor during the transition from normal processing to external interrupt or after the completion of external interrupt until the return to normal processing. For this reason, a technique has been proposed in which the time during which the processor is stopped by an external interrupt is shortened and the processing efficiency of the processor is increased.
このような技術の従来例として、例えば、特許文献1が挙げられる。特許文献1は、割込み処理後、割込みの要求時、halt状態のプロセッサの起動を高速化することによって割込みによるプロセッサの処理効率低下を抑えるものである。
ところで、外部割込みの処理では、プロセッサが、モジュールから要求された割込みをハードウェアに処理させ、ハードウェアから処理の終了の通知を受けて通常の動作に戻る場合がある。このとき、プロセッサは、割込み要求を受付けた後、割込み処理の終了の通知まで他の割込み処理を待たせて待機する。
しかしながら、特許文献1の構成は、割込み処理が要求された場合には割込みに内容によらずプロセッサが起動する。このため、上記した動作を特許文献1に記載された構成で実現する場合、要求された割込みが特定の割込みであるか否かを判定し、判定の結果によってはいったん起動されたプロセッサを再度halt状態に遷移させなければならないという不具合がある。
By the way, in external interrupt processing, the processor may cause the hardware to process an interrupt requested from the module, and may return to normal operation upon receiving a notification of the end of processing from the hardware. At this time, after accepting the interrupt request, the processor waits for another interrupt process until notification of the end of the interrupt process.
However, in the configuration of Patent Document 1, when interrupt processing is requested, the processor is activated regardless of the content of the interrupt. For this reason, when the above-described operation is realized by the configuration described in Patent Document 1, it is determined whether or not the requested interrupt is a specific interrupt, and depending on the result of the determination, the once activated processor is halted again. There is a problem that the state must be changed.
割込みの内容を判定する方法には、ハードウェアレジスタのポーリングや割込みハンドラ内での判定がある。ただし、ポーリングは、プロセッサがレジスタを監視しなければならないので、プロセッサの処理効率を高めるという目的には不適である。さらに、プロセッサとモジュールとを接続するバスの帯域を占有するという不具合がある。
一方、割込みハンドラは、OS(Operating System)側でタイミングが予測できない処理を受付けて実行するプログラムである。割込みハンドラは、ポーリングに比べてプロセッサの処理効率を高めるという目的に適っている。ただし、割込み処理には、処理時間が短いものも多い。短時間で終了する割込み処理の都度割込みハンドラを起動した場合、処理のオーバーヘッドが大きくなって処理効率を充分高めることができない。
Methods for determining the contents of interrupts include hardware register polling and determination within an interrupt handler. However, polling is not suitable for the purpose of increasing the processing efficiency of the processor because the processor must monitor the register. Furthermore, there is a problem that the bus band connecting the processor and the module is occupied.
On the other hand, the interrupt handler is a program that receives and executes a process whose timing cannot be predicted on the OS (Operating System) side. The interrupt handler is suitable for the purpose of increasing the processing efficiency of the processor as compared with polling. However, many interrupt processes have a short processing time. When an interrupt handler is started every time interrupt processing is completed in a short time, processing overhead increases and processing efficiency cannot be sufficiently increased.
本発明は、上記した点に鑑みてなされたものであって、割込み処理に後に高速にプロセッサを起動可能であって、かつ特定の割込みを待つ場合にもプロセッサの処理効率が低下しない割込み制御装置を提供することを目的とする。 The present invention has been made in view of the above points, and is an interrupt control device that can start a processor at high speed after interrupt processing and does not reduce the processing efficiency of the processor even when waiting for a specific interrupt. The purpose is to provide.
以上の課題を解決するため、本発明の割込み制御装置は、特定の処理に特化した補助プロセッサとの間で信号を授受するための補助プロセッサ用インターフェイスを備え、該補助プロセッサ用インターフェイスからの信号の出力を待って動作するプロセッサへの割込みを制御する割込み制御装置であって、特定の割込み要求である待ち割込み要求を設定する待ち割込み要求設定手段と、前記プロセッサに対してされた割込み要求が前記待ち割込み要求設定手段によって設定された待ち割込み要求であるか否か判断する待ち割込み要求判断手段と、前記割込み要求判断手段によって前記プロセッサに待ち割込み要求がされたと判断された場合には前記補助プロセッサ用インターフェイスを介してプロセッサに前記信号を出力する一方、待ち割込み要求がされるまでは前記信号の出力を禁止する信号出力制御手段と、を備えることを特徴とする。 In order to solve the above problems, an interrupt control device according to the present invention includes an auxiliary processor interface for exchanging signals with an auxiliary processor specialized for a specific process, and a signal from the auxiliary processor interface. An interrupt control device for controlling an interrupt to a processor that operates while waiting for an output of the output, a wait interrupt request setting means for setting a wait interrupt request that is a specific interrupt request, and an interrupt request made to the processor Wait interrupt request determination means for determining whether or not the wait interrupt request is set by the wait interrupt request setting means; and when the interrupt request determination means determines that a wait interrupt request is made to the processor, While outputting the signal to the processor via the processor interface, the waiting interrupt Request until is is characterized by and a signal output control means for inhibiting output of said signal.
このような発明によれば、特定の処理に特化した補助プロセッサとの間で信号を授受するための補助プロセッサ用インターフェイスを備え、この補助プロセッサ用インターフェイスからの信号の出力を待って動作するプロセッサへの割込みを制御する構成において、待ち割込み要求を設定し、プロセッサに対してされた割込み要求が待ち割込み要求である場合にだけ補助プロセッサ用インターフェイスを介して信号を出力ことができる。
このため、設定した待ち割込み要求がされるまではプロセッサの動作を停止しておき、待ち割込み要求がされた場合にだけプロセッサを動作させることが可能である。
According to such an invention, the auxiliary processor interface for exchanging signals with the auxiliary processor specialized for the specific processing is provided, and the processor operates after waiting for the output of the signal from the auxiliary processor interface. In the configuration for controlling the interrupt to the processor, a wait interrupt request is set, and a signal can be output via the auxiliary processor interface only when the interrupt request issued to the processor is a wait interrupt request.
Therefore, it is possible to stop the operation of the processor until the set wait interrupt request is made, and to operate the processor only when the wait interrupt request is made.
したがって、本発明は、割込みハンドラのような他のプログラムを起動することなく、割込みからプロセッサを復帰させることができる。このため、他のプログラムを起動することにかかる処理のオーバーヘッドを低減して停止状態のプロセッサを高速に起動することが可能になる。また、待ち割込みの発生時に補助プロセッサからプロセッサに動作を許可する信号が出力されるので、プロセッサは動作が許可されたか否かを積極的に検出することが必要ない。このため、特定の割込みを待つ場合にも処理効率が低下しない。
このような本発明は、割込み処理後に高速にプロセッサを起動可能であって、かつ特定の割込みを待つ場合にもプロセッサの処理効率が低下しない割込み制御装置を提供することができる。
Therefore, the present invention can return the processor from the interrupt without starting another program such as an interrupt handler. For this reason, it is possible to reduce the processing overhead required to start another program and start a stopped processor at high speed. Further, since a signal permitting the operation is output from the auxiliary processor to the processor when a wait interrupt occurs, it is not necessary for the processor to positively detect whether the operation is permitted. For this reason, the processing efficiency does not decrease even when waiting for a specific interrupt.
The present invention as described above can provide an interrupt control device that can start a processor at high speed after interrupt processing and that does not reduce the processing efficiency of the processor even when waiting for a specific interrupt.
また、本発明の割込み制御装置は、前記プロセッサに対する待ち割込み要求以外の割込み要求を、前記補助プロセッサ用インターフェイスを介することなく前記プロセッサに通知する他の通知手段を備えることを特徴とする。
このような発明によれば、待ち割込み以外の割込み要求を他の通知手段によってプロセッサに通知することができる。このため、割込み要求の処理時間や特性に応じて適正に割込みを通知し、プロセッサを動作させることができる。
The interrupt control device according to the present invention is characterized by further comprising other notifying means for notifying the processor of an interrupt request other than the waiting interrupt request to the processor without passing through the auxiliary processor interface.
According to such an invention, an interrupt request other than a wait interrupt can be notified to the processor by the other notification means. For this reason, it is possible to appropriately notify the interrupt according to the processing time and characteristics of the interrupt request and to operate the processor.
また、本発明の割込み制御装置は、前記待ち割込み要求設定手段は、待ち割込み要求を識別するための情報を設定するテーブルを含み、前記待ち割込み要求判断手段は、発生した割込み要求を前記テーブルと対照して待ち割込み要求を判断することを特徴とする。
このような発明によれば、待ち割込みを比較的簡易に識別し、割込み制御にかかる処理時間を短縮すると共に装置構成を簡易化することができる。
In the interrupt control device of the present invention, the wait interrupt request setting means includes a table for setting information for identifying a wait interrupt request, and the wait interrupt request determination means In contrast, a waiting interrupt request is judged.
According to such an invention, waiting interrupts can be identified relatively easily, the processing time required for interrupt control can be shortened, and the apparatus configuration can be simplified.
また、本発明の割込み制御装置は、前記待ち割込み要求設定手段が待ち割込み要求を複数設定し、前記信号出力制御手段は、前記割込み要求判断手段によって複数の待ち割込み要求の一部がプロセッサにされたと判断された場合に前記補助プロセッサ用インターフェイスを介してプロセッサに前記信号を出力することを特徴とする。
このような発明によれば、割込み制御の自由度を高めると共にプロセッサを要求に応じて適正に処理することができる。
In the interrupt control device of the present invention, the wait interrupt request setting means sets a plurality of wait interrupt requests, and the signal output control means is configured such that a part of the plurality of wait interrupt requests is made into a processor by the interrupt request determination means. If it is determined that the signal is received, the signal is output to the processor via the auxiliary processor interface.
According to such an invention, the degree of freedom of interrupt control can be increased and the processor can be appropriately processed as required.
また、本発明の割込み制御装置は、前記待ち割込み要求設定手段が待ち割込み要求を複数設定し、前記信号出力制御手段は、前記割込み要求判断手段によって複数の待ち割込み要求の全部がプロセッサにされたと判断された場合に前記補助プロセッサ用インターフェイスを介してプロセッサに前記信号を出力することを特徴とする。
このような発明によれば、割込み制御の自由度を高めると共にプロセッサを要求に応じて適正に処理することができる。
In the interrupt control device of the present invention, the wait interrupt request setting means sets a plurality of wait interrupt requests, and the signal output control means determines that all of the plurality of wait interrupt requests are processed by the interrupt request determination means. When it is determined, the signal is output to the processor via the auxiliary processor interface.
According to such an invention, the degree of freedom of interrupt control can be increased and the processor can be appropriately processed as required.
以下、図を参照して本発明に係る割込み制御装置の一実施の形態を説明する。
図1は、本実施形態の割込み制御装置を説明するための図である。本実施形態の割込み制御装置は、特定の処理に特化した補助プロセッサとの間で信号を授受するための補助プロセッサ用インターフェイスを備え、この補助プロセッサ用インターフェイスからの信号(処理完了信号)の出力を待って動作するプロセッサ101への割込みを制御する割込みコントローラ102として構成される。
Hereinafter, an embodiment of an interrupt control apparatus according to the present invention will be described with reference to the drawings.
FIG. 1 is a diagram for explaining the interrupt control device of the present embodiment. The interrupt control device according to the present embodiment includes an auxiliary processor interface for exchanging signals with an auxiliary processor specialized for a specific process, and outputs a signal (processing completion signal) from the auxiliary processor interface. It is configured as an
なお、本実施形態では、割込みコントローラ102が補助プロセッサとして機能する。補助プロセッサは一般的にコプロセッサ(co-processor)と呼ばれ、本実施形態においても割込みコントローラ102に関する構成について適宜コプロセッサの名称を使用する。なお、コプロセッサとは、マイクロプロセッサの性能を強化するために、特定分野に特化した補助プロセッサであって、一般的には暗号化のための演算に使用されるものが多い。
割込みコントローラ102は、プロセッサ101と周辺モジュール103a、103bの間にあって周辺モジュール103a、103bによるプロセッサへの割込み要求を制御する構成である。
In this embodiment, the
The
周辺モジュール103a、103bは、処理の一部をプロセッサ101に依頼し、依頼によってプロセッサ101が実行した処理の結果を受け取る外部機器である。周辺モジュール103a、103bは、プロセッサ101への処理の依頼を外部割込みによって要求する。本実施形態では、外部割込みの要求を単に割込み要求と記し、割込み要求の文言が全て外部割込みを指すものとする。
また、プロセッサ101は、動作に必要なプログラムやデータを記憶するメモリ104とバス105によって接続されている。なお、バス105は、プロセッサ101及び割込みコントローラ102をも接続している。
The
The
図2は、割込みコントローラ102の構成をより詳細に説明するための図である。図2に示したように、コプロセッサとして機能する割込みコントローラ102は、プロセッサ101と接続している。プロセッサ101と接続するため、割込みコントローラ102にはプロセッサ101とのインターフェイスであるコプロセッサインターフェイス処理部208があり、プロセッサ101側にはコプロセッサインターフェイス101がある。
なお、前記したようにコプロセッサには演算処理に特化した構成等、様々な種類のものがある。プロセッサ101のコプロセッサインターフェイス201は、コプロセッサとの間で信号を授受するための汎用的なインターフェイスでよい。つまり、本実施形態は、コプロセッサと接続可能な一般的なプロセッサに適用することが可能である。
FIG. 2 is a diagram for explaining the configuration of the
As described above, there are various types of coprocessors such as a configuration specialized for arithmetic processing. The
割込みコントローラ102は、周辺モジュール103a、103bが発生した割込み要求を検出するための割込み検出部203a、203b、割込み検出部203a、203bによって検出された割込み要求を割込み待ちテーブル206a、206bに対照し、設定された待ち割込み要求であるか否か判断し、待ち割込み要求であると判断された場合にはコプロセッサインターフェイス処理部208を介してプロセッサ101に処理完了信号を出力する一方、待ち割込み要求がされるまでは処理完了信号の出力を禁止する割込みコントローラ制御部205を備えている。
The
割込み通知部207a、207bは、本実施形態において、プロセッサ101に対する割込み要求を、コプロセッサインターフェイス処理部208を介することなくプロセッサ101に通知する他の通知手段となる。
また、割込みコントローラ制御部205及び割込み待ちテーブル206a、206bが待ち割込み要求設定手段、割込みコントローラ制御部205は待ち割込み要求判断手段、割込みコントローラ制御部205及びコプロセッサインターフェイス処理部208は信号出力制御手段として機能する。
In this embodiment, the interrupt
The interrupt
なお、割込み待ちテーブル206a、206bへの待ち割込み要求の設定は、プロセッサ101が後述する新命令を実行したことによって割込みコントローラ制御部205が実行する。
さらに、割込みコントローラ102は、バス105を介してプロセッサ101等とデータを授受するためにバスインターフェイス制御部204を備えている。なお、割込み検出部203a、203b、割込み待ちテーブル206a、206b、割込み通知部207a、207bは、いずれも周辺モジュール103a、103bに対応して二つずつ備えられている。なお、本実施形態は、当然のことながら、周辺モジュールの数を二つに限定するものではなく、いくつあってもよい。
Note that the setting of the waiting interrupt request to the interrupt waiting tables 206a and 206b is executed by the interrupt
Further, the interrupt
割込みコントローラ102のコプロセッサインターフェイス処理部208が処理完了信号を出力すると、処理完了信号は、コプロセッサインターフェイス201を介してプロセッサ101に出力される。プロセッサ101は、処理完了信号を入力したことによって一時停止していた動作を再び開始する。
ここで、図3を用い、プロセッサ101に対する一般的なコプロセッサの実装について説明する。プロセッサ101とコプロセッサとはコプロセッサインターフェイス201を介して接続されている。コプロセッサインターフェイス201は、プロセッサ101とコプロセッサとの間でreq、ack、opcode、dout、dinの4種類の信号を授受している。
When the coprocessor
Here, a general coprocessor implementation for the
信号reqは、プロセッサ101が処理を命令したことをコプロセッサに対して通知するための信号である。信号ackは、命令された処理が完了したことをコプロセッサがプロセッサ101に通知するための信号であって、本実施形態でいう処理完了信号である。また、信号opcodeは、命令された処理の種別を示す信号である。信号doutは、信号opcodeに付随する信号であり、dinはコプロセッサが処理を実行した結果プロセッサ101に返す信号である。
The signal req is a signal for notifying the coprocessor that the
上記した信号のうち、プロセッサ101は、信号reqをコプロセッサに出力して処理を命令した後、コプロセッサにおける処理が完了するまで処理を停止して待機する。そして、コプロセッサが信号ackを出力したことによって処理の完了を検出し、処理の停止を解除して動作を再開するものである。
本実施形態は、このようなコプロセッサとプロセッサ101との関係について着目してなされたものである。すなわち、比較的短時間で処理が完了する短時間割込みには割込みハンドラを起動することなく割込みからプロセッサを復帰させるため、短時間割込みを待ち割込み要求に設定する。そして、コプロセッサの処理完了信号を利用して待ち割込み要求をプロセッサ101に通知し、プロセッサ101を復帰させるものである。
Among the signals described above, the
The present embodiment has been made paying attention to the relationship between such a coprocessor and the
このような本実施形態によれば、プロセッサ101はコプロセッサの処理完了の待機状態から復帰するので、halt状態から復帰するのと同様に高速に割込み状態から復帰することができる。また、コプロセッサの処理完了後と同様にOS処理によって継続して動作することができるので、割込み処理からの復帰がいっそう高速化できる。
According to this embodiment as described above, the
図4は、以上述べた動作をより具体的に説明するための図である。以上の動作を実現するため、本実施形態では、プロセッサ101によって実行されるプログラムに新命令を追加する。新命令とは、割込みコントローラ102が、待ち割込み要求がされた場合にはコプロセッサインターフェイス処理部208を介して処理完了信号を出力させる一方、待ち割込み要求がされるまでは処理完了信号の出力を禁止する命令である。
FIG. 4 is a diagram for more specifically explaining the above-described operation. In order to realize the above operation, in this embodiment, a new instruction is added to the program executed by the
プロセッサ101が新命令を実行したことにより、プロセッサ101は、予め特定の割込み要求(割込みAと記す)がされるまで割込みコントローラ102に信号ackを出力しないよう信号reqを使って命令する。命令後、プロセッサ101は、割込みコントローラ102からの信号ackの待ち状態に入る。
割込みコントローラ102は、信号reqを入力し、割込みAの待ち状態に入る。そして、周辺モジュールから割込みAの割込み要求があった場合にだけ信号ackを、コプロセッサインターフェイス処理部208を介してコプロセッサインターフェイス201に出力する。信号ackを入力したプロセッサ101は、新命令の実行が完了したものとして次に実行すべきプログラムの実行を開始するよう動作する。
When the
The interrupt
本実施形態の新命令は、図5に示すように、通常のスプログラムにしたがってなされる命令C、命令Bの間に挿入される。このため、プロセッサ101は、信号ackが出力されて新命令が終了した後にはプログラム通り命令C、命令Bを実行する。
このように、本実施形態は、割込みAの割込み要求をコプロセッサによる動作完了通知と同様にして受け取ることになる。このため、プロセッサ101は、割込みAの割込み要求に対して割込みハンドラを起動することなく、通常の命令と同様に割込みAを処理することができる。
As shown in FIG. 5, the new instruction of this embodiment is inserted between an instruction C and an instruction B that are executed according to a normal scan program. For this reason, the
Thus, in the present embodiment, the interrupt request for interrupt A is received in the same manner as the operation completion notification by the coprocessor. For this reason, the
このような本実施形態によれば、周辺モジュール103a、103bによる割込み要求のうち短時間割込みを待ち割込み要求に設定することにより、短時間処理のうち割込みハンドラの起動にかかるオーバーヘッドを低減することができる。
また、本実施形態は、プロセッサ101が、コプロセッサを備えたプロセッサ101の既存の構成を利用してコプロセッサに新命令を設定することができる。図6は、本実施形態の新命令の設定の方法を具体的に説明するための図である。図6(a)、(b)は、命令の具体的な形式を示した図であって、(a)は命令のフォーマットを、(b)は(a)に示したフォーマットに具体的な値を記した例を示している。
According to the present embodiment as described above, by setting a short time interrupt as a wait interrupt request among the interrupt requests by the
In the present embodiment, the
コプロセッサを実装する一般的なプロセッサ101には、ldcと呼ばれる命令が設定されている。ldcは、プロセッサ101側のレジスタの値をコプロセッサ側のレジスタに書込ませる命令であって、先に述べたopcodeでldcを設定することによって実行できる。プロセッサ101のレジスタrsの値をコプロセッサのレジスタに書込むldc命令は、以下のように表記される。
ldc cd,rs
An instruction called ldc is set in a
ldc cd, rs
本実施形態は、ldc命令を用い、プロセッサ101側で指定した割込み要求をコプロセッサ側で待ち割込み要求に設定する。例えば、プロセッサ101のレジスタr0の値をビットマップにしたときに1となるビットが示す割込みを待ち割込み要求に設定する場合、命令は、以下のように表される。
ldc 1,r0
さらに、ldc 2,r0の命令を設定することによって割込み待ちのタイムアウトの有無をも区別して設定することが可能になる。
In the present embodiment, an ldc instruction is used, and an interrupt request designated on the
ldc 1, r0
Further, by setting the instruction of ldc 2 and r0, it is possible to distinguish and set whether or not there is a timeout for waiting for an interrupt.
図6(a)、(b)に示した命令は、16ビットのデータを使って表される。そして、命令の種類を示すopcodeに6ビットを使い、待ち割込み要求を識別するためのデータに5ビット、プロセッサ101側のレジスタを特定するためのデータに5ビットを使用している。
なお、このような命令を受けたコプロセッサがどのように動作するかはコプロセッサ側の仕様によって決定する。本実施形態は、コプロセッサを割込みコントローラ102のように構成したものである。そして、プロセッサ101で指定されたレジスタの値を図示しない内部のレジスタに書込み、書込まれた値が示す割込み要求を待ち割込み要求に設定する。
The instructions shown in FIGS. 6A and 6B are expressed using 16-bit data. Then, 6 bits are used for opcode indicating the type of instruction, 5 bits are used for data for identifying a wait interrupt request, and 5 bits are used for data for specifying a register on the
Note that how a coprocessor that receives such an instruction operates depends on the specifications of the coprocessor. In this embodiment, the coprocessor is configured as an interrupt
なお、割込みコントローラ制御部205は、新命令の実行によって設定された待ち割込み要求を割込み待ちテーブル206a、206bに設定する。したがって、本実施形態は、新命令の実行によって自動的に待ち割込み要求を設定し、識別して割込み制御を実行することができる。
また、本実施形態は、ldc命令を調整することによって待ち割込み要求を複数設定することが可能である。待ち割込み要求が複数設定されている場合、割込みコントローラ102は、割込みコントローラ制御部205によって複数の待ち割込み要求の一部がプロセッサにされたと判断された場合にコプロセッサインターフェイス処理部208を介してプロセッサ101に信号ackを出力してもよい。
The interrupt
In this embodiment, a plurality of waiting interrupt requests can be set by adjusting the ldc instruction. When a plurality of waiting interrupt requests are set, the interrupt
また、待ち割込み要求が複数設定されている場合、割込みコントローラ102は、割込みコントローラ制御部205によって複数の待ち割込み要求の全部がプロセッサにされたと判断された場合にコプロセッサインターフェイス処理部208を介してプロセッサ101に信号ackを出力してもよい。なお、待ち割込み要求の全部がプロセッサにされたと判断された場合に信号ackを出力する構成は、プロセッサをhalt状態に遷移させて割込み処理から復帰させる構成と同様の効果を得る。
When a plurality of waiting interrupt requests are set, the interrupt
次に、以上述べた構成の動作について説明する。
周辺モジュール103a、103bは、プロセッサ101に対して割込み要求をする。割込み検出部203a、203bは、周辺モジュール103a、103bごとに設けられていて、割込みを要求した周辺モジュールに対応する割込み検出部が割込みコントローラ制御部205に割込み要求を通知する。
Next, the operation of the configuration described above will be described.
The
割込みコントローラ制御部205は、割込み待ちテーブル206a、206bを参照する。そして、発生した割込みが待ち割込み要求であるか否か判断する。判断の結果、待ち割込み要求でない場合、割込みコントローラ制御部205は割込み通知部207a、207bによってバス105を介し、プロセッサ101に割込み要求をする。
また、発生した割込みが待ち割込み要求であった場合、割込みコントローラ102は、コプロセッサインターフェイス処理部208から信号ackをコプロセッサインターフェイス201を介してプロセッサ101に出力する。以下、図7、図8を用い、待ち割込み要求が発生した場合のプロセッサ101、割込みコントローラ102の動作について説明する。
The interrupt
If the generated interrupt is a wait interrupt request, the interrupt
図7は、プロセッサ101がコプロセッサを制御する際の動作を説明するためのフローチャートである。プロセッサ101が新命令を実行することにより、新命令に基づくldc命令を出力するためのopcode及びdoutが出力される(S701)。opcode及びdoutの出力によって割込みコントローラ102に待ち割込み要求が設定される。
FIG. 7 is a flowchart for explaining the operation when the
次に、プロセッサ101は、コプロセッサインターフェイス201に出力したreq信号をONしてコプロセッサに処理を要求する命令をしたことを通知する(S702)。そして、命令された処理が完了したことを示す信号ackがコプロセッサインターフェイス201から入力されるまで動作を停止して待機する(S703)。信号ackが入力された場合、コプロセッサにおける完了したものとして処理を終了する。
以上述べたプロセッサ101の動作は、コプロセッサに処理を依頼し、この処理の完了を待って次の処理を実行する動作と変わることがない。このため、本実施形態は、プロセッサ側の構成を変更することなく実現することができる。
Next, the
The operation of the
また、図8は、割込みコントローラ制御部205の動作を説明するためのフローチャートである。割込みコントローラ102は、割込み検出部203a、203bが新たに発生した割込みを検出する(S801)。そして、割込み要求が検出されない場合には(S801:No)、処理を終了する。
一方、新たな割込み要求が検出された場合(S801:Yes)、割込みコントローラ制御部205は、割込み待ちテーブル206a、206bを参照して検出された割込み要求が待ち割込み要求であるか否か判定する(S802、S803)。待ち割込みでない場合(S803:No)、割込みコントローラ制御部205は、割込み通知部207a、207bを介して割込み要求の発生をプロセッサ101に通知する。
FIG. 8 is a flowchart for explaining the operation of the interrupt
On the other hand, when a new interrupt request is detected (S801: Yes), the interrupt
また、ステップS803において、待ち割込み要求が発生したと判断された場合(S803:Yes)、コプロセッサインターフェイス201に対する信号arcをオンする(S805)。そして、割込み待ちテーブル207a、207bに設定された待ち割込みをクリアし(S806)、処理を終了する。
なお、以上述べた図8のフローチャートにおいて、ステップS802及びステップS803が要求判断ステップになる。また、ステップS804及びステップS805は信号出力制御ステップとなる。
If it is determined in step S803 that a wait interrupt request has occurred (S803: Yes), the signal arc for the
In the flowchart of FIG. 8 described above, step S802 and step S803 are request determination steps. Steps S804 and S805 are signal output control steps.
このような本実施形態によれば、プロセッサ101がコプロセッサに処理を依頼し、依頼した処理完了を待って動作するのと同様に処理をいったん停止して再開することができる。このため、処理の再開にあたって割込みハンドラ等のプログラムを起動することがなく、高速にプロセッサを起動することができる。
このような本実施形態を要求から完了までの時間が比較的短い短時間割込みに適用することにより、短時間割込みの処理のオーバーヘッドが低減して割込みの処理効率を高めることができる。また、本実施形態は、ポーリングのようにプロセッサが待ち割込みの発生を積極的に検出する必要がないので、プロセッサの処理効率が低下することがない。
According to this embodiment, the
By applying this embodiment to a short-time interrupt with a relatively short time from request to completion, the overhead of short-time interrupt processing can be reduced and the interrupt processing efficiency can be increased. Further, in the present embodiment, unlike the polling, the processor does not need to positively detect the occurrence of the waiting interrupt, so that the processing efficiency of the processor is not lowered.
なお、以上述べた実施形態では、本実施形態の割込み制御装置をシングルプロセッサに適用した例について説明した。しかし、本実施形態はこのような構成に限定されるものでなく、複数のプロセッサが並行して動作可能なマルチプロセッサに適用することも可能である。
マルチプロセッサに適用した場合、本実施形態は、一のプロセッサが待ち割込みを待っている間に発生した割込み要求を他のプロセッサが処理することができる。このため、プロセッサの処理効率をいっそう高めることができる。
In the embodiment described above, an example in which the interrupt control device of this embodiment is applied to a single processor has been described. However, the present embodiment is not limited to such a configuration, and can be applied to a multiprocessor in which a plurality of processors can operate in parallel.
When applied to a multiprocessor, the present embodiment allows another processor to process an interrupt request generated while one processor is waiting for a wait interrupt. For this reason, the processing efficiency of the processor can be further increased.
101 プロセッサ、102 割込みコントローラ、103a,103b 周辺モジュール、104 メモリ、105 バス、201 コプロセッサインターフェイス、202 コプロセッサ、203a、203b 割込み検出部、204 バスインターフェイス制御部、205 割込みコントローラ制御部、206a、206b 割込み待ちテーブル、207 割込み通知部、208 コプロセッサインターフェイス処理部 101 processor, 102 interrupt controller, 103a, 103b peripheral module, 104 memory, 105 bus, 201 coprocessor interface, 202 coprocessor, 203a, 203b interrupt detector, 204 bus interface controller, 205 interrupt controller controller, 206a, 206b Interrupt wait table, 207 interrupt notification unit, 208 coprocessor interface processing unit
Claims (5)
特定の割込み要求である待ち割込み要求を設定する待ち割込み要求設定手段と、
前記プロセッサに対してされた割込み要求が前記待ち割込み要求設定手段によって設定された待ち割込み要求であるか否か判断する待ち割込み要求判断手段と、
前記割込み要求判断手段によって待ち割込み要求であると判断された場合には前記補助プロセッサ用インターフェイスを介してプロセッサに前記信号を出力する一方、待ち割込み要求がされるまでは前記信号の出力を禁止する信号出力制御手段と、
を備えることを特徴とする割込み制御装置。 Interrupt control having an auxiliary processor interface for sending and receiving signals to and from an auxiliary processor specialized for a specific process, and controlling an interrupt to a processor that operates while waiting for an output of the signal from the auxiliary processor interface A device,
Wait interrupt request setting means for setting a wait interrupt request that is a specific interrupt request;
Wait interrupt request judging means for judging whether or not the interrupt request made to the processor is a wait interrupt request set by the wait interrupt request setting means;
When the interrupt request determination means determines that the request is a wait interrupt request, the signal is output to the processor via the auxiliary processor interface, while the output of the signal is prohibited until a wait interrupt request is issued. Signal output control means;
An interrupt control device comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006105335A JP2007280023A (en) | 2006-04-06 | 2006-04-06 | Interrupt controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006105335A JP2007280023A (en) | 2006-04-06 | 2006-04-06 | Interrupt controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007280023A true JP2007280023A (en) | 2007-10-25 |
Family
ID=38681414
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006105335A Pending JP2007280023A (en) | 2006-04-06 | 2006-04-06 | Interrupt controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007280023A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7853743B2 (en) | 2006-11-10 | 2010-12-14 | Seiko Epson Corporation | Processor and interrupt controlling method |
-
2006
- 2006-04-06 JP JP2006105335A patent/JP2007280023A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7853743B2 (en) | 2006-11-10 | 2010-12-14 | Seiko Epson Corporation | Processor and interrupt controlling method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4148223B2 (en) | Processor and information processing method | |
JPH02171934A (en) | Virtual machine system | |
JP5673672B2 (en) | Multi-core processor system, control program, and control method | |
WO2018040494A1 (en) | Method and device for extending processor instruction set | |
US7480812B2 (en) | Microprocessor | |
JP2006351013A (en) | Method and system for storing/restoring procedure in electronic equipment | |
JP4033215B2 (en) | Multiprocessor system and program for causing computer to execute control method of multiprocessor system | |
JP2007280023A (en) | Interrupt controller | |
JP3703439B2 (en) | Data transfer control device and method | |
JP4441592B2 (en) | Parallel processing apparatus and exclusive control method | |
JP2008084043A (en) | Interruption processing method | |
JP2908096B2 (en) | Coprocessor control method | |
JP5017784B2 (en) | Processor and interrupt processing control method applied to the processor | |
JPH1078856A (en) | Interruption by priority printing method and system therefor | |
JP2006040063A (en) | Image processing device and smi processing method thereof | |
KR100404283B1 (en) | Microprocessor, system including microprocessor and method of controlling bus cycle of microprocessor | |
JP2014203230A (en) | Computer system, interruption processing program of computer system and interruption processing method of computer system | |
JPH01243167A (en) | Data processor | |
JP2005275452A (en) | Data transfer control system | |
JP4389797B2 (en) | Processor and information processing method | |
US8069338B2 (en) | Data processing device and control method for preventing an exception caused by an instruction sent to a peripheral device by a branch source program from occurring during execution of a branch destination program or interrupt program | |
JP2007316986A (en) | System lsi | |
JP2636562B2 (en) | calculator | |
JP2006119982A (en) | Computer system | |
JP5621232B2 (en) | Out-of-order execution processor |