【特許請求の範囲】
【請求項1】
複数の割込入力からの割込要求を記憶するとともに、割込処理が開始されると対応するビットの値がリセットされるIRRレジスタと、
現在処理中の割込処理に対応する割込入力を記憶するISRレジスタと、
割込処理が開始された時点のIRRレジスタの値を記憶するILRレジスタと、
現在処理中の割込処理が終了する毎に、前記IRRレジスタ、前記ISRレジスタおよび前記ILRレジスタの値に基づき、複数の前記割込入力に対して優先順位の割り当てをし直し、次に処理すべき最も優先順位の高い割込入力からの割込要求を判定する優先順位割当回路と、
全体の動作を制御するとともに、マイクロプロセッサとのインタフェースをとる制御回路とを備えていることを特徴とする割込処理回路。
【請求項2】
前記優先順位割当回路が、前記割込要求が記憶された前記IRRレジスタの値が前記ILRレジスタに記憶されたビットに対して、前記リセットされたIRRレジスタの値が記憶されたビットに比較して高い優先順位を与えることを特徴とする請求項1記載の割込処理回路。
【請求項3】
前記優先順位割当回路が、前記IRRレジスタに前記割込要求が記憶され、かつ、前記割込要求が記憶された前記IRRレジスタの値が前記ILRレジスタに記憶されたビットに対して高い優先順位を与え、その後に、前記IRRレジスタに前記割込要求が記憶され、かつ、前記リセットされたIRRレジスタの値が前記ILRレジスタに記憶されたビットに対して優先順位を与えることを特徴とする請求項1記載の割込処理回路。
[Claims]
[Claim 1]
An IRR register that stores interrupt requests from multiple interrupt inputs and resets the corresponding bit value when interrupt processing is started.
An ISR register that stores the interrupt input corresponding to the interrupt process currently being processed,
The ILR register that stores the value of the IRR register when the interrupt process is started, and
Each time the interrupt process currently being processed is completed, the priority is reassigned to the plurality of interrupt inputs based on the values of the IRR register, the ISR register, and the ILR register, and then the interrupt process is processed. A priority assignment circuit that determines an interrupt request from the interrupt input with the highest priority to be
An interrupt processing circuit characterized in that it controls the entire operation and is provided with a control circuit that interfaces with a microprocessor.
2.
The priority allocation circuit compares the value of the IRR register in which the interrupt request is stored to the bit in which the value of the reset IRR register is stored in comparison with the bit in which the value of the IRR register is stored in the ILR register. The interrupt processing circuit according to claim 1, wherein a high priority is given.
3.
The priority assignment circuit gives a higher priority to the bits in which the interrupt request is stored in the IRR register and the value of the IRR register in which the interrupt request is stored is stored in the ILR register. The claim is characterized in that the interrupt request is stored in the IRR register and the value of the reset IRR register gives priority to the bits stored in the IRR register. 1. The interrupt processing circuit according to 1.
【0018】
【課題を解決するための手段】
上記目的を達成するために、本発明は、複数の割込入力からの割込要求を記憶するとともに、割込処理が開始されると対応するビットの値がリセットされるIRRレジスタと、現在処理中の割込処理に対応する割込入力を記憶するISRレジスタと、割込処理が開始された時点のIRRレジスタの値を記憶するILRレジスタと、現在処理中の割込処理が終了する毎に、前記IRRレジスタ、前記ISRレジスタおよび前記ILRレジスタの値に基づき、複数の前記割込入力に対して優先順位の割り当てをし直し、次に処理すべき最も優先順位の高い割込入力からの割込要求を判定する優先順位割当回路と、全体の動作を制御するとともに、マイクロプロセッサとのインタフェースをとる制御回路とを備えていることを特徴とする割込処理回路を提供するものである。
ここで、前記優先順位割当回路が、前記割込要求が記憶された前記IRRレジスタの値が前記ILRレジスタに記憶されたビットに対して、前記リセットされたIRRレジスタの値が記憶されたビットに比較して高い優先順位を与えることが好ましい。
あるいは、前記優先順位割当回路が、前記IRRレジスタに前記割込要求が記憶され、かつ、前記割込要求が記憶された前記IRRレジスタの値が前記ILRレジスタに記憶されたビットに対して高い優先順位を与え、その後に、前記IRRレジスタに前記割込要求が記憶され、かつ、前記リセットされたIRRレジスタの値が前記ILRレジスタに記憶されたビットに対して優先順位を与えることが好ましい。
0018
[Means for solving problems]
In order to achieve the above object, the present invention stores an interrupt request from a plurality of interrupt inputs, an IRR register in which the value of the corresponding bit is reset when the interrupt process is started, and an IRR register currently processed. The ISR register that stores the interrupt input corresponding to the interrupt process inside, the ILR register that stores the value of the IRR register when the interrupt process starts, and each time the interrupt process currently being processed ends. , The priority is reassigned to the plurality of interrupt inputs based on the values of the IRR register, the ISR register, and the ILR register, and the interrupt input having the highest priority to be processed next is assigned. It provides an interrupt processing circuit characterized by including a priority assignment circuit for determining an interrupt request and a control circuit for controlling the overall operation and taking an interface with a microprocessor.
Here, the priority assignment circuit changes the value of the IRR register in which the interrupt request is stored into a bit in which the value of the reset IRR register is stored with respect to the bit in which the value of the IRR register is stored in the ILR register. It is preferable to give a higher priority in comparison.
Alternatively, the priority assignment circuit gives higher priority to the bit in which the interrupt request is stored in the IRR register and the value of the IRR register in which the interrupt request is stored is stored in the ILR register. It is preferable to give the order, and then give the priority to the bit in which the interrupt request is stored in the IRR register and the value of the reset IRR register is stored in the ILR register.
続いて、優先順位判定回路24は、優先順位レジスタ22からの信号PRIに基づいて、ANDゲート28からの出力が‘1’、すなわち、現在処理中の割込処理とほぼ同時に割込要求され、もしくは、前回の割込処理が開始されてから、終了されるまでの間に割込要求がなされ、まだ割込処理が開始されていない最も優先順位の高い割込入力IR0〜5を判定する。その判定結果は、判定出力信号としてISRレジスタ18および優先順位変更回路26へ入力される。
Subsequently, the priority determination circuit 24 is requested to interrupt the output from the AND gate 28 based on the signal PRI from the priority register 22, that is, interrupt processing at almost the same time as the interrupt processing currently being processed. Alternatively, the interrupt request is made between the start of the previous interrupt process and the end of the previous interrupt process, and the interrupt input IRs 0 to 5 having the highest priority for which the interrupt process has not yet been started are determined. The determination result is input to the ISR register 18 and the priority order changing circuit 26 as a determination output signal.
【図9】 (a)〜(d)は、図8に示す従来の割込処理回路の動作に対応する一実施例の表である。
9 (a) ~ (d) is a table of an example corresponding to the operation of the conventional interrupt processing circuit shown in FIG.