JP4911842B2 - Interrupt control circuit - Google Patents

Interrupt control circuit Download PDF

Info

Publication number
JP4911842B2
JP4911842B2 JP2001253281A JP2001253281A JP4911842B2 JP 4911842 B2 JP4911842 B2 JP 4911842B2 JP 2001253281 A JP2001253281 A JP 2001253281A JP 2001253281 A JP2001253281 A JP 2001253281A JP 4911842 B2 JP4911842 B2 JP 4911842B2
Authority
JP
Japan
Prior art keywords
interrupt
signal
signals
selection
register
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.)
Expired - Fee Related
Application number
JP2001253281A
Other languages
Japanese (ja)
Other versions
JP2003067197A (en
Inventor
利一 古川
昌也 太田
好将 新井
敬 市川
茂雄 田中
亮二 藤原
英和 加藤
義利 小山田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
On Semiconductor Trading Ltd
Original Assignee
On Semiconductor Trading Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by On Semiconductor Trading Ltd filed Critical On Semiconductor Trading Ltd
Priority to JP2001253281A priority Critical patent/JP4911842B2/en
Publication of JP2003067197A publication Critical patent/JP2003067197A/en
Application granted granted Critical
Publication of JP4911842B2 publication Critical patent/JP4911842B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、マイクロコンピュータにおける割り込み制御回路に関し、特に、複数の割り込み信号を2つの割り込み要求信号に割り振る機能を有する割り込み制御回路に関する。
【0002】
【従来の技術】
近年、マイクロコンピュータは汎用性を高めるため複数のタイマー回路や外部との通信を行うためのインターフェース回路や電源電圧の例えば瞬停などを検出する減電圧検出回路等を内蔵するようになった。このような周辺回路を内蔵するマイクロコンピュータにおいては、夫々の周辺回路がCPUに対してその夫々に対応した処理を要求し、その夫々の要求信号を調停するための割り込み制御回路を内蔵している。
【0003】
従来の一般的な割り込み制御回路において、例えば、複数の割り込み信号を優先順位の高い高速処理用割り込み要求信号と優先順位の低い通常処理用割り込み要求信号に割り振っている。そして、一般的には、その優先順位の割り振りはハード的に固定されており、ユーザーによって割り振りを変更するには、マイクロコンピュータの製品製造時に設定を変更していた。これに対し、それぞれの割り込み信号に対する割り込み要求信号の優先順位を容易に変更できるように、それぞれの割り込み信号を例えば高速処理用割り込み要求信号又は通常処理用割り込み要求信号に割り振るための選択レジスタを設け、プログラムによってその選択レジスタの設定を行い、マイクロコンピュータのアプリケーション等に応じて同じ割り込み信号入力に対する処理優先順位の変更を可能とし、マイクロコンピュータの汎用性を高めている。
【0004】
図2は、従来の割り込み制御回路を示す図である。
【0005】
図2において、1は割り込み許可レジスタ回路であって、第1及び第2割り込み信号10及び11のそれぞれに対応する許可データを格納する2つのレジスタで構成され、CPU(図示せず)からバスBUSを介して第1及び第2許可信号EN1及びEN2が設定される。
【0006】
4は第2ゲート回路であって、第1及び第2許可信号EN1及びEN2に応じて第1及び第2割り込み信号10及び11を通過又は遮断するものである。
【0007】
5は選択レジスタ回路であって、CPUからバスBUSを介して第1及び第2選択信号SL1及びSL2が設定される。第1及び第2選択信号SL1及びSL2は、第1及び第2割り込み信号10及び11を第1及び第2割り込み要求信号12及び13の何れかに割り振るかを決定する信号である。
【0008】
6は第3ゲート回路であって、第2ゲート回路4を介して入力される第1及び第2割り込み信号10及び11を第1及び第2選択信号SL1及びSL2に応じて通過又は遮断する。
【0009】
7は第4ゲートであって、第2及び第3ゲート回路4及び6を通過した第1及び第2割り込み信号10及び11をゲートし、第1割り込み要求信号12としてCPUへ出力する。
【0010】
8は第5ゲート回路であって、第2ゲート回路4を介して入力される第1及び第2割り込み信号10及び11を第1及び第2選択信号SL1及びSL2に応じて通過又は遮断する。尚、第3ゲート回路6と第5ゲート回路8とは、第2ゲート回路4を介して入力される第1及び第2割り込み信号10及び11を相補的に通過又は遮断する。
【0011】
9は第6ゲートであって、第2及び第5ゲート回路4及び8を通過した第1及び第2割り込み信号10及び11をゲートし第2割り込み要求信号13としてCPUへ出力する。
【0012】
尚、第3ゲート回路6と第4ゲート7とは第1セレクタ回路を構成し、第5ゲート回路8と第6ゲートとは第2セレクタ回路を構成するものである。
【0013】
次に、図2の従来の割り込み制御回路の動作を説明する。
【0014】
まず、図2の第1及び第2許可信号EN1及びEN2や第1及び第2選択信号SL1及びSL2の設定状態を説明する。第1及び第2許可信号EN1及びEN2がHレベル、第1選択信号SL1がHレベル、第2選択信号SL2がLレベルに設定されているとする。このような状態で、第1割り込み信号10が入力されると、第1割り込み信号10は、第2ゲート回路4のANDゲート4a及び第3ゲート回路6のANDゲート6aを通過し、第4ゲート7を介して、第1割り込み要求信号12としてCPUへ転送される。一方、第5ゲート回路8のANDゲート8aは遮断状態になっているので、第1割り込み信号10はANDゲート8aで遮断されることになる。よって、第1割り込み信号10が第1割り込み要求信号12に振り分けられたことになる。
【0015】
また、第2割り込み信号11が入力される場合は、第2割り込み信号11は、第2ゲート回路4のANDゲート4b及び第5ゲート8のANDゲート8bを通過し、第6ゲート9を介して、第2割り込み要求信号13としてCPUへ転送される。一方、第3ゲート回路6のANDゲート6bは遮断状態になっているので、第2割り込み信号11はANDゲート6bで遮断されることになる。よって、第2割り込み信号11が第2割り込み要求信号13に振り分けられたことになる。
【0016】
尚、第1選択信号SLがHレベル、第2選択信号SL2がLレベルである場合を説明したが、例えば、第1及び第2許可信号EN1及びEN2がHレベル、第1及び第2選択信号SL1及びSL2がHレベルの場合、第1及び第2割り込み信号10及び11は、共に第1割り込み要求信号12として振り分けられ、CPUへ転送される。
【0017】
【発明が解決しようとする課題】
上述した従来の割り込み制御回路において、選択レジスタ回路5の設定は、特に制限なく設定の変更が可能であった。このため、選択レジスタ回路5の第1選択信号SL1を設定変更する際、例えば第1割り込み信号10が割り込みを要求するHレベルであると、第1割り込み信号10のHレベルが第1及び第2割り込み要求信号12及び13の何れにHレベルが出力されるかが保証されず、当業者の意思に反して誤った割り込み要求信号が発生するという問題があった。
【0018】
そして、一般的には、CPUは、第1及び第2割り込み要求信号12及び13のそれぞれに応じた処理プログラムを有しているので、本来処理すべきプログラムとは異なるプログラムを実行し、マイクロコンピュータが誤動作を起すという問題が発生する。
【0019】
このため、本発明では、複数の割り込み信号を第1割り込み要求信号又は第2割り込み要求信号へ割り振る選択信号データを格納する選択レジスタ回路への設定動作を安定して行える割り込み制御回路を提供することを目的とする。
【0020】
【課題を解決するための手段】
本発明は、上述した点に鑑みて、創作されたものであり、その特徴とするところは、選択信号に応じて、割り込み信号を2以上の割り込み要求信号に振り分けるセレクタと、禁止信号を格納する制御レジスタとを備え、前記セレクタは、前記禁止信号によって、前記割り込み信号を入力禁止すると共に、前記選択信号の設定許可状態となることを特徴とする。
【0021】
また、前記セレクタは、前記禁止信号が入力された場合前記選択信号を格納する選択レジスタと、前記選択レジスタの選択信号に応じて、通過または遮断状態となる複数のゲートとから構成されることを特徴とする。
【0022】
さらに、前記セレクタは、前記割り込み信号の入力を許可する許可信号を格納する割り込み許可レジスタと、前記許可信号に応じて前記割り込み信号を許可するゲート回路とを有し、前記ゲート回路は前記禁止信号に応じて強制的に前記割り込み信号を遮断することを特徴とする。
【0023】
本発明によれば、割り込み制御回路において、複数の割り込み信号を第1割り込み要求信号又は第2割り込み要求信号へ割り振る選択信号データを格納する選択レジスタ回路への設定を割り込み制御回路の動作を安定して行えることが可能となる。
【0024】
【発明の実施の形態】
本発明の詳細を図面に従って具体的に説明する。図1は本発明の実施の形態の構成を説明するための図である。
【0025】
本実施形態の特徴とするところは、制御レジスタ2と、第1ゲート回路3とを更に備える点にある。制御レジスタ2ではCPU(図示せず)からバスBUSを介して禁止信号INHXが設定され、第1ゲート回路3では禁止信号INHXに応じて第1及び第2許可信号EN1及びEN2を通過又は遮断する。そして、選択レジスタ回路5では、禁止信号INHXに応じて第1及び第2選択信号SL1及びSL2の設定が許可又は禁止される。
【0026】
尚、図1において、図2と同一の回路については同一符号を記すと共にその説明を省略するものとする。また、割り込み許可レジスタ回路1、選択レジスタ回路5による、割り振り動作については従来と同一のため省略する。
【0027】
次に、図1の割り込み制御回路の割り込み信号に対する割り込み要求信号の割り振り設定動作を説明する。第1割り込み信号10を第1割り込み要求信号12から第2割り込み要求信号13として切り換えて出力、また、第2割り込み信号11を第2割り込み信号13から第1割り込み要求信号12として切り換えて出力しようとする場合、先ず、制御レジスタ2において、第1及び第2許可信号EN1及びEN2を一括して禁止を示すLレベルが設定され、設定と同時に禁止信号INHXがLレベルとして出力される。
【0028】
そして、禁止信号INHXがLレベルであると、選択レジスタ回路5では、第1及び第2選択信号SL1及びSL2の設定が許可され、CPUからバスBUSを介して第1選択信号SL1がLレベル、第2選択信号SL2がHレベルに設定される。
【0029】
また、禁止信号INHXがLレベルであるので、第1及び第2許可信号EN1及びEN2は第1ゲート回路3で遮断される。その結果、第1ゲート回路3から、全ての出力信号がLレベルとして出力される。
【0030】
そして、第1ゲート回路3から出力される全信号のLレベルに応じて第1及び第2割り込み信号10及び11は第2ゲート回路4で遮断される。よって、第1及び第2割り込み要求信号12及び13は発生せず、割り込み処理の要求を示すことはないので、CPUは割り込み処理を行うことはない。
【0031】
次に、選択レジスタ回路5の設定が終了すると、CPUからバスBUSを介して禁止信号INHXはHレベルに設定され、第1及び第2許可信号EN1及びEN2の遮断が解除される。これにより、第1及び第2許可信号EN1及びEN2は第1ゲート回路3を通過する。
【0032】
その為、第1及び第2割り込み信号10及び11は、第1及び第2許可信号EN1及びEN2に応じて、第2ゲート回路4で通過又は遮断されるようになる。
【0033】
また、禁止信号INHXがHレベルになると、選択レジスタ回路5は、選択データの設定が禁止される。
【0034】
そして、第1選択信号SL1はLレベルであるので、第1割り込み信号10は第2ゲート回路4及び第5ゲート回路8を通過し、第7ゲートを介して第2割り込み要求信号13としてCPUへ転送される。また、第2選択信号SL2はHレベルであるので、第2割り込み信号11は、第2ゲート回路4及び第3ゲート回路6を通過し、第4ゲートを介して第1割り込み要求信号12としてCPUへ転送される。
【0035】
よって、第1選択信号SL1がLレベルであるので第1割り込み信号10は第2割り込み要求信号13に振り分けられ、また、第2選択信号SL2がHレベルであるので第2割り込み信号11は第1割り込み要求信号13に振り分けられることになる。
【0036】
これで、選択レジスタ回路5の設定が終了する。
【0037】
上述の如く、選択レジスタ回路5の選択信号SL1及びSL2を設定変更する際、第2ゲート回路4において、入力される第1及び第2割り込み信号10及び11は遮断されているので、第1及び第2割り込み要求信号12及び13は発生せず、CPUが誤った割り込み処理を行うことを確実に防止できる。
【0038】
尚、本実施例では、2つの割り込み信号入力の場合で説明したが、その割り込み信号の入力数は制限されることなく任意の複数を入力することが可能である。任意の複数の割り込み信号を入力する場合に、第1、第2、第3及び第5ゲート回路3、4、6及び8を構成するANDゲートの数は、その任意の複数個を備えるとよい。
【0039】
また、一つの割り込み信号から3以上の割り込み要求信号に振り分ける回路にも本発明を適用できる。
【0040】
また、割り込み許可レジスタ回路1から出力される許可信号は、その任意の複数個を備える。尚、割り込み許可レジスタ回路1から出力される許可信号の数は、割り込み信号の数より少ない数の許可信号を備え、一つの許可信号に対して複数の割り込み信号の許可又は禁止するようにしても良い。
【0041】
尚、実施例の説明では、第1ゲート回路3と第2ゲート回路4とを備えた場合を説明したが、第2ゲート回路4を構成する2入力のANDゲートを3入力のANDゲートで構成して、その一つの3入力ANDゲートに割り込み信号、許可信号及び禁止信号INHXを入力してもよい。
【0042】
また、制御レジスタ2を備える代わりに、割り込み許可レジスタ回路1から出力される全ての許可信号を禁止として、その全ての許可信号が禁止を示す値であることを検出する検出手段を設けて、その検出手段の出力に応じて選択レジスタ回路5の設定を許可しても良い。
【0043】
【発明の効果】
上述の如く、本発明によれば、複数の割り込み信号を第1及び第2割り込み要求信号に割り振る際に、CPUが誤った割り込み処理を防止しながら選択レジスタ回路の設定を実行できるという効果を奏する。
【0044】
また、制御レジスタの禁止信号INHXを割り込み信号入力禁止するLレベルに設定するという手順を経て選択レジスタ回路の設定を行うようにしたため、例えば、プログラムのバグ等による選択レジスタへの誤設定を防止できるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の実施の形態を示すブロック図である。
【図2】従来例を示すブロック図である。
【符号の説明】
1 割り込み許可レジスタ回路
2 制御レジスタ
3 第1ゲート回路
4 第2ゲート回路
5 選択レジスタ回路
6 第3ゲート回路
7 第4ゲート
8 第5ゲート回路
9 第6ゲート
10 第1割り込み信号
11 第2割り込み信号
12 第1割り込み要求信号
13 第2割り込み要求信号
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an interrupt control circuit in a microcomputer, and more particularly to an interrupt control circuit having a function of allocating a plurality of interrupt signals to two interrupt request signals.
[0002]
[Prior art]
In recent years, microcomputers have built in a plurality of timer circuits, an interface circuit for communicating with the outside, a reduced voltage detection circuit for detecting, for example, a momentary power interruption of the power supply voltage in order to improve versatility. In a microcomputer incorporating such a peripheral circuit, each peripheral circuit requests the CPU to perform processing corresponding to the respective peripheral circuit, and incorporates an interrupt control circuit for arbitrating each request signal. .
[0003]
In a conventional general interrupt control circuit, for example, a plurality of interrupt signals are assigned to a high-speed processing interrupt request signal having a high priority and a normal processing interrupt request signal having a low priority. In general, the allocation of priorities is fixed in hardware, and in order to change the allocation by the user, the setting is changed when the product of the microcomputer is manufactured. On the other hand, a selection register for allocating each interrupt signal to, for example, a high-speed processing interrupt request signal or a normal processing interrupt request signal is provided so that the priority order of the interrupt request signal with respect to each interrupt signal can be easily changed. The selection register is set by a program, and the processing priority for the same interrupt signal input can be changed according to the microcomputer application or the like, thereby improving the versatility of the microcomputer.
[0004]
FIG. 2 is a diagram showing a conventional interrupt control circuit.
[0005]
In FIG. 2, reference numeral 1 denotes an interrupt permission register circuit, which is composed of two registers for storing permission data corresponding to the first and second interrupt signals 10 and 11, respectively, from the CPU (not shown) to the bus BUS. The first and second permission signals EN1 and EN2 are set via
[0006]
Reference numeral 4 denotes a second gate circuit that passes or blocks the first and second interrupt signals 10 and 11 in accordance with the first and second enable signals EN1 and EN2.
[0007]
Reference numeral 5 denotes a selection register circuit, and first and second selection signals SL1 and SL2 are set from the CPU via the bus BUS. The first and second selection signals SL1 and SL2 are signals that determine whether the first and second interrupt signals 10 and 11 are allocated to the first and second interrupt request signals 12 and 13.
[0008]
A third gate circuit 6 passes or blocks the first and second interrupt signals 10 and 11 input via the second gate circuit 4 according to the first and second selection signals SL1 and SL2.
[0009]
A fourth gate 7 gates the first and second interrupt signals 10 and 11 that have passed through the second and third gate circuits 4 and 6 and outputs the first and second interrupt signals 10 and 11 to the CPU as a first interrupt request signal 12.
[0010]
A fifth gate circuit 8 passes or blocks the first and second interrupt signals 10 and 11 input via the second gate circuit 4 according to the first and second selection signals SL1 and SL2. The third gate circuit 6 and the fifth gate circuit 8 complementarily pass or block the first and second interrupt signals 10 and 11 input through the second gate circuit 4.
[0011]
Reference numeral 9 denotes a sixth gate which gates the first and second interrupt signals 10 and 11 that have passed through the second and fifth gate circuits 4 and 8 and outputs them to the CPU as a second interrupt request signal 13.
[0012]
The third gate circuit 6 and the fourth gate 7 constitute a first selector circuit, and the fifth gate circuit 8 and the sixth gate constitute a second selector circuit.
[0013]
Next, the operation of the conventional interrupt control circuit of FIG. 2 will be described.
[0014]
First, the setting states of the first and second enable signals EN1 and EN2 and the first and second selection signals SL1 and SL2 in FIG. 2 will be described. It is assumed that the first and second enable signals EN1 and EN2 are set to H level, the first selection signal SL1 is set to H level, and the second selection signal SL2 is set to L level. In this state, when the first interrupt signal 10 is input, the first interrupt signal 10 passes through the AND gate 4a of the second gate circuit 4 and the AND gate 6a of the third gate circuit 6, and the fourth gate. 7, the first interrupt request signal 12 is transferred to the CPU. On the other hand, since the AND gate 8a of the fifth gate circuit 8 is in the cut-off state, the first interrupt signal 10 is cut off by the AND gate 8a. Therefore, the first interrupt signal 10 is assigned to the first interrupt request signal 12.
[0015]
When the second interrupt signal 11 is input, the second interrupt signal 11 passes through the AND gate 4 b of the second gate circuit 4 and the AND gate 8 b of the fifth gate 8 and passes through the sixth gate 9. The second interrupt request signal 13 is transferred to the CPU. On the other hand, since the AND gate 6b of the third gate circuit 6 is cut off, the second interrupt signal 11 is cut off by the AND gate 6b. Therefore, the second interrupt signal 11 is assigned to the second interrupt request signal 13.
[0016]
Although the case where the first selection signal SL is at the H level and the second selection signal SL2 is at the L level has been described, for example, the first and second permission signals EN1 and EN2 are at the H level, and the first and second selection signals. When SL1 and SL2 are at the H level, the first and second interrupt signals 10 and 11 are both distributed as the first interrupt request signal 12 and transferred to the CPU.
[0017]
[Problems to be solved by the invention]
In the conventional interrupt control circuit described above, the setting of the selection register circuit 5 can be changed without any particular limitation. Therefore, when changing the setting of the first selection signal SL1 of the selection register circuit 5, for example, if the first interrupt signal 10 is at the H level requesting an interrupt, the H level of the first interrupt signal 10 is the first and second levels. There is a problem that it is not guaranteed to which of the interrupt request signals 12 and 13 the H level is output, and an erroneous interrupt request signal is generated against the intention of those skilled in the art.
[0018]
In general, since the CPU has a processing program corresponding to each of the first and second interrupt request signals 12 and 13, the CPU executes a program different from the program to be originally processed, and the microcomputer Causes a malfunction.
[0019]
Therefore, the present invention provides an interrupt control circuit that can stably perform a setting operation to a selection register circuit that stores selection signal data for allocating a plurality of interrupt signals to a first interrupt request signal or a second interrupt request signal. With the goal.
[0020]
[Means for Solving the Problems]
The present invention has been created in view of the above points, and is characterized by storing a selector that distributes an interrupt signal into two or more interrupt request signals according to a selection signal, and a prohibition signal. And a control register, wherein the selector prohibits input of the interrupt signal by the prohibition signal and enters a setting permission state of the selection signal.
[0021]
In addition, the selector includes a selection register that stores the selection signal when the prohibition signal is input, and a plurality of gates that are passed or blocked according to the selection signal of the selection register. Features.
[0022]
The selector further includes an interrupt permission register for storing a permission signal for permitting the input of the interrupt signal, and a gate circuit for permitting the interrupt signal according to the permission signal. The interrupt signal is forcibly cut off according to the above.
[0023]
According to the present invention, in the interrupt control circuit, the operation of the interrupt control circuit is stabilized by setting the selection register circuit for storing selection signal data for allocating a plurality of interrupt signals to the first interrupt request signal or the second interrupt request signal. Can be done.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Details of the present invention will be specifically described with reference to the drawings. FIG. 1 is a diagram for explaining the configuration of an embodiment of the present invention.
[0025]
A feature of the present embodiment is that a control register 2 and a first gate circuit 3 are further provided. In the control register 2, a prohibition signal INHX is set from a CPU (not shown) via the bus BUS, and the first gate circuit 3 passes or blocks the first and second permission signals EN1 and EN2 according to the prohibition signal INHX. . In the selection register circuit 5, the setting of the first and second selection signals SL1 and SL2 is permitted or prohibited according to the inhibition signal INHX.
[0026]
In FIG. 1, the same circuits as those in FIG. 2 are denoted by the same reference numerals and the description thereof is omitted. Since the allocation operation by the interrupt permission register circuit 1 and the selection register circuit 5 is the same as the conventional one, the description thereof is omitted.
[0027]
Next, an interrupt request signal allocation setting operation for the interrupt signal of the interrupt control circuit of FIG. 1 will be described. The first interrupt signal 10 is switched and output as the second interrupt request signal 13 from the first interrupt request signal 12, and the second interrupt signal 11 is switched and output as the first interrupt request signal 12 from the second interrupt signal 13. In this case, first, in the control register 2, the L level indicating prohibition is set for the first and second enable signals EN1 and EN2 at the same time, and simultaneously with the setting, the prohibit signal INHX is output as the L level.
[0028]
When the inhibition signal INHX is at the L level, the selection register circuit 5 permits the setting of the first and second selection signals SL1 and SL2, and the first selection signal SL1 is set to the L level via the bus BUS from the CPU. Second selection signal SL2 is set to H level.
[0029]
Further, since the inhibition signal INHX is at the L level, the first and second permission signals EN1 and EN2 are blocked by the first gate circuit 3. As a result, all output signals are output as L level from the first gate circuit 3.
[0030]
The first and second interrupt signals 10 and 11 are blocked by the second gate circuit 4 in accordance with the L level of all signals output from the first gate circuit 3. Therefore, the first and second interrupt request signals 12 and 13 are not generated and the interrupt processing request is not indicated, so that the CPU does not perform the interrupt processing.
[0031]
Next, when the setting of the selection register circuit 5 is completed, the inhibition signal INHX is set to H level from the CPU via the bus BUS, and the blocking of the first and second permission signals EN1 and EN2 is released. As a result, the first and second enable signals EN1 and EN2 pass through the first gate circuit 3.
[0032]
Therefore, the first and second interrupt signals 10 and 11 are passed or blocked by the second gate circuit 4 according to the first and second permission signals EN1 and EN2.
[0033]
When the inhibition signal INHX becomes H level, the selection register circuit 5 is prohibited from setting selection data.
[0034]
Since the first selection signal SL1 is at the L level, the first interrupt signal 10 passes through the second gate circuit 4 and the fifth gate circuit 8 and passes through the seventh gate as the second interrupt request signal 13 to the CPU. Transferred. Further, since the second selection signal SL2 is at the H level, the second interrupt signal 11 passes through the second gate circuit 4 and the third gate circuit 6 and passes through the fourth gate as the first interrupt request signal 12 to the CPU. Forwarded to
[0035]
Accordingly, since the first selection signal SL1 is at the L level, the first interrupt signal 10 is distributed to the second interrupt request signal 13, and since the second selection signal SL2 is at the H level, the second interrupt signal 11 is the first level. It is distributed to the interrupt request signal 13.
[0036]
This completes the setting of the selection register circuit 5.
[0037]
As described above, when setting and changing the selection signals SL1 and SL2 of the selection register circuit 5, the first and second interrupt signals 10 and 11 inputted in the second gate circuit 4 are cut off. The second interrupt request signals 12 and 13 are not generated, and it is possible to reliably prevent the CPU from performing erroneous interrupt processing.
[0038]
In this embodiment, the case where two interrupt signals are input has been described. However, any number of interrupt signals can be input without any limitation. When an arbitrary plurality of interrupt signals are input, the number of AND gates constituting the first, second, third and fifth gate circuits 3, 4, 6 and 8 may include the arbitrary plural. .
[0039]
The present invention can also be applied to a circuit that distributes one interrupt signal to three or more interrupt request signals.
[0040]
In addition, the permission signal output from the interrupt permission register circuit 1 includes any number of the permission signals. Note that the number of permission signals output from the interrupt permission register circuit 1 includes fewer permission signals than the number of interrupt signals, and a plurality of interrupt signals may be permitted or prohibited for one permission signal. good.
[0041]
In the description of the embodiment, the case where the first gate circuit 3 and the second gate circuit 4 are provided has been described. However, the 2-input AND gate constituting the second gate circuit 4 is configured by a 3-input AND gate. Then, an interrupt signal, a permission signal, and an inhibition signal INHX may be input to the one three-input AND gate.
[0042]
Further, instead of providing the control register 2, detection means for detecting that all the permission signals output from the interrupt permission register circuit 1 are prohibited and that all the permission signals are values indicating inhibition is provided. The setting of the selection register circuit 5 may be permitted according to the output of the detection means.
[0043]
【Effect of the invention】
As described above, according to the present invention, when assigning a plurality of interrupt signals to the first and second interrupt request signals, the CPU can execute the setting of the selection register circuit while preventing erroneous interrupt processing. .
[0044]
In addition, since the selection register circuit is set through the procedure of setting the control register inhibition signal INHX to the L level for inhibiting the interrupt signal input, for example, erroneous setting of the selection register due to a bug in the program can be prevented. There is an effect.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of the present invention.
FIG. 2 is a block diagram showing a conventional example.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Interrupt permission register circuit 2 Control register 3 1st gate circuit 4 2nd gate circuit 5 Selection register circuit 6 3rd gate circuit 7 4th gate 8 5th gate circuit 9 6th gate 10 1st interrupt signal 11 2nd interrupt signal 12 First interrupt request signal 13 Second interrupt request signal

Claims (2)

複数の割り込み信号を受け、CPUに対して、複数の割り込み要求信号を出力する事が可能な割り込み制御回路において、
前記複数の割り込み信号のそれぞれについて、通過状態とするか又は遮断状態とするかを決定する許可データを格納し、前記許可データに応じて第1信号を出力する割り込み許可レジスタと、
前記複数の割り込み信号の全てを遮断状態とするか否かを決定する制御データを格納し、前記制御データに応じて第2信号を出力する制御レジスタと、
前記第2信号が前記複数の割り込み信号の全てを遮断状態とすることを示すときに、前記複数の割り込み信号の全てを遮断状態とするための第3信号を出力し、前記第2信号が前記複数の割り込み信号の全てを遮断状態とすることを示さないときに、前記第1信号をそのまま第3信号として出力するのゲート回路と、
前記第3信号に応じて、前記複数の割り込み信号のそれぞれ毎に、通過状態とするか又は遮断状態とするのゲート回路と、
前記複数の割り込み信号のそれぞれ毎に、どの割り込み要求信号に割り付けるかを決定する選択データを格納し、前記選択データに応じて選択信号を出力する選択レジスタと、
前記選択信号に応じて、前記複数の割り込み信号のそれぞれ毎に、どの割り込み要求信号に割り付けるかを決定する第のゲート回路と、を備え、
前記第2信号が前記複数の割り込み信号の全てを遮断状態とすることを示すときに、前記選択レジスタへの書き込みを許可することで、前記複数の割り込み信号のそれぞれ毎に、どの割り込み要求信号に割り付けるかを変更可能にし、
前記第2信号が前記複数の割り込み信号の全てを遮断状態とすることを示さないときに、前記選択レジスタへの書き込みを禁止することで、前記複数の割り込み信号のそれぞれ毎に、どの割り込み要求信号に割り付けるかを変更不可能にすることを特徴とする割り込み制御回路。
In an interrupt control circuit capable of receiving a plurality of interrupt signals and outputting a plurality of interrupt request signals to the CPU,
For each of the plurality of interrupt signals , an interrupt permission register that stores permission data for determining whether to pass or block and outputs a first signal according to the permission data;
A control register that stores control data for determining whether or not all of the plurality of interrupt signals are to be shut off, and that outputs a second signal according to the control data;
When the second signal indicates that all of the plurality of interrupt signals are in a cutoff state, a third signal for setting all of the plurality of interrupt signals in a cutoff state is output, and the second signal is A first gate circuit that outputs the first signal as it is as a third signal when not indicating that all of the plurality of interrupt signals are to be cut off ;
In response to the third signal, for each of the plurality of interrupt signals, a second gate circuit that is in a passing state or a blocking state ;
A selection register that stores selection data for determining which interrupt request signal is assigned to each of the plurality of interrupt signals, and a selection register that outputs a selection signal according to the selection data;
Depending on the selection signal, for each of said plurality of interrupt signals, comprising a third gate circuit for determining whether allocated to which interrupt request signal, and
When the second signal indicates that all of the plurality of interrupt signals are to be cut off, by allowing writing to the selection register , which interrupt request signal is assigned to each of the plurality of interrupt signals. You can change the assignment or
When the second signal does not indicate that all of the plurality of interrupt signals are to be blocked , writing to the selection register is prohibited, so that which interrupt request signal is generated for each of the plurality of interrupt signals. An interrupt control circuit characterized in that it can not be changed whether it is assigned to the .
前記割り込み許可レジスタと前記選択レジスタと前記制御レジスタは、バスBUSを介して、前記CPUから設定可能であることを特徴とする請求項1記載の割り込み制御回路。2. The interrupt control circuit according to claim 1, wherein the interrupt permission register, the selection register, and the control register can be set from the CPU via a bus BUS.
JP2001253281A 2001-08-23 2001-08-23 Interrupt control circuit Expired - Fee Related JP4911842B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001253281A JP4911842B2 (en) 2001-08-23 2001-08-23 Interrupt control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001253281A JP4911842B2 (en) 2001-08-23 2001-08-23 Interrupt control circuit

Publications (2)

Publication Number Publication Date
JP2003067197A JP2003067197A (en) 2003-03-07
JP4911842B2 true JP4911842B2 (en) 2012-04-04

Family

ID=19081633

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001253281A Expired - Fee Related JP4911842B2 (en) 2001-08-23 2001-08-23 Interrupt control circuit

Country Status (1)

Country Link
JP (1) JP4911842B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01290040A (en) * 1988-05-18 1989-11-21 Fuji Electric Co Ltd Digital signal switching circuit
JPH1173332A (en) * 1997-08-27 1999-03-16 Sony Corp Method and mechanism for controlling interruption
JP3068528B2 (en) * 1997-09-05 2000-07-24 新潟日本電気株式会社 Interrupt request signal control circuit and interrupt mask circuit used therefor

Also Published As

Publication number Publication date
JP2003067197A (en) 2003-03-07

Similar Documents

Publication Publication Date Title
KR102204501B1 (en) A method and apparatus for interrupt handling
US6081867A (en) Software configurable technique for prioritizing interrupts in a microprocessor-based system
EP0827071B1 (en) Multithreaded processor for processing multiple instruction streams independently of each other by flexibly controlling throughput in each instruction stream
US8695002B2 (en) Multi-threaded processors and multi-processor systems comprising shared resources
CN103383651A (en) Semiconductor device
US11366940B2 (en) Secure-aware bus system
US11714647B2 (en) Resource allocation in a multi-processor system
US7328295B2 (en) Interrupt controller and interrupt controlling method for prioritizing interrupt requests generated by a plurality of interrupt sources
KR20110097447A (en) System on chip having interrupt proxy and processing method thereof
EP3814969A1 (en) Peripheral access on a secure-aware bus system
US20180039544A1 (en) Resource access management component and method therefor
JP4911842B2 (en) Interrupt control circuit
JPS6074059A (en) Access control system for storage device
JP5561294B2 (en) Microcomputer
WO2004066150A1 (en) Interrupt control method and interrupt control device
JP2023032307A (en) Virtualization control device and interrupt control method
GB2624384A (en) Exception signalling
KR100731675B1 (en) Interrupt control method and interrupt control device
JPH04211839A (en) Interruption controller
JP5561295B2 (en) Microcomputer
WO2020115455A1 (en) A system and method for handling exception causing events
JP2006236233A (en) Interrupt level selecting circuit
JP2019204365A (en) Arithmetic apparatus and interrupting method
JP2008269548A (en) Microcomputer

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20051227

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080729

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

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100608

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100803

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100824

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101020

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20101101

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20110107

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20110623

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20110623

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111205

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120117

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150127

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150127

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150127

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees