JP2009288978A - Multiple interrupt processor - Google Patents
Multiple interrupt processor Download PDFInfo
- Publication number
- JP2009288978A JP2009288978A JP2008140049A JP2008140049A JP2009288978A JP 2009288978 A JP2009288978 A JP 2009288978A JP 2008140049 A JP2008140049 A JP 2008140049A JP 2008140049 A JP2008140049 A JP 2008140049A JP 2009288978 A JP2009288978 A JP 2009288978A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- interrupt processing
- processing program
- cpu core
- factor
- 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
- Executing Machine-Instructions (AREA)
Abstract
Description
この発明は、複数の割り込み信号を多重してCPU(Central Processing Unit)コアに通知する多重割り込み処理装置に関する。 The present invention relates to a multiple interrupt processing device for multiplexing a plurality of interrupt signals and notifying a CPU (Central Processing Unit) core.
従来、割り込み処理中の多重割り込み要求を処理可能な割り込み信号生成装置が公知である。この割り込み信号生成装置は、割り込み要因を緊急度等に応じてグループ化し、グループ単位で所定の割り込み信号を出力する。また、割り込み信号生成装置は、割り込み処理中は割り込み信号の出力を制限するとともに、割り込み処理中に割り込み処理要求があったときにはそれを記憶しておき、現在の割り込み処理の終了後に記憶した割り込み処理を実行する(例えば、特許文献1参照。)。 Conventionally, an interrupt signal generation device capable of processing a multiple interrupt request during interrupt processing is known. This interrupt signal generation device groups interrupt factors according to the degree of urgency and outputs a predetermined interrupt signal in units of groups. In addition, the interrupt signal generator limits the output of interrupt signals during interrupt processing, stores the interrupt processing request during interrupt processing, and stores the interrupt processing stored after the end of the current interrupt processing. (For example, refer to Patent Document 1).
しかしながら、前記特許文献1に開示された割り込み信号生成装置では、割り込み処理中に同一グループの別要因の割り込みが発生した場合には、その割り込みを記憶しておき、実行中の割り込み処理が終了して通常処理に戻った後に、再度割り込みが発生する。そのため、割り込みの発生と同時に割り込み処理を実行するというリアルタイム性が損なわれるという問題点がある。
However, in the interrupt signal generation device disclosed in
この発明は、上述した従来技術による問題点を解消するため、リアルタイム性を損なわずにCPUコアに割り込み処理を実行させることができる多重割り込み処理装置を提供することを目的とする。 An object of the present invention is to provide a multiple interrupt processing apparatus capable of causing a CPU core to execute interrupt processing without impairing real-time performance in order to solve the above-described problems caused by the prior art.
上述した課題を解決し、目的を達成するため、この多重割り込み処理装置は、次のようなリターン検出部を備えることを要件とする。リターン検出部は、割り込み処理から通常処理に戻る際にメモリから読み出されるリターン命令を検出する。リターン検出部は、リターン命令を検出した場合、他の割り込み要因による割り込みが発生していれば、そのリターン命令を、その他の割り込み要因に対応する割り込み処理プログラムへ分岐する分岐命令に変換する。そして、リターン検出部は、その分岐命令をCPUコアへ出力する。 In order to solve the above-described problems and achieve the object, this multiple interrupt processing apparatus is required to include the following return detection unit. The return detection unit detects a return instruction read from the memory when returning from the interrupt process to the normal process. When a return instruction is detected, the return detection unit converts the return instruction into a branch instruction that branches to an interrupt processing program corresponding to another interrupt factor if an interrupt due to another interrupt factor has occurred. Then, the return detection unit outputs the branch instruction to the CPU core.
また、多重割り込み処理装置は、アドレス変換部をさらに備えていてもよい。アドレス変換部は、割り込み発生時に、CPUコアがアクセスするアドレス空間を、割り込み要因に対応する割り込み処理プログラムのアドレス空間に変換する。 The multiple interrupt processing device may further include an address conversion unit. The address conversion unit converts the address space accessed by the CPU core into the address space of the interrupt processing program corresponding to the interrupt factor when an interrupt occurs.
また、多重割り込み処理装置は、割り込み検出部をさらに備えていてもよい。割り込み検出部は、割り込み要因による割り込み発生時に出力される複数の割り込み信号に基づいて、割り込みが発生したことをリターン検出部へ通知する。また、割り込み検出部は、割り込みを発生させた割り込み要因をアドレス変換部へ通知する。 The multiple interrupt processing device may further include an interrupt detection unit. The interrupt detection unit notifies the return detection unit that an interrupt has occurred based on a plurality of interrupt signals output when an interrupt due to an interrupt factor occurs. The interrupt detection unit notifies the address conversion unit of the interrupt factor that caused the interrupt.
また、多重割り込み処理装置は、複数の割り込み要因のそれぞれに対応する割り込み処理プログラムを格納するメモリをさらに備えていてもよい。このメモリにおいて、各割り込み処理プログラムの格納領域のサイズが同じであるとよい。 The multiple interrupt processing device may further include a memory for storing an interrupt processing program corresponding to each of a plurality of interrupt factors. In this memory, the size of the storage area of each interrupt processing program may be the same.
また、多重割り込み処理装置において、アドレス変換部を次のようにしてもよい。例えば、アドレス変換部は、各割り込み処理プログラムの格納領域のうちのいずれか一つ、例えば前記メモリの先頭に格納されている割り込み処理プログラムの格納領域に対応するベースアドレスと、割り込み検出部から通知される割り込み要因と、割り込み処理プログラムの格納領域のサイズに基づいて、各割り込み処理プログラムの格納領域に対応するベースアドレスを割り出すようにしてもよい。 In the multiple interrupt processing apparatus, the address conversion unit may be configured as follows. For example, the address conversion unit notifies from one of the interrupt processing program storage areas, for example, the base address corresponding to the storage area of the interrupt processing program stored at the top of the memory, and the interrupt detection unit. The base address corresponding to each interrupt processing program storage area may be determined based on the interrupt factor to be generated and the size of the interrupt processing program storage area.
この多重割り込み処理装置によれば、実行中の割り込み処理プログラムのリターン命令が、その割り込み処理プログラムの実行中に発生した他の割り込み要因に対応する割り込み処理プログラムへ分岐する分岐命令に変換されるので、実行中の割り込み処理プログラムの終了時に、通常処理に戻らずに、連続して次の割り込み処理プログラムが実行される。 According to this multiple interrupt processing device, the return instruction of the interrupt processing program being executed is converted into a branch instruction that branches to an interrupt processing program corresponding to another interrupt factor that occurred during the execution of the interrupt processing program. At the end of the interrupt processing program being executed, the next interrupt processing program is continuously executed without returning to the normal processing.
この多重割り込み処理装置によれば、リアルタイム性を損なわずにCPUコアに割り込み処理を実行させることができるという効果を奏する。 According to this multiple interrupt processing device, there is an effect that the CPU core can execute interrupt processing without impairing real-time performance.
以下に添付図面を参照して、この多重割り込み処理装置の好適な実施の形態を詳細に説明する。 Exemplary embodiments of the multiple interrupt processing device will be described below in detail with reference to the accompanying drawings.
(概略)
図1は、実施の形態にかかる多重割り込み処理装置の構成を示すブロック図である。図1に示すように、多重割り込み処理装置1は、CPUコア6が割り込み処理プログラムを実行している途中で、他の割り込み要因が発生した場合、実行中の割り込み処理プログラムの終了時に出力されるリターン命令を分岐命令に変換してCPUコア6に出力する。CPUコア6は、その分岐命令を実行することによって、通常処理に戻ることなく、割り込み処理プログラムの実行中に発生した他の割り込み要因に対応する割り込み処理プログラムを実行する。一方、多重割り込み処理装置1は、リターン命令の出力時に他の割り込み要因からの割り込みが発生していない場合、CPUコア6にリターン命令を出力する。CPUコア6は、そのリターン命令を実行して通常処理に戻る。
(Outline)
FIG. 1 is a block diagram illustrating a configuration of a multiple interrupt processing apparatus according to an embodiment. As shown in FIG. 1, in the multiple
(全体の構成)
多重割り込み処理装置1は、割り込み処理部11および外部メモリ12を備えている。割り込み処理部11は、割り込み検出部21、アドレスレジスタ22、アドレス変換部23およびリターン検出部24を備えている。割り込み処理部11には、例えば周辺機器としてペリフェラルA2、ペリフェラルB3、ペリフェラルC4およびペリフェラルD5が接続される。このように、同じ名称の機能部や装置などの構成については、名称の末尾に大文字のアルファベット(A、B、Cなど)を付して区別する。また、多重割り込み処理装置1は、CPUコア6に接続される。
(Overall configuration)
The multiple
外部メモリ12は、ペリフェラルA2、ペリフェラルB3、ペリフェラルC4およびペリフェラルD5からの割り込み発生時にそれぞれ実行される割り込み処理プログラムA、割り込み処理プログラムB、割り込み処理プログラムCおよび割り込み処理プログラムDを格納している。各割り込み処理プログラムの格納領域31,32,33,34は、実際のプログラムサイズに関係なく、同じサイズに固定されている。なお、多重割り込み処理装置1に接続される周辺機器の数および割り込み処理プログラムの数は、4個に限らない。
The external memory 12 stores an interrupt processing program A, an interrupt processing program B, an interrupt processing program C, and an interrupt processing program D that are executed when an interrupt is generated from the peripheral A2, the peripheral B3, the peripheral C4, and the peripheral D5, respectively. The
割り込み検出部21は、ペリフェラルA2、ペリフェラルB3、ペリフェラルC4およびペリフェラルD5からそれぞれP1、P2、P3およびP4の割り込み信号を受信し、各ペリフェラルからの割り込みの発生を検出する。割り込み検出部21は、いずれかのペリフェラルからの割り込み発生を検出すると、割り込み発生信号(図1では、発生信号)を出力してCPUコア6およびリターン検出部24に多重割り込みの発生を通知する。また、割り込み検出部21は、割り込み発生を検出すると、アドレス変換部23に、割り込みの発生元であるペリフェラルに対応する割り込み要因番号(図1では、要因番号)を通知する。割り込み検出部21の構成については、後述する。
The
アドレスレジスタ22は、外部メモリ12に格納されている全割り込み処理プログラムのうち、基準となる割り込み処理プログラムの先頭アドレスの値を格納している。例えば、図1に示す例では、割り込み処理プログラムAの格納領域31の先頭アドレスの値がアドレスレジスタ22に格納されている。
The address register 22 stores the value of the start address of the interrupt processing program serving as a reference among all the interrupt processing programs stored in the external memory 12. For example, in the example shown in FIG. 1, the value of the start address of the storage area 31 of the interrupt processing program A is stored in the
アドレス変換部23は、割り込み検出部21から通知される割り込み要因番号とアドレスレジスタ22の先頭アドレスの値に基づいて、外部メモリ12の、発生した割り込みに対応する割り込み処理プログラムが格納されたアドレス空間がCPUコア6から見えるように、スイッチングを行なう。例えば、割り込みの発生元がペリフェラルA2である場合、アドレス変換部23は、所定のアドレス空間の領域(仮想領域)25のアドレス空間を割り込み処理プログラムAの格納領域31のアドレス空間に変換する。割り込みの発生元がペリフェラルB3、ペリフェラルC4またはペリフェラルD5である場合も同様である。
Based on the interrupt factor number notified from the
従って、いずれのペリフェラルから割り込みが発生しても、CPUコア6は、仮想領域25にアクセスすることによって、対応する割り込み処理プログラムの格納領域にアクセすることができる。上述したように、各割り込み処理プログラムの格納領域31,32,33,34が同じサイズであるので、アドレス変換部23は、その固定サイズとアドレスレジスタ22の先頭アドレスの値と割り込み要因番号から、該当する割り込み処理プログラムの格納領域のアドレス空間を特定することができる。詳細には、先頭アドレスの値と割り込み要因番号から生成されるベースアドレスと、CPUコア6から通知されるオフセットアドレスに基づいて、割り込み処理プログラムの格納領域のアドレス空間が特定される。アドレス変換部23の構成については、後述する。
Therefore, even if an interrupt occurs from any peripheral, the
リターン検出部24は、外部メモリ12から読み出された命令コードのデータを受け取り、そのデータがリターン命令のコードであるか否かを検出する。リターン検出部24は、リターン命令のコードを受け取ると、別の割り込み要因によって割り込み検出部21から割り込み発生信号が出力されているか否かを調べる。割り込み発生信号が出力されていない場合、すなわち別の割り込み要因による割り込みが発生していない場合、リターン検出部24は、CPUコア6にリターン命令のコードをそのまま出力する。
The
一方、別の割り込み要因による割り込みが発生している場合、リターン検出部24は、リターン命令のコードを前記仮想領域25の先頭に分岐する分岐命令のコードに変更して、CPUコア6に出力する。また、別の割り込み要因による割り込みが発生している場合、リターン検出部24は、アドレス変換部23にリターン命令検出信号(図1では、リターン検出信号)を出力する。このリターン命令検出信号は、アドレス変換部23がアドレス変換を行うか否かを制御する信号である。リターン検出部24の構成については、後述する。
On the other hand, when an interrupt due to another interrupt factor has occurred, the
CPUコア6は、リターン検出部24から前記分岐命令のコードを受け取ると、その分岐命令を実行する。それによって、CPUコア6は、通常処理に戻ることなく、仮想領域25に見える次の割り込み処理プログラムを実行する。一方、CPUコア6は、リターン検出部24からリターン命令のコードを受け取ると、そのリターン命令を実行して通常処理に戻る。
When the
(割り込み検出部の構成)
図2は、割り込み検出部の構成を示すブロック図である。図2に示すように、割り込み検出部21は、オア(OR)回路41およびデコーダ42を備えている。オア回路41は、ペリフェラルA2からの割り込み信号P1、ペリフェラルB3からの割り込み信号P2、ペリフェラルC4からの割り込み信号P3およびペリフェラルD5からの割り込み信号P4を入力とし、これらの論理和を割り込み発生信号として出力する。デコーダ42は、ペリフェラルA2からの割り込み信号P1、ペリフェラルB3からの割り込み信号P2、ペリフェラルC4からの割り込み信号P3およびペリフェラルD5からの割り込み信号P4を入力とし、これらをデコードして割り込み要因番号を出力する。割り込み要因番号は、例えば図2に[1:0]で示すように、2ビットのデータである。
(Configuration of interrupt detection unit)
FIG. 2 is a block diagram illustrating a configuration of the interrupt detection unit. As shown in FIG. 2, the interrupt
(アドレス変換部の構成)
図3は、アドレス変換部の構成を示すブロック図である。図3に示すように、アドレス変換部23は、ベースアドレス生成部51および生成部52を備えている。ベースアドレス生成部51は、マルチプレクサA(MUX_A)53およびルックアップテーブル(LUT)54を備えている。生成部52は、マルチプレクサB(MUX_B)55を備えている。
(Configuration of address converter)
FIG. 3 is a block diagram illustrating a configuration of the address conversion unit. As shown in FIG. 3, the
マルチプレクサA53は、前記デコーダ42から与えられる割り込み要因番号と、アドレスレジスタ22の先頭アドレスの値に基づいて、割り込み要因番号に対応するデータを出力する。アドレスレジスタ22の先頭アドレスの値は、例えば図3に[5:0]で示すように、6ビットのデータである。割り込み要因番号に対応するデータは、例えば図3に[7:0]で示すように、8ビットのデータである。
The multiplexer A53 outputs data corresponding to the interrupt factor number based on the interrupt factor number given from the
ルックアップテーブル54は、マルチプレクサA53の出力データに基づいて、割り込み要因番号に対応する割り込み処理プログラムのベースアドレスを生成する。ベースアドレスは、例えば図3に[7:0]で示すように、8ビットのデータである。また、ルックアップテーブル54のイネーブル端子ENには、前記リターン命令検出信号が入力する。ルックアップテーブル54は、リターン命令検出信号が入力されると、そのときの入力データに基づいてベースアドレスを生成する。ルックアップテーブル54は、リターン命令検出信号が入力されないときには、入力データが変化してもベースアドレスを変更しない。ここで、リターン命令検出信号が入力または出力されるとは、リターン命令検出信号がアサートであることを意味し、リターン命令検出信号が入力または出力されないとは、リターン命令検出信号がネゲートであることを意味する。 The lookup table 54 generates the base address of the interrupt processing program corresponding to the interrupt factor number based on the output data of the multiplexer A53. The base address is 8-bit data, for example, as indicated by [7: 0] in FIG. The return command detection signal is input to the enable terminal EN of the lookup table 54. When a return command detection signal is input, the lookup table 54 generates a base address based on the input data at that time. The look-up table 54 does not change the base address even when input data changes when the return instruction detection signal is not input. Here, the return instruction detection signal is input or output means that the return instruction detection signal is asserted, and the return instruction detection signal is not input or output means that the return instruction detection signal is negated. Means.
マルチプレクサB55は、ルックアップテーブル54から与えられるベースアドレスと、CPUコア6から与えられるオフセットアドレスを加算して、割り込み要因番号に対応する割り込み処理プログラムが格納されたメモリ領域のアドレスを生成する。生成されたアドレスは、外部メモリ12に接続されたメモリアドレスバスに出力される。オフセットアドレスは、例えば図3に[7:0]で示すように、8ビットのデータである。マルチプレクサB55から出力されるアドレスは、例えば図3に[15:0]で示すように、16ビットのデータである。
The multiplexer B55 adds the base address given from the lookup table 54 and the offset address given from the
(リターン検出部の構成)
図4は、リターン検出部の構成を示すブロック図である。図4に示すように、リターン検出部24は、命令変換部61および比較部62を備えている。命令変換部61は、セレクタ(SEL)63およびアンド(AND)回路64を備えている。比較部62は、比較器65を備えている。
(Configuration of return detection unit)
FIG. 4 is a block diagram illustrating a configuration of the return detection unit. As shown in FIG. 4, the
比較器65は、外部メモリ12からの読み出しデータを、リターン命令のコード(図4では、リターンコード)と比較する。リターン命令のコードは、固定値である。比較器65は、その比較の結果、両者が一致すると、リターン命令検出信号を出力する。アンド回路64は、リターン命令検出信号および前記オア回路41から与えられる割り込み発生信号を入力とし、これらの論理積を選択信号として出力する。
The
選択信号は、例えば、外部メモリ12からリターン命令のコードが読み出され、かつ他の割り込み要因による割り込みが発生している場合に"1"であり、それ以外の場合には"0"である。セレクタ63は、選択信号が"1"であるときに、分岐命令のコード(図4では、分岐コード)を出力データとする。一方、セレクタ63は、選択信号が"0"であるときに、外部メモリ12からの読み出しデータをそのまま出力データとする。セレクタ63の出力データは、CPUコア6へ供給される。
For example, the selection signal is “1” when the code of the return instruction is read from the external memory 12 and an interrupt due to another interrupt factor is generated, and is “0” otherwise. . When the selection signal is “1”, the
(動作の説明−フローチャート)
図5は、実施の形態にかかる多重割り込み処理装置の動作を説明するフローチャートである。図5に示すように、いずれかのペリフェラルから割り込みが発生すると、割り込み検出部21は、そのペリフェラルから割り込み信号を受信する(ステップS1)。そして、割り込み検出部21は、CPUコア6へ割り込み発生信号を出力し、アドレス変換部23へ対応する割り込み要因番号を出力する(ステップS2)。
(Description of operation-flowchart)
FIG. 5 is a flowchart for explaining the operation of the multiple interrupt processing device according to the embodiment. As shown in FIG. 5, when an interrupt occurs from any peripheral, the interrupt
次いで、アドレス変換部23は、その割り込み要因番号とアドレスレジスタ22の先頭アドレスの値に基づいて、外部メモリ12の、対応する割り込み処理プログラムの格納領域のベースアドレスを設定する(ステップS3)。そして、アドレス変換部23は、そのベースアドレスとCPUコア6から与えられるオフセットアドレスに基づいて、外部メモリ12の、対応する割り込み処理プログラムの格納領域のアドレスを生成する。
Next, the
CPUコア6は、前記仮想領域25のアドレス空間にアクセスするが、実際には、外部メモリ12の、アドレス変換部23により生成されたアドレスにより特定されるアドレス空間の割り込み処理プログラムを読み出すことになる(ステップS4)。外部メモリ12から読み出された命令のコードは、リターン検出部24において、リターン命令のコードであるか否か判断される(ステップS5)。リターン命令のコードでない場合(ステップS5:No)、リターン検出部24は、CPUコア6へ、外部メモリ12から読み出された命令のコードを出力する(ステップS6)。CPUコア6は、ステップS6で出力された命令のコードを実行し(ステップS7)、ステップS4に戻る。
The
ステップS4に戻ると、再び、ステップS3で設定されたベースアドレスと、CPUコア6から新たに与えられるオフセットアドレスに基づいて、CPUコア6は、外部メモリ12から次の命令のコードを読み出す。そして、ステップS5で、読み出された命令のコードがリターン命令のコードであるか否か判断される。ステップS5でリターン命令のコードが読み出されるまで、上述したステップS4〜ステップS7の処理が繰り返される。この間、リターン検出部24からリターン命令検出信号が出力されない(リターン命令検出信号がネゲートである)ので、ステップS3で設定されたベースアドレスは変化しない。
When returning to step S4, the
ステップS5でリターン命令のコードが読み出されると(ステップS5:Yes)、リターン検出部24により、ここまでの割り込み処理中に他の割り込み要因による割り込みが発生しているか否かが判断される(ステップS8)。また、リターン検出部24からアドレス変換部23へリターン命令検出信号が出力される(リターン命令検出信号がアサートになる)。他の割り込み要因による割り込みが発生している場合(ステップS8:Yes)、アドレス変換部23には、その割り込み要因に対応する割り込み要因番号が通知されている。
When the code of the return instruction is read in step S5 (step S5: Yes), the
従って、アドレス変換部23は、その割り込み要因番号とアドレスレジスタ22の先頭アドレスの値に基づいて、ステップS3で設定されたベースアドレスを、外部メモリ12の、対応する割り込み処理プログラムの格納領域のベースアドレスに変更する(ステップS9)。そして、リターン検出部24は、リターン命令のコードを前記仮想領域25の先頭に分岐する分岐命令のコードに変更し、CPUコア6へその分岐命令のコードを出力する(ステップS10)。CPUコア6は、その分岐命令のコードを実行し(ステップS11)、ステップS4に戻る。
Therefore, the
ステップS4に戻ると、他の割り込み要因による割り込みが発生していない状態でリターン命令のコードが読み出されるまで、上述したステップS4〜ステップS11の処理が繰り返される。この間、ステップS9で変更されたベースアドレスは、再びステップS9において、対応する割り込み処理プログラムの格納領域のベースアドレスに変更される。リターン命令のコードが読み出され、かつ他の割り込み要因による割り込みが発生していない状態になると(ステップS8:No)、リターン検出部24は、ステップS4で読み出されたリターン命令のコードをCPUコア6へ出力する(ステップS12)。CPUコア6は、そのリターン命令のコードを実行し、一連の多重割り込み処理を終了する(ステップS13)。
When returning to step S4, the above-described processing of step S4 to step S11 is repeated until the code of the return instruction is read in a state where an interrupt due to another interrupt factor has not occurred. During this time, the base address changed in step S9 is changed again to the base address of the storage area of the corresponding interrupt processing program in step S9. When the return instruction code is read and no interrupt is generated due to another interrupt factor (step S8: No), the
(動作の説明−タイミングチャート)
図6は、実施の形態にかかる多重割り込み処理装置の動作を説明するタイミングチャートである。ここでは、CPUコア6が通常処理を実行している途中でペリフェラルB3から割り込みが発生し、CPUコア6がその割り込み処理を実行している途中でさらにペリフェラルA2から割り込みが発生した場合を例にして説明する。図6において、上段のチャートは、実施の形態にかかる多重割り込み処理装置1の動作タイミングを示しており、下段のチャートは、同じ時間軸で比較した場合の一般的な多重割り込み処理による動作タイミングを示している。なお、時間軸において、T1<T2<T3<T4<T5<T6<T7<T8<T9<T10とする。
(Explanation of operation-timing chart)
FIG. 6 is a timing chart for explaining the operation of the multiple interrupt processing device according to the embodiment. In this example, an interrupt is generated from the peripheral B3 while the
実施の形態にかかる多重割り込み処理装置1の動作タイミング(上段のタイミングチャート)について説明する。通常処理中に、時刻T1でペリフェラルB3から割り込みが発生し、割り込み信号P2が出力されると、CPUコア6は、ペリフェラルB3からの割り込みに対応する割り込み処理プログラムBを実行する。割り込み処理プログラムBの実行中に、時刻T3でペリフェラルA2から割り込みが発生し、割り込み信号P1が出力されると、CPUコア6は、時刻T4で割り込み処理プログラムBを終了した後、通常処理に戻らずに、連続してペリフェラルA2からの割り込みに対応する割り込み処理プログラムAを実行する。そして、CPUコア6は、時刻T6で割り込み処理プログラムAを終了した時点で、通常処理の実行に戻る。
The operation timing (upper timing chart) of the multiple interrupt
それに対して、一般的な多重割り込み処理による動作タイミング(下段のタイミングチャート)は、次の通りである。通常処理中に、時刻T1でペリフェラルB3から割り込みが発生し、割り込み信号P2が出力されると、CPUコアは、割り込み要因を特定する割り込み要因照合処理を行う。割り込み要因照合処理では、ペリフェラルA2からの割り込み信号P1、ペリフェラルB3からの割り込み信号P2、ペリフェラルC4からの割り込み信号P3およびペリフェラルD5からの割り込み信号P4の順に、割り込み発生の有無が調べられる。この割り込み要因照合処理のプログラムは、割り込み処理プログラムとともに外部メモリに格納されている。 On the other hand, the operation timing (lower timing chart) by general multiple interrupt processing is as follows. When an interrupt is generated from the peripheral B3 at time T1 during the normal processing and the interrupt signal P2 is output, the CPU core performs an interrupt factor collating process for specifying the interrupt factor. In the interrupt factor checking process, the presence or absence of an interrupt is checked in the order of the interrupt signal P1 from the peripheral A2, the interrupt signal P2 from the peripheral B3, the interrupt signal P3 from the peripheral C4, and the interrupt signal P4 from the peripheral D5. The interrupt factor verification processing program is stored in the external memory together with the interrupt processing program.
この例では、ペリフェラルA2からの割り込み信号P1に次いで、ペリフェラルB3からの割り込み信号P2を調べた時点(時刻T2)で割り込み要因がペリフェラルB3に特定される。割り込み要因が特定されると、CPUコアは、その割り込み要因に対応する割り込み処理プログラムBを実行する。割り込み処理プログラムBの実行中に、時刻T3でペリフェラルA2から割り込みが発生し、割り込み信号P1が出力されると、CPUコアは、時刻T5で割り込み処理プログラムBを終了した後、割り込み要因照合処理の実行に戻る。図6では、割り込み処理プログラムBの処理時間(T5−T2)は、実施の形態にかかる多重割り込み処理装置1による割り込み処理プログラムBの処理時間(T4−T1)と同じにしてある。
In this example, the interrupt factor is specified as the peripheral B3 when the interrupt signal P2 from the peripheral B3 is examined (time T2) after the interrupt signal P1 from the peripheral A2. When the interrupt factor is specified, the CPU core executes the interrupt processing program B corresponding to the interrupt factor. When an interrupt is generated from the peripheral A2 at time T3 and the interrupt signal P1 is output during execution of the interrupt processing program B, the CPU core terminates the interrupt processing program B at time T5, and then performs interrupt factor verification processing. Return to execution. In FIG. 6, the processing time (T5-T2) of the interrupt processing program B is the same as the processing time (T4-T1) of the interrupt processing program B by the multiple interrupt
割り込み要因照合処理に戻ると、ペリフェラルC4からの割り込み信号P3とペリフェラルD5からの割り込み信号P4について、この順で割り込み発生の有無が調べられる。時刻T6で割り込み要因照合処理が終了すると、CPUコアは、一旦、通常処理の実行に戻った後、時刻T7で、再び割り込み要因照合処理を開始する。この例では、ペリフェラルA2からの割り込み信号P1を調べた時点(時刻T8)で割り込み要因がペリフェラルA2に特定される。 Returning to the interrupt factor checking process, the interrupt signal P3 from the peripheral C4 and the interrupt signal P4 from the peripheral D5 are checked for occurrence of interrupts in this order. When the interrupt factor verification process ends at time T6, the CPU core once returns to the execution of the normal process, and then starts the interrupt factor verification process again at time T7. In this example, the interrupt factor is specified as the peripheral A2 when the interrupt signal P1 from the peripheral A2 is examined (time T8).
従って、CPUコアは、それに対応する割り込み処理プログラムAを実行する。そして、CPUコアは、時刻T9で割り込み処理プログラムAを終了した後、割り込み要因照合処理の実行に戻る。図6では、割り込み処理プログラムAの処理時間(T9−T8)は、実施の形態にかかる多重割り込み処理装置1による割り込み処理プログラムAの処理時間(T6−T4)と同じにしてある。割り込み要因照合処理に戻ると、ペリフェラルB3からの割り込み信号P2、ペリフェラルC4からの割り込み信号P3およびペリフェラルD5からの割り込み信号P4の順で割り込み発生の有無が調べられる。時刻T10で割り込み要因照合処理が終了すると、CPUコアは、通常処理の実行に戻る。
Accordingly, the CPU core executes the interrupt processing program A corresponding thereto. Then, the CPU core ends the interrupt processing program A at time T9, and then returns to the execution of the interrupt factor checking process. In FIG. 6, the processing time (T9-T8) of the interrupt processing program A is the same as the processing time (T6-T4) of the interrupt processing program A by the multiple interrupt
図6に示す例の場合、実施の形態にかかる多重割り込み処理装置1は、一般的な多重割り込み処理装置と比較して、2回分の割り込み要因照合処理の実行に要する時間と、前の割り込み処理と後の割り込み処理の間で一旦、通常処理に戻るのに要する時間を短縮することができる。この例において、割り込み処理プログラムAを実行している途中でさらに他の割り込み要因による割り込みが発生する場合には、より一層、通常処理に戻るまでの時間を短縮することができる。
In the case of the example shown in FIG. 6, the multiple interrupt
以上説明したように、本実施の形態によれば、実行中の割り込み処理プログラムのリターン命令を、その割り込み処理プログラムの実行中に発生した他の割り込み要因に対応する割り込み処理プログラムへ分岐する分岐命令に変換してCPUコア6へ出力することによって、実行中の割り込み処理プログラムの終了時に、通常処理に戻らずに、連続して次の割り込み処理プログラムをCPUコア6に実行させることができる。従って、リアルタイム性を損なわずにCPUコア6に割り込み処理を実行させることができる。
As described above, according to this embodiment, the branch instruction that branches the return instruction of the interrupt processing program being executed to the interrupt processing program corresponding to another interrupt factor that occurred during the execution of the interrupt processing program. By converting the data into the
以上において本発明は、上述した実施の形態に限らず、種々変更可能である。例えば、アドレスレジスタ22は、割り込み処理プログラムAの格納領域31の先頭アドレスの値ではなく、割り込み処理プログラムBの格納領域32、割り込み処理プログラムCの格納領域33および割り込み処理プログラムDの格納領域34のうちのいずれかの先頭アドレスの値を格納していてもよい。アドレスレジスタ22がいずれの値を格納していても、各格納領域31,32,33,34のサイズが同じであるので、割り込み要因番号がわかれば、他の割り込み処理プログラムの格納領域のベースアドレスを割り出すことができる。また、上述した説明および添付図面中に記したビット幅は一例であり、本発明は、これに限定されるものではない。
As described above, the present invention is not limited to the above-described embodiment, and various modifications can be made. For example, the
P1、P2、P3、P4 割り込み信号
1 多重割り込み処理装置
6 CPUコア
12 メモリ
21 割り込み検出部
23 アドレス変換部
24 リターン検出部
P1, P2, P3, P4 Interrupt
Claims (5)
割り込み処理から通常処理に戻るリターン命令を検出し、前記リターン命令の検出時に他の割り込み要因による割り込みがある場合に前記リターン命令を前記他の割り込み要因に対応する割り込み処理プログラムへ分岐する分岐命令に変換し、前記分岐命令を前記CPUコアへ出力するリターン検出部、を備えることを特徴とする多重割り込み処理装置。 In a multiple interrupt processing device that multiplexes a plurality of interrupt signals and notifies the CPU core,
A return instruction that returns from interrupt processing to normal processing is detected, and when there is an interrupt due to another interrupt factor when the return instruction is detected, the return instruction is changed to a branch instruction that branches to the interrupt processing program corresponding to the other interrupt factor. A multiple interrupt processing apparatus comprising: a return detection unit that converts and outputs the branch instruction to the CPU core.
前記メモリにおける、前記各割り込み処理プログラムの格納領域のサイズが同じであることを特徴とする請求項3に記載の多重割り込み処理装置。 A memory for storing an interrupt processing program corresponding to each of a plurality of interrupt factors;
4. The multiple interrupt processing device according to claim 3, wherein the size of the storage area of each interrupt processing program in the memory is the same.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008140049A JP2009288978A (en) | 2008-05-28 | 2008-05-28 | Multiple interrupt processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008140049A JP2009288978A (en) | 2008-05-28 | 2008-05-28 | Multiple interrupt processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009288978A true JP2009288978A (en) | 2009-12-10 |
Family
ID=41458146
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008140049A Pending JP2009288978A (en) | 2008-05-28 | 2008-05-28 | Multiple interrupt processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009288978A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8738830B2 (en) | 2011-03-03 | 2014-05-27 | Hewlett-Packard Development Company, L.P. | Hardware interrupt processing circuit |
US9189283B2 (en) | 2011-03-03 | 2015-11-17 | Hewlett-Packard Development Company, L.P. | Task launching on hardware resource for client |
US9645823B2 (en) | 2011-03-03 | 2017-05-09 | Hewlett-Packard Development Company, L.P. | Hardware controller to choose selected hardware entity and to execute instructions in relation to selected hardware entity |
-
2008
- 2008-05-28 JP JP2008140049A patent/JP2009288978A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8738830B2 (en) | 2011-03-03 | 2014-05-27 | Hewlett-Packard Development Company, L.P. | Hardware interrupt processing circuit |
US9189283B2 (en) | 2011-03-03 | 2015-11-17 | Hewlett-Packard Development Company, L.P. | Task launching on hardware resource for client |
US9645823B2 (en) | 2011-03-03 | 2017-05-09 | Hewlett-Packard Development Company, L.P. | Hardware controller to choose selected hardware entity and to execute instructions in relation to selected hardware entity |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9043806B2 (en) | Information processing device and task switching method | |
US20130159661A1 (en) | Hardware monitor | |
JP2010026716A (en) | Cache memory control circuit and processor | |
JP2009288978A (en) | Multiple interrupt processor | |
EP3825860A1 (en) | Memory access control | |
US8601488B2 (en) | Controlling the task switch timing of a multitask system | |
US20210089482A1 (en) | Processor and interrupt controller therein | |
US20100287426A1 (en) | Memory checking system and method | |
JP2008046771A (en) | Direct memory access controller | |
JPWO2009098737A1 (en) | External device access apparatus, control method thereof, and system LSI | |
JP2010140239A (en) | Apparatus and method for shortening interrupt latency | |
JP2005258509A (en) | Storage device | |
JP2009258984A (en) | Information processor and load control method | |
JP2004038705A (en) | Memory controller and memory accessing method | |
JP2008140124A (en) | Data processor | |
JP4024713B2 (en) | Data processing system and control device | |
JP2007026091A (en) | Interrupt control circuit and its control method | |
US8255672B2 (en) | Single instruction decode circuit for decoding instruction from memory and instructions from an instruction generation circuit | |
US8484437B2 (en) | Data processing apparatus using pre-fetched data | |
JP3588951B2 (en) | Microcomputer program change device | |
JPWO2010029682A1 (en) | Information processing device | |
JP3888236B2 (en) | Program counter circuit | |
JP5559932B2 (en) | Semiconductor device | |
JP2010092342A (en) | Interface circuit | |
US9740660B2 (en) | CPU control method, electronic system control method and electronic system for improved CPU utilization in executing functions |