JP2007041980A - Information processor - Google Patents
Information processor Download PDFInfo
- Publication number
- JP2007041980A JP2007041980A JP2005227422A JP2005227422A JP2007041980A JP 2007041980 A JP2007041980 A JP 2007041980A JP 2005227422 A JP2005227422 A JP 2005227422A JP 2005227422 A JP2005227422 A JP 2005227422A JP 2007041980 A JP2007041980 A JP 2007041980A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- cpu
- instruction
- interrupt request
- value
- 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
Abstract
Description
本発明は、割込み要因数の増加に対応するための割込み拡張手段を持つ情報処理装置に関する。 The present invention relates to an information processing apparatus having interrupt expansion means for coping with an increase in the number of interrupt factors.
近年、情報処理装置の製造技術の進歩に伴い、情報処理装置に搭載可能な周辺装置が増加し、また、多くの制御を1つの情報処理装置に実行させたいという要求から、情報処理装置に多くの周辺装置を搭載することが求められている。しかしながら、情報処理装置に多くの周辺装置を搭載すると、処理の対象となる割込み要因の数が増大し、既存のCPU(central processing unit)を用いる場合には、CPU内部の割込み処理部の割込み要求入力数が不足してしまうという問題が発生する。 In recent years, with the progress of manufacturing technology of information processing devices, the number of peripheral devices that can be mounted on the information processing devices has increased, and more and more information processing devices have been requested due to the demand for a single information processing device to perform many controls. It is required to install peripheral devices. However, if a large number of peripheral devices are installed in the information processing device, the number of interrupt factors to be processed increases. When an existing CPU (central processing unit) is used, an interrupt request from an interrupt processing unit in the CPU is used. There is a problem that the number of inputs is insufficient.
ここで、割込み要因数の増加に合わせてCPU内部の割込み処理部の設計変更を行えば、割込み入力数不足に対応することができる。しかし、これを実現するためには、全ての割込み要因に対して同等の機能(割込みレベル、マスク機能、優先順位など)を用意する必要があるため、受け付ける割込み要因数を増加させるほど、CPU内部の割込み処理部の回路規模が増大してしまうという問題点がある。 Here, if the design of the interrupt processing unit in the CPU is changed in accordance with the increase in the number of interrupt factors, it is possible to cope with an insufficient number of interrupt inputs. However, in order to realize this, it is necessary to prepare equivalent functions (interrupt level, mask function, priority order, etc.) for all interrupt factors. There is a problem that the circuit scale of the interrupt processing unit increases.
また、割込み要因数の増加に合わせてCPU内部の割込み処理部をその都度設計するとなると、それなりの工数も必要となるし、また、割込み要因の最大数を見越して割込み処理部を設計してそれを使いまわしすると、割込み要因数が少ない場合に、使用しない割込み処理機構が無駄に回路規模を増加させてしまうことになるという問題点もある。 In addition, if the interrupt processing unit in the CPU is designed each time as the number of interrupt factors increases, a certain amount of man-hours is required, and the interrupt processing unit is designed in anticipation of the maximum number of interrupt factors. However, if the number of interrupt factors is small, an interrupt processing mechanism that is not used will unnecessarily increase the circuit scale.
そこで、従来、たとえば、図7に示すような情報処理装置が提案されている。図7中、IR01、IR0n、IR1、IRmは周辺装置からの割込み要求信号であり、割込み要求信号IR02〜IR0(n-1)、IR2〜IRm-1は、図示を省略している。1はOR回路であり、割込み要求信号IR01〜IR0nを論理和処理して割込み要求信号IR0を出力するものである。
Thus, conventionally, for example, an information processing apparatus as shown in FIG. 7 has been proposed. In FIG. 7, IR 01 , IR 0n , IR 1 and IR m are interrupt request signals from peripheral devices, and interrupt request signals IR 02 to IR 0 (n-1) and IR 2 to IR m-1 are illustrated. Is omitted.
2は命令の実行を行うCPU、30、31、3mはCPU2の割込み要求信号入力端子であり、割込み要求信号入力端子32〜3m-1は、図示を省略している。4はCPU2内部の割込み処理部、5は割込みベクタや割込み処理プログラム等を格納したメモリ、6はアドレスバス、7はデータバスである。
この情報処理装置は、関連する複数の割込み要求信号IR01〜IR0nについては、OR回路1で論理和を取って1個の割込み要求信号IR0を生成し、この割込み要求信号IR0を割込み要求信号入力端子30に与えるようにし、複数の割込み要求信号IR01〜IR0mに1個の割込み要求信号入力端子30を共用させることにより、割込み処理部4の割込み要求入力数不足に対処するようにしたものである。
The information processing apparatus for a plurality of related interrupt request signal IR 01 ~IR 0n, and the logical sum to produce one interrupt request signal IR 0 in
図8はこの情報処理装置において割込み要求信号入力端子30を共用する周辺装置からの割込み要求が受け付けられた場合の割込み処理動作を示す流れ図である。即ち、この情報処理装置においては、割込み要求信号入力端子30を共用する周辺装置からの割込み要求があり、これが受け付けられると(ステップS1)、CPU2は、実行中の命令の切れ目でハードウエア割込み処理を開始する(ステップS2)。
Figure 8 is a flow chart showing the interrupt processing operation when the interrupt request from the peripheral device sharing the interrupt request
即ち、CPU2は、メモリ5のベクタテーブルからの割込みベクタのリードや、現在のCPU2の状態を示すプロセッサステータス(PS)の値や割込み処理終了後に実行再開すべきアドレスを示すプログラムカウンタ(PC)の値のスタックへの退避などの処理を行い、リードした割込みベクタが示すアドレスへの分岐を行う(ステップS2)。
That is, the
そして、CPU2は、分岐先に格納されているプログラムを使用して、割込み要求信号IR01の出力元の周辺装置が割込み要求をしたか否かを示すフラグをリードし(ステップS3)、割込み要求信号IR01の出力元の周辺装置が実際の割込み要求元であるか否かを判断し(ステップS4)、割込み要求信号IR01の出力元の周辺装置が実際の割込み要求元である場合には、割込み要求信号IR01の出力元の周辺装置からの割込み要求に対応する割込み処理プログラムを実行し(ステップS5)、その後、メインプログラムに復帰する(ステップS10)。
Then, the
これに対して、割込み要求信号IR01の出力元の周辺装置が実際の割込み要求元ではない場合には、CPU2は、割込み要求信号IR02の出力元の周辺装置が割込み要求をしたか否かを示すフラグをリード(ステップS6)、割込み要求信号IR02の出力元の周辺装置が実際の割込み要求元であるか否かを判断し(ステップS7)、割込み要求信号IR02の出力元の周辺装置が実際の割込み要求元である場合には、割込み要求信号IR02の出力元の周辺装置からの割込み要求に対応する割込み処理プログラムを実行し(ステップS8)、その後、メインプログラムに復帰する(ステップS10)。
On the other hand, when the peripheral device from which the interrupt request signal IR 01 is output is not the actual interrupt request source, the
これに対して、割込み要求信号IR02の出力元の周辺装置が実際の割込み要求元ではない場合には、以下、同様にして、割込み要求信号IR03〜IR0nの出力元の周辺装置を順に対象として実際の割込み要求元を検出し、対応する割込み処理プログラムを実行し(ステップS9)、その後、メインプログラムに復帰する(ステップS10)。
図7に示す従来の情報処理装置においては、割込み要求信号入力端子30を共用する周辺装置から割込み要求があり、これが受け付けられると、ソフトウエアを使用し、割込み要求信号入力端子30を共用する周辺装置を対象として実際の割込み要求元の検出が行われるが、割込み要求元の検出は、予め設定されている順番(例えば、割込み優先順位の順番)に行われる。
In the conventional information processing apparatus shown in FIG. 7, there is an interrupt request from a peripheral device sharing the interrupt request
このため、割込み要求をしたか否かを示すフラグが後順位でリードされる周辺装置が実際の割込み要求元であった場合には、当然に割込み処理を開始する時間が遅れることになり、割込み要求信号入力端子30を共用する周辺装置からの割込みが発生してから必要な処理が開始するまでの時間が、割込み要求信号入力端子30を共用しない場合に比べて増大するという問題点があった。
For this reason, if the peripheral device to which the flag indicating whether or not an interrupt request has been issued is read in the subsequent order is the actual interrupt request source, the time to start interrupt processing will naturally be delayed, time to interrupts from peripheral devices sharing a request
本発明は、かかる点に鑑み、割込み要求入力数が少ないCPUを用いても、割込み要因数の増加に対処することができ、しかも、割込み処理の高速化を維持することができるようにした情報処理装置を提供することを目的とする。 In view of this point, the present invention can cope with an increase in the number of interrupt factors even when using a CPU with a small number of interrupt request inputs, and can maintain high speed interrupt processing. An object is to provide a processing apparatus.
本発明の情報処理装置は、CPUと、1以上の割込み要求入力を持つ割込み拡張手段を有し、割込み拡張手段は、割込み要求を受け付けたときは、CPUに割込み要求を行うと共に、CPUが割込み拡張手段からの割込み要求を受け付けた場合にCPUに実行させる所定命令を保持するというものである。 The information processing apparatus according to the present invention includes a CPU and an interrupt expansion unit having one or more interrupt request inputs. The interrupt expansion unit issues an interrupt request to the CPU when the interrupt request is received, and the CPU interrupts the CPU. A predetermined instruction to be executed by the CPU when an interrupt request from the expansion means is received is held.
本発明によれば、CPUのほか、1以上の割込み要求入力を持つ割込み拡張手段を有し、割込み拡張手段は、割込み要求を受け付けたときは、CPUに割込み要求を行うとしている。したがって、割込み要求入力数が少ないCPUを用いても、割込み要因数の増加に対処することができる。 According to the present invention, in addition to the CPU, there is provided interrupt extension means having one or more interrupt request inputs, and the interrupt extension means makes an interrupt request to the CPU when an interrupt request is received. Therefore, even if a CPU with a small number of interrupt request inputs is used, an increase in the number of interrupt factors can be dealt with.
また、割込み拡張手段は、割込み要求を受け付けたときは、CPUが割込み拡張手段からの割込み要求を受け付けた場合にCPUに実行させる所定命令を保持するとしているので、CPUは、割込み拡張手段からの割込み要求を受け付けたときは、割込み拡張手段が保持する所定命令を実行して割込み処理を行うことになり、割込み拡張手段に対して実際に割込み要求を行った周辺装置をソフトウエアで検出するという手順が不要となる。したがって、割込み処理の高速化を維持することができる。 Further, when the interrupt extension means accepts an interrupt request, the CPU holds a predetermined instruction to be executed when the CPU accepts an interrupt request from the interrupt extension means. When an interrupt request is received, a predetermined instruction held by the interrupt extension means is executed to perform interrupt processing, and the peripheral device that actually made the interrupt request to the interrupt extension means is detected by software. The procedure becomes unnecessary. Therefore, it is possible to maintain high speed interrupt processing.
(第1実施形態)
図1は本発明の第1実施形態の要部のブロック回路図である。本発明の第1実施形態は、CPU8と、メモリ9と、アドレスバス10と、データバス11と、割込み拡張手段12を有している。IR0、IRm-1、IRm、IRm+1、IRm+nは周辺装置が出力する割込み要求信号であり、割込み要求信号IR1〜IRm-2、IRm+2〜IRm+n-1は図示を省略している。
(First embodiment)
FIG. 1 is a block circuit diagram of the main part of the first embodiment of the present invention. The first embodiment of the present invention includes a
CPU8は命令を実行するものである。CPU8において、130、13m-1、13mは割込み要求信号入力端子であり、割込み要求信号入力端子131〜13m-2は図示を省略している。本発明の第1実施形態においては、割込み要求信号入力端子130〜13m-1には割込み要求信号をCPU8に与えるとされた周辺装置が出力する割込み要求信号IR0〜IRm-1が与えられ、割込み要求信号入力端子13mには割込み拡張手段12が出力する割込み要求信号IREが与えられる。
The
また、14はCPU8内の割込み処理部である。割込み処理部14は、割込み要求信号IR0〜IRm-1、IREを入力し、予め設定された割込み要因の優先順位や割込みレベルや割込みマスク等の状態に基づいて、割込み要求を受け付けるか否かの判断を行い、受け付ける場合には、CPU8が実行中の命令の切れ目で割込み処理を開始し、割込みベクタのリードや、現在のCPU8の状態を示すプロセッサステータス(PS)の値や割込み処理終了後に実行再開すべきアドレスを示すプログラムカウンタ(PC)の値のスタックへの退避や、リードした割込みベクタが示すアドレスへの分岐処理を制御する。
メモリ9は、ハードウエア割込みベクタおよびソフトウエア割込みベクタが格納されたベクタテーブルと、割込み処理プログラムが格納された割込み処理プログラム格納領域を有し、CPU8とアドレスバス10およびデータバス11で接続されている。
The
割込み拡張手段12は、割込み要因数の増加に対応するためのものである。割込み拡張手段12において、150、151、15nは割込み要求信号入力端子であり、割込み要求信号入力端子152〜15n-1は図示を省略している。本発明の第1実施形態では、割込み要求信号入力端子150〜15nには割込み要求信号を割込み拡張手段12に与えるとされた周辺装置が出力する割込み要求信号IRm〜IRm+nが与えられる。 The interrupt extension means 12 is for dealing with an increase in the number of interrupt factors. In the interrupt extension means 12, 15 0 , 15 1 and 15 n are interrupt request signal input terminals, and the interrupt request signal input terminals 15 2 to 15 n-1 are not shown. In the first embodiment of the present invention, interrupt request signals IR m to IR m + n output from a peripheral device that is supposed to give an interrupt request signal to the interrupt extension means 12 are input to the interrupt request signal input terminals 15 0 to 15 n. Given.
なお、本発明の第1実施形態では、CPU8が有する割込み要求信号入力端子数はm+1個であり、割込み拡張手段12が有する割込み要求信号入力端子数はn+1個である。したがって、割込み拡張手段12を設けない場合には、対応することができる割込み要因数はm+1個であるが、割込み拡張手段12を設けた場合には、対応することができる割込み要因数はm+n+1となり、取り扱うことができる割込み要因数をn個増加することができる。
In the first embodiment of the present invention, the
割込み拡張手段12は、命令生成手段16と、記憶手段17と、アドレスデコーダ18を有している。命令生成手段16は、割込み要求信号IRm〜IRm+nを入力し、割込み要求を受け付けたときは、INT命令(割込み命令:INT #u8)のオペランド部の値としてメモリ9のベクタテーブルの割込みベクタ番号(u8)を生成し、この生成したオペランド部の値(割込みベクタ番号)で記憶手段17が保持するINT命令のオペランド部の値を書き換えると共に、CPU8に対する割込み要求信号IREをアサートし、CPU8に対して割込み要求を行うものである。
The
記憶手段17は、CPU8が割込み拡張手段12からの割込み要求を受け付けた場合に実行する命令としてINT命令を保持すると共に、メインプログラムへの復帰用のRETI命令(リターン命令)を保持するものであり、CPU8とデータバス11で接続されている。なお、INT命令およびRETI命令はCPU8により初期設定されるようにしても良いし、INT命令の命令コード部およびRETI命令をCPU8による初期設定を不要に保持するものであっても良い。
The storage means 17 holds an INT instruction as an instruction to be executed when the
アドレスデコーダ18は、CPU8がアドレスバス10に出力するCPU8のメモリ空間(アドレス空間)内のアドレスの値をデコードし、CPU8が記憶手段17にアクセスすることを可能とするものである。
The
なお、本発明の第1実施形態では、CPU8が割込み拡張手段12からの割込み要求を受け付けた場合にリードする割込みベクタが示すアドレスは、アドレスデコーダ18がデコードした場合に記憶手段17のINT命令を保持するアドレスの値となるようにしておく。また、INT命令中のオペランド部の値(u8)が示すメモリ9のベクタテーブルの割込みベクタ(ソフトウエア割込みベクタ)が示すアドレスは、目的とする割込み処理プログラムの先頭アドレスとしておくようにする。
In the first embodiment of the present invention, the address indicated by the interrupt vector that is read when the
図2はINT命令のワード構成とオペレーションの内容を示す図であり、図2(A)はワード構成を示し、図2(B)はオペレーションの内容を示している。なお、割込みベクタ番号(u8)は、符号無しの8ビットデータである。また、SSPはシステムスタックレジスタ、PSはプロセッサステータス、PCはプログラムカウンタ、Iフラグは割込み許可フラグ、Sフラグはスタックポインタ、TBRはテーブルベースレジスタ(割込みベクタテーブルの先頭アドレスを示すレジスタ)である。 2A and 2B are diagrams showing the word configuration and operation contents of the INT instruction. FIG. 2A shows the word configuration and FIG. 2B shows the operation contents. The interrupt vector number (u8) is unsigned 8-bit data. SSP is a system stack register, PS is a processor status, PC is a program counter, I flag is an interrupt permission flag, S flag is a stack pointer, and TBR is a table base register (a register indicating the start address of an interrupt vector table).
図3は命令生成手段16が生成する割込みベクタ番号(u8)の例を示す図であり、図3(A)は割込み要求信号IRm〜IRm+nがIRm〜IRm+2である場合、図3(B)は割込み要求信号IRm〜IRm+nがIRm〜IRm+5の場合であり、xは“0”又は“1”である。なお、図3(B)の例は、割込み要求信号IRm〜IRm+5のうち、添え字の値が小さい割込み要求信号が優先されるようにしたものである。
Figure 3 is a diagram showing an example of an interrupt vector number (u8) generated by the
このように構成された本発明の第1実施形態では、割込み処理部14は、割込み要求を受け取ると、予め設定された割込み要因の優先順位や割込みレベルや割込みマスク等の状態に基づいて、割込み要求を受け付けるか否かの判断を行う。
In the first embodiment of the present invention configured as described above, when the interrupt processing
ここで、例えば、割込み要求信号IR0〜IRm-1の出力元の周辺装置からの割込み要求を受け付けた場合には、CPU8は、実行中の命令の切れ目でハードウエア割込み処理を開始し、メモリ9のベクタテーブルからの割込みベクタ(ハードウエア割込みベクタ)のリードや、現在のCPU8の状態を示すプロセッサステータス(PS)の値や割込み処理終了後に実行再開すべきアドレスを示すプログラムカウンタ(PC)の値のスタックへの退避などを行い、リードした割込みベクタが示すアドレスへの分岐を行い、割込み処理プログラムを実行し、割込み処理が終了すると、メインプログラムに復帰する。
Here, for example, when receiving an interrupt request from the peripheral device from which the interrupt request signals IR 0 to IR m-1 are output, the
これに対して、割込み拡張手段12に対して割込み要求があり、割込み拡張手段12が割込み要求信号IREによりCPU8に対して割込み要求を行った場合において、CPU8が割込み拡張手段12からの割込み要求を受け付けた場合には、図4に示すように割込み処理が行われる。
In contrast, there is an interrupt request to the interrupt expansion means 12, when the interrupt expansion means 12 has performed an interrupt request to the
即ち、割込み要求信号IRm〜IRm+nの出力元の周辺装置から割込み拡張手段12に割込み要求があり、割込み拡張手段12がこれを受け付けると、(ステップP1)、命令生成手段16は、INT命令のオペランド部の値(割込みベクタ番号)を生成し、この生成したオペランド部の値(割込みベクタ番号)で記憶手段17が保持するINT命令のオペランド部の値を書き換えると共に、CPU8に対する割込み要求信号IREをアサートし、CPU8に対して割込み要求を行う(ステップP2)。
That is, when there is an interrupt request to the interrupt extension means 12 from the peripheral device from which the interrupt request signals IR m to IR m + n are output, and the interrupt extension means 12 accepts the interrupt request (step P1), the instruction generation means 16 The value of the operand part (interrupt vector number) of the INT instruction is generated, the value of the operand part of the INT instruction held in the storage means 17 is rewritten with the value of the generated operand part (interrupt vector number), and an interrupt request to the
そして、CPU8が割込み拡張手段12からの割込み要求を受け付けると、CPU8は、実行中の命令の切れ目でハードウエア割込み処理を開始し、メモリ9のベクタテーブルからの割込みベクタ(ハードウエア割込みベクタ)のリードや、現在のCPU8の状態を示すプロセッサステータス(PS)の値や割込み処理終了後に実行再開すべきアドレスを示すプログラムカウンタ(PC)の値のスタックへの退避などを行い、リードした割込みベクタが示すアドレスへの分岐を行う(ステップP3)。
When the
ここで、本発明の第1実施形態では、CPU8が割込み拡張手段12からの割込み要求を受け付けた場合にリードする割込みベクタが示すアドレスは、記憶手段17のINT命令を保持するアドレスとされているので、ステップP3における割込みベクタが示すアドレスへの分岐は、割込み拡張手段12の記憶手段17のINT命令を保持するアドレスに対して行われることになる。
Here, in the first embodiment of the present invention, the address indicated by the interrupt vector that is read when the
そして、CPU8は、記憶手段17からINT命令をリードして、INT命令の実行を開始し(ステップP4)、メモリ9のベクタテーブルからINT命令のオペランド部の値(割込みベクタ番号)が示すソフトウエア割込みベクタのリードや、現在のCPU8の状態を示すプロセッサステータス(PS)の値や割込み処理終了後に実行再開すべきアドレスを示すプログラムカウンタ(PC)の値のスタックへの退避などを行い、リードしたソフトウエア割込みベクタが示すアドレスへの分岐を行う(ステップP5)。
Then, the
ここで、本発明の第1実施形態では、記憶手段17が保持するINT命令中のオペランド部の値(割込みベクタ番号)が示すメモリ9のベクタテーブルの割込みベクタ(ソフトウエア割込みベクタ)が示すアドレスは、目的とする割込み処理プログラムの先頭アドレスを示すものとされているので、ステップP5におけるソフトウエア割込みベクタが示すアドレスへの分岐は、メモリ9内の目的とする割込み処理プログラムが保持されている先頭アドレスに対して行われることになる。
Here, in the first embodiment of the present invention, the address indicated by the interrupt vector (software interrupt vector) of the vector table of the
そして、CPU8は、目的とする割込み処理プログラムの実行を行い、目的とする割込み処理プログラムの最後に記述されているRETI命令でメインプログラムへの復帰処理を開始し(ステップP6)、記憶手段17が保持するRETI命令を実行し(ステップP7)、メインプログラムに復帰する(ステップS8)。
Then, the
以上のように、本発明の第1実施形態においては、割込み要求信号IR0〜IRm+nの出力元の周辺装置を、割込み要求信号IR0〜IRm-1の出力元の周辺装置のグループと、割込み要求信号IRm〜IRm+nの出力元の周辺装置のグループとに分け、CPU8は割込み要求信号IR0〜IRm-1を受け、割込み拡張手段12は割込み要求信号IRm〜IRm+nを受けるとしている。
As described above, in the first embodiment of the present invention, the peripheral device that outputs the interrupt request signals IR 0 to IR m + n is the same as the peripheral device that outputs the interrupt request signals IR 0 to IR m−1 . The
そして、命令生成手段16は、割込み要求信号IRm〜IRm+nの出力元の周辺装置からの割込み要求を受け付けたときは、CPU8に対して割込み要求を行うとしている。したがって、割込み要求入力数が少ないCPU8を用いても、割込み要因数の増加に対処することができる。
Then, the instruction generation means 16 makes an interrupt request to the
また、命令生成手段16は、割込み要求信号IRm〜IRm+nの出力元の周辺装置からの割込み要求を受け付けたときは、メモリ9のベクタテーブルの割込みベクタ番号(u8)を生成し、生成した割込みベクタ番号で記憶手段17が保持するINT命令のオペランド部の値(u8)を書き換えるとしている。
When the instruction generation means 16 receives an interrupt request from the peripheral device from which the interrupt request signals IR m to IR m + n are output, it generates an interrupt vector number (u8) in the vector table of the
そして、CPU8は、命令生成手段16からの割込み要求を受け付けたときは、記憶手段17が保持しているINT命令を実行して割込み処理を行うことになるので、割込み要求信号IRm〜IRm+nの出力元の周辺装置のうち、実際に割込み要求を行った周辺装置をソフトウエアで検出するという手順が不要となる。したがって、割込み処理の高速化を維持することができる。
Then,
なお、本発明の第1実施形態においては、記憶手段17にINT命令を保持させるようにした場合について説明したが、その他の命令、例えば、無条件分岐命令を保持させ、割込み要求に応じて分岐先を示す値を命令生成手段16で生成し、この生成した値で無条件分岐命令のオペランド部の値を変更するようにしても良い。
In the first embodiment of the present invention, the case where the
(第2実施形態)
図5は本発明の第2実施形態の要部のブロック回路図である。本発明の第2実施形態は、本発明の第1実施形態と同様に、CPU8と、メモリ9と、アドレスバス10と、データバス11と、割込み拡張手段12を有し、CPU8は割込み要求信号IR0〜IRm-1を受け、割込み拡張手段12は割込み要求信号IRm〜IRm+nを受けるとしているが、記憶手段17には割込み要求信号IRm〜IRm+nの出力元の周辺装置からの割込み要求に対応する割込み処理プログラムの命令列を一部の命令のオペランド部を変更可能に保持させるというものである。
(Second Embodiment)
FIG. 5 is a block circuit diagram of the main part of the second embodiment of the present invention. Similar to the first embodiment of the present invention, the second embodiment of the present invention includes a
ここで、例えば、割込み要求信号IRm〜IRm+nの出力元の周辺装置として同じ機能を持つ複数の周辺装置を搭載した場合において、これら同じ機能を持つ複数の周辺装置からの割込み要求に対応する割込み処理においては、例えば、アクセスするレジスタアドレスの値が変更になるだけで、他の処理については共通のプログラムが使用可能である場合がある。本発明の第2実施形態は、このような場合に適用して好適な情報処理装置である。 Here, for example, when a plurality of peripheral devices having the same function as the peripheral device from which the interrupt request signals IR m to IR m + n are output, an interrupt request from a plurality of peripheral devices having the same function In the corresponding interrupt processing, for example, only the value of the register address to be accessed is changed, and a common program may be usable for other processing. The second embodiment of the present invention is an information processing apparatus suitable for such a case.
本発明の第2実施形態では、記憶手段17には、割込み要求信号IRm〜IRm+nの出力元の周辺装置からの割込み要求に対応する割込み処理プログラムを保持させるが、この割込み処理プログラムは、割込み要求信号IRm〜IRm+nの出力元の周辺装置からの割込み要求に対応する割込み処理に共通の共通命令列19と、受け付けた割込み要求に応じて変更可能とされた変更対象命令20とを有している。
In the second embodiment of the present invention, the storage means 17 holds an interrupt processing program corresponding to an interrupt request from a peripheral device that is the source of output of the interrupt request signals IR m to IR m + n. Is a
図6は変更対象命令20のワード構成例を示す図である。例えば、変更対象命令20の命令コード部にはストア命令のコードが保持され、オペランド部には、直接アクセスするレジスタのアドレス(dir)が保持されるが、変更対象命令20のオペランド部の値(アクセスするレジスタアドレスの値)は、命令生成手段16が受け付けた割込み要求毎に生成し、この生成したオペランド部の値で記憶手段17が保持する変更対象命令20のオペランド部の値が書き換えられる。
FIG. 6 is a diagram illustrating a word configuration example of the
なお、本発明の第2実施形態では、CPU8が割込み拡張手段12からの割込み要求を受け付けた場合にリードする割込みベクタが示すアドレスは、アドレスデコーダ18がデコードした場合に記憶手段17が保持する割込み処理プログラムの先頭アドレスとなるような値にしておく。
In the second embodiment of the present invention, the address indicated by the interrupt vector that is read when the
このように構成された本発明の第2実施形態においては、割込み要求信号IRm〜IRm+nの出力元の周辺装置から割込み拡張手段12に割込み要求があり、命令生成手段16がこれを受け付けると、命令生成手段16は、変更対象命令20のオペランド部の値を生成し、この生成した値で記憶手段17が保持する変更対象命令20のオペランド部の値を書き換えると共に、CPU8への割込み要求信号IREをアサートし、CPU8に対して割込み要求を行う。
In the second embodiment of the present invention configured as described above, there is an interrupt request from the peripheral device that is the source of the interrupt request signals IR m to IR m + n to the interrupt extension means 12, and the instruction generation means 16 Upon receipt, the instruction generation means 16 generates the value of the operand part of the
そして、CPU8が命令生成手段16からの割込み要求を受け付けると、CPU8は、実行中の命令の切れ目でハードウエア割込み処理を開始し、メモリ9のベクタテーブルからの割込みベクタ(ハードウエア割込みベクタ)のリードや、現在のCPU8の状態を示すプロセッサステータス(PS)の値や割込み処理終了後に実行再開すべきアドレスを示すプログラムカウンタ(PC)の値のスタックへの退避などを行い、リードした割込みベクタが示すアドレスへの分岐を行う。
When the
ここで、CPU8が割込み拡張手段12からの割込み要求を受け付けた場合にリードする割込みベクタ(ハードウエア割込みベクタ)が示すアドレスは、アドレスデコーダ18がデコードした場合に記憶手段17が保持する割込み処理プログラムの先頭アドレスとなる値にされているので、リードした割込みベクタ(ハードウエア割込みベクタ)が示すアドレスへの分岐は、記憶手段17の割込み処理プログラムの先頭アドレスに対して行われることになる。そこで、CPU8は、記憶手段17から割込み処理プログラムを実行して割込み処理を行い、これが終了すると、メインプログラムに復帰する。
Here, the address indicated by the interrupt vector (hardware interrupt vector) read when the
以上のように、本発明の第2実施形態においては、割込み要求信号IR0〜IRm+nの出力元の周辺装置を、割込み要求信号IR0〜IRm-1の出力元の周辺装置のグループと、割込み要求信号IRm〜IRm+nの出力元の周辺装置のグループとに分け、CPU8は割込み要求信号IR0〜IRm-1を受け、割込み拡張手段12は割込み要求信号IRm〜IRm+nを受けるとしている。
As described above, in the second embodiment of the present invention, the peripheral devices that output the interrupt request signals IR 0 to IR m + n are connected to the peripheral devices that output the interrupt request signals IR 0 to IR m−1 . The
そして、命令生成手段16は、割込み要求信号IRm〜IRm+nの出力元の周辺装置からの割込み要求を受け付けたときは、CPU8に対して割込み要求を行うとしている。したがって、割込み要求入力数が少ないCPU8を用いても、割込み要因数の増加に対処することができる。
Then, the instruction generation means 16 makes an interrupt request to the
また、命令生成手段16は、割込み要求信号IRm〜IRm+nの出力元の周辺装置からの割込み要求を受け付けたときは、受け付けた割込み要求に対応した割込み処理に必要な変更対象命令20のオペランド部の値(アクセスするレジスタアドレスの値)を生成し、この生成したオペランド部の値で記憶手段17が保持する変更対象命令20のオペランド部の値が書き換えられる。
When the
そして、CPU8は、命令生成手段16からの割込み要求を受け付けたときは、これに対応した割込み処理を開始することになるが、この場合、CPU8は、記憶手段17が保持する割込み処理プログラムを実行して割込み処理を行うことになり、割込み要求信号IRm〜IRm+nの出力元の周辺装置の中の実際に割込み要求を行った周辺装置をソフトウエアで検出するという手順が不要となる。
When the
また、割込み要求信号IRm〜IRm+nの出力元の周辺装置からの割込み要求に対応する割込み処理においては、割込み要求をした周辺装置に対応してアクセスするレジスタアドレスの値が変更になるだけで、他の処理については、共通のプログラムが使用可能である場合、従来においては、共通のプログラムをサブルーチン化し、レジスタアドレスをパラメータ化してそれぞれの割込み処理ルーチンを呼び出していたが、本発明の第2実施形態によれば、固定した割込み処理プログラムの実行を行うことができ、サブルーチンへの分岐処理が不要となる。したがって、割込み処理の更なる高速処理が可能となる。 Further, in the interrupt processing corresponding to the interrupt request from the peripheral device that is the source of the interrupt request signals IR m to IR m + n , the value of the register address that is accessed corresponding to the peripheral device that requested the interrupt is changed. For other processing, if a common program can be used, conventionally, the common program is converted into a subroutine, the register address is parameterized, and each interrupt processing routine is called. According to the second embodiment, a fixed interrupt processing program can be executed, and branch processing to a subroutine becomes unnecessary. Therefore, further high speed processing of interrupt processing is possible.
更に、記憶手段17を書き込み可能なレジスタやRAMで構成するようにし、記憶手段17に設定する共通命令列19や変更対象命令20の命令コード部の値をCPU8から自由に設定できるようにする場合には、ハードウエアの変更なく、様々な割込み要因に対応することができる。
Further, the storage means 17 is composed of a writable register or RAM so that the
1…OR回路
2…CPU
30、31、3m…割込み要求信号入力端子
4…割込み処理部
5…メモリ
6…アドレスバス
7…データバス
8…CPU
9…メモリ
10…アドレスバス
11…データバス
12…割込み拡張手段
130、13m-1、13m…割込み要求信号入力端子
14…割込み処理部
150、151、15n…割込み要求信号入力端子
16…命令生成手段
17…記憶手段
18…アドレスデコーダ
19…共通命令列
20…変更対象命令
1 ... OR
3 0 , 3 1 , 3 m ... interrupt request signal input terminal 4 ... interrupt processing
9 ...
Claims (4)
1以上の割込み要求入力を持つ割込み拡張手段を有し、
前記割込み拡張手段は、割込み要求を受け付けたときは、前記CPUに割込み要求を行うと共に、前記CPUが前記割込み拡張手段からの割込み要求を受け付けた場合に前記CPUに実行させる所定命令を保持する
ことを特徴とする情報処理装置。 CPU,
Having an interrupt extension means having one or more interrupt request inputs;
The interrupt extension means makes an interrupt request to the CPU when an interrupt request is accepted, and holds a predetermined instruction to be executed by the CPU when the CPU accepts an interrupt request from the interrupt extension means. An information processing apparatus characterized by the above.
前記割込み拡張手段は、
割込み要求を受ける命令生成手段と、
前記割込み命令を保持させる記憶手段と、
前記CPUが出力する前記CPUのメモリ空間内のアドレスをデコードし、前記CPUによる前記記憶手段へのアクセスを可能とするアドレスデコーダを有し、
前記命令生成手段は、割込み要求を受け付けたときは、該受け付けた割込み要求に応じた前記割込み命令のオペランド部の値を生成し、該生成したオペランド部の値で前記記憶手段が保持する前記割込み命令のオペランド部の値を書き換える
ことを特徴とする請求項1記載の情報処理装置。 The predetermined instruction is an interrupt instruction,
The interrupt extension means includes
An instruction generation means for receiving an interrupt request;
Storage means for holding the interrupt instruction;
An address decoder that decodes an address in the memory space of the CPU output by the CPU and enables the CPU to access the storage means;
When the instruction generation unit receives an interrupt request, the instruction generation unit generates a value of an operand part of the interrupt instruction according to the received interrupt request, and the interrupt unit held by the storage unit with the generated operand part value The information processing apparatus according to claim 1, wherein the value of the operand part of the instruction is rewritten.
前記割込み拡張手段は、
割込み要求を受ける命令生成手段と、
前記割込み処理プログラムを保持させる記憶手段と、
前記CPUが出力する前記CPUのメモリ空間内のアドレスをデコードし、前記CPUによる前記記憶手段へのアクセスを可能とするアドレスデコーダを有し、
前記命令生成手段は、割込み要求を受け付けたときは、該受け付けた割込み要求に応じた前記変更対象命令のオペランド部の値を生成し、該生成したオペランド部の値で前記記憶手段が保持する前記変更対象命令のオペランド部の値を書き換える
ことを特徴とする請求項1記載の情報処理装置。 The predetermined instruction is an interrupt processing program including a change target instruction,
The interrupt extension means includes
An instruction generation means for receiving an interrupt request;
Storage means for holding the interrupt processing program;
An address decoder that decodes an address in the memory space of the CPU output by the CPU and enables the CPU to access the storage means;
When the instruction generation unit receives an interrupt request, the instruction generation unit generates the value of the operand part of the instruction to be changed according to the received interrupt request, and the storage unit holds the value of the generated operand part The information processing apparatus according to claim 1, wherein the value of the operand part of the instruction to be changed is rewritten.
The information processing apparatus according to claim 3, wherein the storage unit is configured to be able to write the interrupt processing program from the CPU.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005227422A JP2007041980A (en) | 2005-08-05 | 2005-08-05 | Information processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005227422A JP2007041980A (en) | 2005-08-05 | 2005-08-05 | Information processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007041980A true JP2007041980A (en) | 2007-02-15 |
Family
ID=37799883
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005227422A Pending JP2007041980A (en) | 2005-08-05 | 2005-08-05 | Information processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007041980A (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001005676A (en) * | 1999-06-18 | 2001-01-12 | Mitsubishi Electric Corp | Interruption processor |
-
2005
- 2005-08-05 JP JP2005227422A patent/JP2007041980A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001005676A (en) * | 1999-06-18 | 2001-01-12 | Mitsubishi Electric Corp | Interruption processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7404066B2 (en) | Active memory command engine and method | |
EP0476722B1 (en) | Data processing system | |
JPH0769818B2 (en) | Data processing device | |
KR100875377B1 (en) | Apparatus and Method for Performing Stack Pop and Push Operations in a Processing System | |
JPH0527971A (en) | Information processor | |
US4764869A (en) | Method and apparatus for controlling interruption in the course of instruction execution in a processor | |
JPH07239780A (en) | One-clock variable length instruction execution process type instruction read computer | |
JPS62226231A (en) | Processor | |
JP2007041980A (en) | Information processor | |
JP2001256044A (en) | Data processor | |
JP2007026091A (en) | Interrupt control circuit and its control method | |
JP2000112754A (en) | Data processor | |
JP2000181713A (en) | Instruction controller and instruction control method | |
JP2743947B2 (en) | Micro program control method | |
JP2506591B2 (en) | Auxiliary processor | |
JPH1165622A (en) | Programmable controller | |
JPH05334074A (en) | Microprocessor | |
JPH1040165A (en) | Data read method and read buffer | |
JP4116752B2 (en) | Computer and its control method | |
JPS62151936A (en) | Cache circuit built in microprocessor | |
JP3058524B2 (en) | Program control unit | |
JP2008305093A (en) | Memory controller, control method for memory controller, program, and storage medium | |
JP2005107695A (en) | Information processor and its interrupt control method | |
JPH1124942A (en) | Microcomputer | |
JPH0340013A (en) | Central arithmetic processing unit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080704 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20080730 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20091215 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091222 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100413 |