JPH0317137B2 - - Google Patents

Info

Publication number
JPH0317137B2
JPH0317137B2 JP13141783A JP13141783A JPH0317137B2 JP H0317137 B2 JPH0317137 B2 JP H0317137B2 JP 13141783 A JP13141783 A JP 13141783A JP 13141783 A JP13141783 A JP 13141783A JP H0317137 B2 JPH0317137 B2 JP H0317137B2
Authority
JP
Japan
Prior art keywords
interrupt
signal
priority
flip
interrupt request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP13141783A
Other languages
Japanese (ja)
Other versions
JPS6022248A (en
Inventor
Osamu Itoku
Yukio Maehashi
Yukihiro Nishiguchi
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.)
NEC Corp
Original Assignee
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP13141783A priority Critical patent/JPS6022248A/en
Priority to US06/632,190 priority patent/US4807117A/en
Priority to DE8484304947T priority patent/DE3472177D1/en
Priority to EP84304947A priority patent/EP0132161B1/en
Publication of JPS6022248A publication Critical patent/JPS6022248A/en
Publication of JPH0317137B2 publication Critical patent/JPH0317137B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • G06F13/26Handling requests for interconnection or transfer for access to input/output bus using interrupt with priority control

Description

【発明の詳細な説明】 本発明は、割込み制御装置に関し、特に優先順
位がプログラマブルな割込み制御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an interrupt control device, and more particularly to an interrupt control device with programmable priorities.

割込み制御とは、中央処理装置(以下、CPU
という)がプログラム実行中に、何らかの要因に
よつてプログラムの実行を一時中断し、その要因
に応じた処理プログラムの実行を行なうための制
御である。従つて、データ処理システムによつて
種々の割込み要因がある。以下、システムとして
マイクロコンピユタに応用する割込み制御につい
て説明する。
Interrupt control refers to the central processing unit (CPU)
) is a control for temporarily interrupting program execution due to some factor during program execution, and executing a processing program according to the factor. Therefore, there are various interrupt sources depending on the data processing system. Interrupt control applied to a microcomputer as a system will be explained below.

一般に、マイクロコンピユータにおける割込み
要因は外部要因と内部要因に分けることができ
る。外部要因としてはマイクロコンピユータの外
部が特殊な状態になつたことを認識させるための
ものや、外部周辺装置からマイクロコンピユータ
への処理要求などがある。内部要因としては内部
タイマによる設定時間の経過、シリアルデータ転
送の終了時の内蔵周辺機能からのマイクロコンピ
ユータへの処理要求がある。複数の割込みがある
場合、割込みによつてはプログラム処理上割込み
を禁止することが必要な場合もある。この禁止す
ることを“割込みをマスクする”という。
Generally, interrupt factors in a microcomputer can be divided into external factors and internal factors. External factors include those for recognizing that the outside of the microcomputer has entered a special state, and processing requests from external peripheral devices to the microcomputer. Internal factors include elapse of a set time by an internal timer and a processing request to the microcomputer from a built-in peripheral function at the end of serial data transfer. If there are multiple interrupts, it may be necessary to disable some interrupts for program processing. This prohibition is called "masking interrupts."

種々の割込み要因がある時は、複数の要因が同
時に発生したり、あるいは、ある割込み処理中に
更に別の割込み要因が発生したりすることがあ
る。(多重割込み)例えば、内部タイマの割込み
要求とデータ転送終了の割込み要求が同時に起つ
たり、内部タイマ割込み処理中に外部割込み要求
が発生することがある。このような場合は、2種
の割込み処理のいずれかを優先するかが問題とな
る。
When there are various interrupt factors, a plurality of factors may occur simultaneously, or another interrupt factor may occur during a certain interrupt process. (Multiple Interrupts) For example, an internal timer interrupt request and a data transfer end interrupt request may occur simultaneously, or an external interrupt request may occur during internal timer interrupt processing. In such a case, the question becomes which of the two types of interrupt processing should be prioritized.

例えば、内部タイマ割込みと外部割込みがある
場合では、内部タイマを用いてある設定時間ごと
に外部に信号を送り、リアルタイムで外部の装置
を制御する時は、内部タイマ割込みを優先して内
部タイマ割込みが発生すると直ちに外部に信号を
出力しなければ設定時間どおりに外部装置を制御
することができない。また、外部割込みを用いて
高速に外部からのデータを入力する時は、外部割
込みを優先しなければ外部周辺装置の処理要求に
対する対応が遅くなつてしまう。このように、応
用により各種の割込みの優先順位は異なるので、
優先順位は任意に設定できる必要がある。また、
割込み処理中であつても優先順位の高い割込みが
発生すると、その割込み処理プログラムを実行で
きるような構成にする必要がある。
For example, if there is an internal timer interrupt and an external interrupt, the internal timer is used to send a signal to the outside at every set time, and when controlling an external device in real time, the internal timer interrupt is prioritized and the internal timer interrupt is If a signal is not outputted to the outside as soon as this occurs, the external device cannot be controlled at the set time. Furthermore, when inputting data from the outside at high speed using external interrupts, if the external interrupts are not prioritized, response to processing requests from external peripheral devices will be delayed. In this way, the priorities of various interrupts differ depending on the application, so
Priority must be able to be set arbitrarily. Also,
Even during interrupt processing, if a high-priority interrupt occurs, it is necessary to configure the system so that the interrupt processing program can be executed.

ところが従来は優先順位を任意に設定すること
は高価であつたため、低価格のシステムでは割込
み優先順位は各割込み要因ごとに固定されてい
た。そのため応用によつては支障を来たしてい
た。上記の例において、内部タイマ割込みが外部
割込みよりも優先順位が高く固定されていたとす
ると、外部割込みを利用して高速に外部データを
入力する場合では、内部タイマ割込みをマスクし
て優先順位を変更するようにしなければならな
い。すると、内部タイマ割込みが使えないという
欠点があつた。
However, in the past, it was expensive to set the priority order arbitrarily, so in low-cost systems, the interrupt priority order was fixed for each interrupt factor. This has caused problems in some applications. In the above example, if the internal timer interrupt is fixed at a higher priority than the external interrupt, when inputting external data at high speed using an external interrupt, mask the internal timer interrupt and change the priority. You must do so. Then, there was a drawback that internal timer interrupts could not be used.

また、従来は割込み処理中に更に別の割込み要
求があつたときに、優先順位の高いもののみ受け
付けるためには、割込み処理中にはその割込みと
それより優先順位の低い割込みをマスクすること
で対処していた。しかし、この方法では割込み処
理に入る毎にマスクの設定、多重割込み処理に入
る時はマスクの状態の退避とマスクの変更、多重
割込み処理から復帰する時は退避したマスクの復
帰という煩雑な手続きをしなければならない点が
あつた。
In addition, conventionally, when another interrupt request is received during interrupt processing, in order to accept only the one with a high priority, it is necessary to mask that interrupt and interrupts with lower priority during interrupt processing. I was dealing with it. However, this method requires complicated procedures such as setting a mask every time interrupt processing is started, saving the mask state and changing the mask when entering multiple interrupt processing, and restoring the saved mask when returning from multiple interrupt processing. There was something I had to do.

本発明は、上述の点に鑑みてなされたもので、
割込みの受付優先順位を所定の順位に設定、変更
可能で多重割込み処理においても煩雑な手続が不
要なあらゆる応用分野に適する割込み制御装置を
低価格で提供することを目的とする。
The present invention has been made in view of the above points, and
It is an object of the present invention to provide, at a low price, an interrupt control device which is suitable for all application fields and is capable of setting and changing interrupt reception priorities to predetermined orders and does not require complicated procedures even in multiple interrupt processing.

本発明によると、プログラムの操作により内容
が変更可能な割込みの優先順位を指定する優先順
位指定部と、所定の周期で前記優先順位指定部の
内容を優先順位の上位から走査する走査信号と前
記優先順位指定部の内容との一致を検出する検出
部と、割込み発生源が割込み要求を発生したこと
を記憶する割込み要求記憶部と、割込みの要求を
許可又は禁止状態にする割込み要求制御部と、前
記割込み要求記憶部が割込み要求を記憶し前記検
出部が一致を検出し且つ前記割込み要求制御部が
割込み要求を許可状態にしていることを検出する
と割込み受付信号を発生する割込み受付部と、前
記走査信号の発生を制御し且つ割込み受付信号に
基づき受け付けた割込みの優先順位を記憶し
CPUに割込み信号を送出する制御部を含むこと
を特徴とする割込み制御装置が得られる。
According to the present invention, there is provided a priority designation section that designates the priority of an interrupt whose contents can be changed by program operation, a scanning signal that scans the contents of the priority designation section from the top of the priority order at a predetermined cycle, and a detection unit that detects a match with the contents of the priority designation unit; an interrupt request storage unit that stores that the interrupt source has generated an interrupt request; and an interrupt request control unit that enables or disables the interrupt request. an interrupt acceptance unit that generates an interrupt acceptance signal when the interrupt request storage unit stores the interrupt request, the detection unit detects a match, and the interrupt request control unit detects that the interrupt request is enabled; Controls the generation of the scanning signal and stores the priority order of interrupts accepted based on the interrupt acceptance signal.
An interrupt control device is obtained that includes a control section that sends an interrupt signal to a CPU.

本発明の実施例を図面を参照して説明する。第
1図は本発明の一実施例のブロツク図で、ここで
は割込み発生源はA,B,C,Dの4種として説
明する。図中の番号の添字A,B,C,Dはそれ
ぞれ割込み発生源A,B,C,Dからの割込み要
求を処理するのに関与する部分であることを示
す。第1図中の破線で囲まれたそれぞれの割込み
発生源からの割込み要求の処理に関与する部分は
全く同等の構成である。以下、割込み発生源Aか
らの割込み要求を処理する部分について説明す
る。
Embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of one embodiment of the present invention. Here, four types of interrupt generation sources, A, B, C, and D, will be explained. Subscripts A, B, C, and D in the numbers indicate parts involved in processing interrupt requests from interrupt sources A, B, C, and D, respectively. The parts surrounded by broken lines in FIG. 1 that are involved in processing interrupt requests from the respective interrupt sources have exactly the same configuration. The portion that processes the interrupt request from interrupt source A will be described below.

優先順位指定部105−Aには、各々の割込み
の受け付け優先順位をプログラムで制御された信
号を用いて書き込んでおく。制御部101は、優
先順位の上位から優先順位を走査した走査信号1
02を出力する。検出部104−Aはこの走査信
号102と各優先順位指定部105−Aに書き込
まれた優先順位の内容を比較し、一致を検出する
と一致信号109−Aを出力する。割込み受付部
108−Aは一致信号109−Aが出力され、且
つ割込み要求制御部106−Aが割込み要求を許
可状態にし、且つ割込み要求記憶部107−Aが
割込み要求100−Aを記憶していることを検出
すると、割込み受付信号110−Aを出力する。
割込み発生源B,C,Dに対応する部分も全く同
じ働きをする。
The acceptance priority of each interrupt is written in the priority designation unit 105-A using a signal controlled by a program. The control unit 101 generates a scanning signal 1 obtained by scanning the priority order from the highest priority order.
Outputs 02. The detection unit 104-A compares this scanning signal 102 with the priority contents written in each priority designation unit 105-A, and if a match is detected, outputs a match signal 109-A. The interrupt reception unit 108-A outputs the match signal 109-A, the interrupt request control unit 106-A enables the interrupt request, and the interrupt request storage unit 107-A stores the interrupt request 100-A. When detecting that there is an interruption, it outputs an interrupt acceptance signal 110-A.
The parts corresponding to interrupt sources B, C, and D also function in exactly the same way.

次に制御部101の動作を説明する。制御部1
01は、走査信号102を最上位の優先順位のも
のから順に一位ずつ下位の優先順位のものへ変更
し、割込み受付信号110−A,B,C,Dが出
力されていない場合は、走査信号102が最下位
の優先順位のものになると再び最上位の優先順位
のものから走査し続ける。制御部101は割込み
受付信号110−A,B,C,Dのいずれかが出
力されていれば、受け付けた割込みの優先順位を
記憶し、走査信号102が制御部101の記憶し
ている優先順位即ち、受け付けられた割込みの優
先順位に等しくなると、走査信号102を最上位
の優先順位にセツトし、CPUが割込み処理中は
走査信号102を最上位の優先順位から処理中の
割込みの優先順位の間で変化させる。そして、
CPUから割込み処理終了信号113が送られて
くれば、制御部101は記憶している処理中の割
込みの優先順位を変更する。多重割込みから復帰
する時は、復帰先の割込みの優先順位にセツト
し、多重割込みでない時は記憶している優先順位
を消去し、初期の状態になる。
Next, the operation of the control section 101 will be explained. Control part 1
01 changes the scanning signal 102 from the highest priority one to the lowest priority one by one, and if the interrupt acceptance signals 110-A, B, C, and D are not output, the scanning signal 102 is When the signal 102 reaches the lowest priority, scanning continues again starting from the highest priority. If any of the interrupt acceptance signals 110-A, B, C, and D is output, the control unit 101 stores the priority order of the accepted interrupt, and the scanning signal 102 corresponds to the priority order stored in the control unit 101. That is, when the priority level becomes equal to that of the accepted interrupt, the scanning signal 102 is set to the highest priority level, and while the CPU is processing an interrupt, the scanning signal 102 is set from the highest priority level to the priority level of the interrupt being processed. Vary between. and,
When an interrupt processing end signal 113 is sent from the CPU, the control unit 101 changes the stored priority order of the interrupt being processed. When returning from multiple interrupts, the priority is set to that of the interrupt to which the return destination is returned, and if it is not a multiple interrupt, the stored priority is erased and the initial state is returned.

第2図a〜jは本発明の動作を示すタイミング
チヤートである。信号102,109−A,B,
C,D,103はそれぞれ第1図の同一番号の信
号に対応する。信号111は割込み発生源Cから
の割込み要求信号、信号112は割込み発生源B
からの割込み要求信号である。制御部101に記
憶されている記憶データ114は現在処理中の割
込みの優先順位を示す。但し優先順位は0,1,
2,3の順に高いものとする。
FIGS. 2a to 2j are timing charts showing the operation of the present invention. Signals 102, 109-A, B,
C, D, and 103 correspond to the same numbered signals in FIG. 1, respectively. Signal 111 is an interrupt request signal from interrupt source C, signal 112 is interrupt source B
This is an interrupt request signal from Storage data 114 stored in the control unit 101 indicates the priority of the interrupt currently being processed. However, the priority is 0, 1,
Numbers 2 and 3 are higher in order.

第1図と第2図を参照しながら本発明の動作を
説明する。初めにプログラムに制御された信号を
用いて各優先順位指定部に優先順位を書き込む。
今、優先順位指定部105−Aには0が、105
−Bには1が、105−Cには2が、105−D
には3が書き込まれたとする。割込み要求が無い
時、又は割込みが禁止されている時は、走査信号
102が0,1,2,3と変化すると一致信号1
09−A,B,C,Dは各々第2図のPの期間の
ように変化する。
The operation of the present invention will be explained with reference to FIGS. 1 and 2. First, a priority is written in each priority designation section using signals controlled by the program.
Now, 0 is in the priority order specification section 105-A, 105
-B has 1, 105-C has 2, 105-D
Assume that 3 is written in . When there is no interrupt request or when interrupts are disabled, when the scanning signal 102 changes from 0, 1, 2, 3, the coincidence signal 1 is generated.
09-A, B, C, and D each change like the period P in FIG.

ここでタイミングT1で割込み発生源Cから割
込み要求があり、その割込みが許可されていたと
する。タイミングT2で走査信号102が2とな
り一致信号109−Cが発生すると、割込みが受
け付けられCPUに割込み信号103が送られる。
この時、受け付けた割込みの優先順位2を制御部
101が記憶する(記憶データ114)。割込み
が受け付けられ、CPUが優先順位2の割込み処
理実行中は、走査信号102は記憶データ114
と等しくなれば、再び0に戻り(タイミング
T3)、優先順位0,1,2の割込みのみ受付可能
とする。
Here, it is assumed that an interrupt request is received from the interrupt source C at timing T1 , and the interrupt is permitted. When the scanning signal 102 becomes 2 at timing T2 and a coincidence signal 109-C is generated, an interrupt is accepted and an interrupt signal 103 is sent to the CPU.
At this time, the control unit 101 stores the priority level 2 of the accepted interrupt (stored data 114). When an interrupt is accepted and the CPU is executing interrupt processing with priority level 2, the scanning signal 102 is transmitted to the stored data 114.
If it becomes equal to , it returns to 0 again (timing
T 3 ), only interrupts with priorities 0, 1, and 2 can be accepted.

次にタイミングT4で高順位の割込み要求が割
込み発生源Bから起こつたとする。Bからの割込
みが許可されていたならば、走査信号102が1
になり一致信号109−Bが発生する。タイミン
グT5で割込みが受け付けられCPUに割込み信号
103が送られる。そして記憶データ114は2
から1へ変化する。走査信号102は1になると
再び0に戻り(タイミングT6)、優先順位0,1
の割込みのみ受け付け可能となる。
Next, assume that a high-order interrupt request occurs from interrupt source B at timing T4 . If interrupts from B were enabled, the scanning signal 102 would be 1.
Then, a coincidence signal 109-B is generated. At timing T5, the interrupt is accepted and an interrupt signal 103 is sent to the CPU. And the stored data 114 is 2
Changes from to 1. When the scanning signal 102 becomes 1, it returns to 0 again (timing T6), and the priorities are 0 and 1.
Only interrupts can be accepted.

多重割込み処理が終了し、CPUから信号11
3が送られると(タイミングT7)、記憶データ1
14は1から2へ変化し、走査信号102は0,
1,2と変化するようになり、優先順位0,1,
2の割込みが受け付け可能となる。
When multiple interrupt processing is completed, signal 11 is sent from the CPU.
When 3 is sent (timing T7), memory data 1
14 changes from 1 to 2, and the scanning signal 102 changes from 0 to 2.
The priority will change to 1, 2, and the priority will be 0, 1,
2 interrupts can now be accepted.

割込み発生源Cの割込み処理も終了し、CPU
から信号113が送られると(タイミングT8)、
記憶データ114は消滅し、すべての割込みが受
け付け可能な初期の状態に戻る。
The interrupt processing for interrupt source C has also finished, and the CPU
When signal 113 is sent from (timing T8),
The stored data 114 disappears and returns to the initial state in which all interrupts can be accepted.

次に本発明の第1図に示す実施例の具体的な回
路例を第3図に示す。第3図は第1図の104−
A,105−A,106−A,107−A,10
8−Aの部分の一例の回路図である。R・S−フ
リツプフロツプ301−A,302−Aはそれぞ
れ優先順位を2ビツトで表わした時の上位ビツ
ト、下位ビツトを記憶するフリツプフロツプで、
一組となり優先順位指定部105−Aを構成す
る。
Next, a specific circuit example of the embodiment shown in FIG. 1 of the present invention is shown in FIG. Figure 3 is 104- in Figure 1.
A, 105-A, 106-A, 107-A, 10
FIG. 8 is a circuit diagram of an example of a portion 8-A. R.S. flip-flops 301-A and 302-A are flip-flops that store the upper bit and lower bit when the priority is expressed in 2 bits, respectively.
They form a set and constitute a priority order designation section 105-A.

優先順位の値はプログラムによつてCPU30
0から信号310−A,311−Aを用いて書き
込みがプログラマブルである。信号102−1,
102−2は走査信号102を2ビツトとした時
の上位ビツト,下位ビツトである。
The priority value is set to CPU30 depending on the program.
Writing is programmable from 0 using signals 310-A and 311-A. signal 102-1,
102-2 is the upper bit and lower bit when the scanning signal 102 is 2 bits.

排他オアゲート305−A,306−Aはそれ
ぞれ優先順位の上位ビツトと走査信号の上位ビツ
ト102−1、優先順位の下位ビツトと走査信号
の下位ビツト102−2とを各々独立に比較し、
一致すれば論理値“0”を出力する。従つて、優
先順位と走査信号102が等しい時ノアゲート3
07−Aが一致信号109−Aとして論理値
“1”を出力する。この排他オアゲート2個とノ
アゲート1個で検出部104−Aを構成してい
る。
Exclusive OR gates 305-A and 306-A independently compare the upper bits of the priority order with the upper bits 102-1 of the scanning signal, and the lower bits of the priority order and the lower bits 102-2 of the scanning signal, respectively.
If they match, a logical value of "0" is output. Therefore, when the priority and the scanning signal 102 are equal, the NOR gate 3
07-A outputs a logic value "1" as a match signal 109-A. The two exclusive OR gates and one NOR gate constitute the detection section 104-A.

R・S−フリツプフロツプ303−Aは割込み
マスクレジスタで、割込み要求制御部106−A
に相当し、割込みをマスクする時は信号312−
Aを用いてフリツプフロツプ303−Aをセツ
ト、マスクしない時はリセツトする。フリツプフ
ロツプ304−Aは割込み要求フラグで、割込み
発生源から割込み要求信号313−Aが送られれ
ばセツトされ、割込み要求が発生していない時、
又はアンドゲート308−Aの出力が“1”の時
リセツトされる。この割込み要求フラグ304−
Aが割込み要求記憶部107−Aに対応する。
The R/S flip-flop 303-A is an interrupt mask register, and the interrupt request controller 106-A
corresponds to signal 312- when masking interrupts.
A is used to set flip-flop 303-A, and when not masked, reset it. Flip-flop 304-A is an interrupt request flag, which is set when an interrupt request signal 313-A is sent from the interrupt source, and when no interrupt request is generated.
Or, it is reset when the output of AND gate 308-A is "1". This interrupt request flag 304-
A corresponds to the interrupt request storage section 107-A.

108−Aはアンドゲートで、一致信号109
−Aが論理値“1”、且つマスクレジスタである
R・S−フリツプフロツプ303−Aがリセツト
され、且つ割込み要求フラグがセツトされている
時割込み受付信号110−Aを出力する。このア
ンドゲートが割込み受付部108−Aを構成す
る。
108-A is an AND gate, and a match signal 109
When -A has a logical value of "1", the R.S. flip-flop 303-A, which is a mask register, is reset and the interrupt request flag is set, an interrupt acceptance signal 110-A is output. This AND gate constitutes the interrupt reception section 108-A.

ベクタ発生部309−AはCPU300から割
込み確認信号314が送られると受け付けられた
割込みのベクタ番地313−AをCPU300に
出力する。割込み要求フラグ304−Aは、割込
み受付信号110−Aが“1”且つ、割込み確認
信号314が“1”の時、アンドゲート308−
Aの出力によりリセツトされる。
When the vector generation unit 309-A receives the interrupt confirmation signal 314 from the CPU 300, it outputs the vector address 313-A of the accepted interrupt to the CPU 300. The interrupt request flag 304-A is set to the AND gate 308-A when the interrupt acceptance signal 110-A is "1" and the interrupt confirmation signal 314 is "1".
It is reset by the output of A.

第4図は第1図の実施例中の制御部101の1
例の回路図を示す。信号102−1,102−2
はそれぞれT−フリツプフロツプ401と402
の出力である。信号102−2はクロツク信号4
03の立下りエツジで反転し、号102−1は信
号102−2の立下りエツジで反転する。すなわ
ち、T−フリツプフロツプ401,402はクロ
ツク信号403をカウントする4進カウンタであ
る。信号102−1,102−2はそれぞれ走査
信号102の上位ビツト、下位ビツトを表わす。
T−フリツプフロツプ401,402で構成され
る前記4進カウンタは、ノアゲート404の出力
が論理値“1”になるとリセツトされる。
FIG. 4 shows 1 of the control section 101 in the embodiment of FIG.
An example circuit diagram is shown. Signal 102-1, 102-2
are T-flip-flops 401 and 402, respectively.
This is the output of Signal 102-2 is clock signal 4
The signal 102-1 is inverted at the falling edge of signal 102-2. That is, T-flip-flops 401 and 402 are quaternary counters that count clock signal 403. Signals 102-1 and 102-2 represent the upper and lower bits of the scanning signal 102, respectively.
The quaternary counter constituted by T-flip-flops 401 and 402 is reset when the output of NOR gate 404 becomes logic "1".

割込み受付信号110−A,B,C,Dのいず
れかが出力されるとオアゲート405の出力であ
る割込み信号103が“1”となる。この時、信
号102−1,102−2共に“0”の時は、ア
ンドゲート406の出力が“1”となるので、
R・S−フリツプフロツプ407がセツトされ
る。同様に信号102−1が“0”、信号102
−2が“1”の時は、アンドゲート408の出力
が“1”となるのでR・S−フリツプフロツプ4
09がセツトされ、信号102−1が“1”、信
号102−2が“0”の時はアンドゲート410
の出力が“1”となるのでR・S−フリツプフロ
ツプ411がセツトされ、信号102−1,10
2−2共に“1”の時はアンドゲート412の出
力が“1”となるのでR・S−フリツプフロツプ
113がセツトされる。
When any of the interrupt acceptance signals 110-A, B, C, and D is output, the interrupt signal 103, which is the output of the OR gate 405, becomes "1". At this time, when the signals 102-1 and 102-2 are both "0", the output of the AND gate 406 becomes "1", so
R.S-flip-flop 407 is set. Similarly, the signal 102-1 is "0", and the signal 102-1 is "0".
-2 is “1”, the output of the AND gate 408 is “1”, so the R/S flip-flop 4
09 is set, and when the signal 102-1 is "1" and the signal 102-2 is "0", the AND gate 410
Since the output of
When both 2-2 are "1", the output of the AND gate 412 becomes "1", so the R.S. flip-flop 113 is set.

割込みが受け付けられ、割込み信号103が
“1”になると、その割込みの優先順位に対応す
るR・S−フリツプフロツプ407,409,4
11,413のうちの1個がセツトされる。R・
S−フリツプフロツプ407,409,411,
413はそれぞれ優先順位0,1,2,3の割込
みが受け付けられたことを示している。割込み信
号103によつて、T−フリツプフロツプ401
へのクロツク425の供給をアンドゲート424
で禁止する。
When an interrupt is accepted and the interrupt signal 103 becomes "1", the R/S flip-flops 407, 409, 4 corresponding to the priority of the interrupt are activated.
One of 11,413 is set. R・
S-flip-flop 407, 409, 411,
413 indicates that interrupts with priorities 0, 1, 2, and 3 have been accepted, respectively. The interrupt signal 103 causes the T-flip-flop 401 to
The clock 425 is supplied to the AND gate 424.
prohibited.

アンドゲート414,415,416,41
7,オアゲート418は受け付け中の割込みの優
先順位と走査信号102が等しくなつた時、T−
フリツプフロツプ401,402をリセツトする
信号を出力する。但し、割込み信号103が
“1”の期間はアンドゲート423によつてリセ
ツトを禁止する。R・S−フリツプフロツプ40
7がリセツトされ、R・S−フリツプフロツプ4
09がセツトされている時、すなわち優先順位1
の割込み処理中の場合には、信号102−1が
“0”、102−2が“1”になると、割込み信号
103が“0”になつた時T−フリツプフロツプ
401,402がリセツトされ信号102−1,
102−2共に“0”となる。
And gate 414, 415, 416, 41
7. When the priority of the interrupt being accepted and the scanning signal 102 become equal, the OR gate 418 outputs T-
A signal for resetting flip-flops 401 and 402 is output. However, while the interrupt signal 103 is "1", the AND gate 423 prohibits resetting. R・S-Flip Flop 40
7 is reset and R.S. flip-flop 4 is reset.
When 09 is set, that is, priority 1
During interrupt processing, if the signal 102-1 becomes "0" and the signal 102-2 becomes "1", when the interrupt signal 103 becomes "0", the T-flip-flops 401 and 402 are reset and the signal 102 becomes "0". -1,
102-2 both become "0".

次に受け付け中の割込みの優先順位を示すR・
S−フリツプフロツプ407,409,411,
413のリセツト動作について説明する。割込み
終了信号113が“1”になるとR・S−フリツ
プフロツプ407がセツトされている時はR・S
−フリツプフロツプ407はリセツトされる。
R・S−フリツプフロツプ407がリセツトされ
ている時は、アンドゲート419の出力が“1”
となるのでR・S−フリツプフロツプ409がリ
セツトされる。R・S−フリツプフロツプ40
7,409ともにリセツトされている時は、アン
ドゲート420の出力が“1”となるのでR・S
−フリツプフロツプ411がリセツトされる。
R・S−フリツプフロツプ407,409,41
1がすべてリセツトされている時はアンドゲート
421の出力が“1”となるのでR・S−フリツ
プフロツプ413がリセツトされる。このように
割込み終了信号113が“1”となると、受け付
けられている割込みの優先順位を示すR・S−フ
リツプフロツプの中の最も順位の高いものを示す
R・S−フリツプフロツプから順にリセツトされ
る。
Next, R・ indicates the priority of the interrupt currently being accepted.
S-flip-flop 407, 409, 411,
The reset operation of 413 will be explained. When the interrupt end signal 113 becomes "1", the R.S. flip-flop 407 is set.
- Flip-flop 407 is reset.
When the R.S. flip-flop 407 is reset, the output of the AND gate 419 is "1".
Therefore, the R.S. flip-flop 409 is reset. R・S-Flip Flop 40
When both 7 and 409 are reset, the output of AND gate 420 becomes "1", so R.S.
- Flip-flop 411 is reset.
R・S-Flip Flop 407, 409, 41
When all 1's have been reset, the output of AND gate 421 becomes "1", so R.S. flip-flop 413 is reset. When the interrupt end signal 113 becomes "1" in this way, the R.S. flip-flops indicating the highest priority among the R.S. flip-flops indicating the priority of the accepted interrupts are reset in order.

本発明によると、割込みの受付優先順位を所定
の順位に設定、変更可能で多重割込み処理におい
ても煩雑な手続が不要なあらゆる応用分野に適す
る割込み制御装置が得られる。
According to the present invention, it is possible to obtain an interrupt control device that is suitable for all kinds of application fields, which can set and change the interrupt reception priority order to a predetermined order, and which does not require complicated procedures even in multiple interrupt processing.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明の一実施例のブロツク図、第
2図a〜jはその動作のタイミングチヤート、第
3図は第1図の実施例中の優先順位指定部、割込
み受付制御部、割込み要求記憶部、検出部、割込
み受付部の一例の回路図、第4図は第1図の実施
例中の制御部の1例の回路図である。 101……制御部、104A〜D……検出部、
105A〜D……優先順位指定部、106A〜D
……割込み要求制御部、107A〜D……割込み
要求記憶部、108A〜D……割込み受付部。
FIG. 1 is a block diagram of an embodiment of the present invention, FIGS. 2 a to j are timing charts of its operation, and FIG. 3 shows a priority designation section, an interrupt acceptance control section, FIG. 4 is a circuit diagram of an example of an interrupt request storage section, a detection section, and an interrupt acceptance section. FIG. 4 is a circuit diagram of an example of a control section in the embodiment of FIG. 101...Control unit, 104A-D...Detection unit,
105A-D...Priority designation section, 106A-D
...Interrupt request control unit, 107A-D...Interrupt request storage unit, 108A-D...Interrupt reception unit.

Claims (1)

【特許請求の範囲】[Claims] 1 割込みの優先順位を指定する優先順位指定部
と、所定の周期で前記優先順位指定部の内容を優
先順位の高位から走査する走査信号と前記優先順
位指定部の内容との一致を検出する検出部と、割
込み発生源が割込み要求を発生したことを記憶す
る割込み要求記憶部と、前記割込み要求記憶部が
割込み要求を記憶しかつ前記検出部が一致を検出
しているときに割込み受付信号を発生する割込み
受付部と、前記走査信号の発生を制御し且つ割込
み受付信号に基づき受け付けた割込みの優先順位
を記憶し中央制御装置に割込み信号を送出する制
御部とを含むことを特徴とする割込み制御装置。
1. A priority designation section that specifies the priority of an interrupt, and a detection device that detects a match between the content of the priority designation section and a scanning signal that scans the contents of the priority designation section from the highest priority level at a predetermined cycle. an interrupt request storage unit that stores information that an interrupt source has generated an interrupt request; and an interrupt request storage unit that stores an interrupt request and outputs an interrupt acceptance signal when the detection unit detects a match. An interrupt reception unit that generates an interrupt, and a control unit that controls the generation of the scanning signal, stores the priority order of the accepted interrupt based on the interrupt reception signal, and sends the interrupt signal to a central control unit. Control device.
JP13141783A 1983-07-19 1983-07-19 Interruption controller Granted JPS6022248A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP13141783A JPS6022248A (en) 1983-07-19 1983-07-19 Interruption controller
US06/632,190 US4807117A (en) 1983-07-19 1984-07-19 Interruption control apparatus
DE8484304947T DE3472177D1 (en) 1983-07-19 1984-07-19 Apparatus for controlling a plurality of interruption processings
EP84304947A EP0132161B1 (en) 1983-07-19 1984-07-19 Apparatus for controlling a plurality of interruption processings

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13141783A JPS6022248A (en) 1983-07-19 1983-07-19 Interruption controller

Publications (2)

Publication Number Publication Date
JPS6022248A JPS6022248A (en) 1985-02-04
JPH0317137B2 true JPH0317137B2 (en) 1991-03-07

Family

ID=15057472

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13141783A Granted JPS6022248A (en) 1983-07-19 1983-07-19 Interruption controller

Country Status (1)

Country Link
JP (1) JPS6022248A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0789323B2 (en) * 1985-12-20 1995-09-27 日本電気株式会社 Multiple interrupt control method
JPH0488497U (en) * 1990-12-14 1992-07-31

Also Published As

Publication number Publication date
JPS6022248A (en) 1985-02-04

Similar Documents

Publication Publication Date Title
US5630172A (en) Data transfer control apparatus wherein an externally set value is compared to a transfer count with a comparison of the count values causing a transfer of bus use right
EP0443557B1 (en) Interrupt controller capable of realizing interrupt nesting function
US5815733A (en) System for handling interrupts in a computer system using asic reset input line coupled to set of status circuits for presetting values in the status circuits
US5072365A (en) Direct memory access controller using prioritized interrupts for varying bus mastership
US4807117A (en) Interruption control apparatus
US6115767A (en) Apparatus and method of partially transferring data through bus and bus master control device
JP2854474B2 (en) Bus use request arbitration device
JPH0317137B2 (en)
US5291606A (en) Interrupt control unit
CN110221861B (en) CPU register system structure and interrupt processing method thereof
JPS594733B2 (en) Kyoutsuba Seigiyo Cairo
JP3105554B2 (en) Interrupt controller
JPH01214939A (en) Single-chip microcomputer
JPH0443302B2 (en)
JP3093374B2 (en) Interrupt controller
EP0454096B1 (en) Interrupt control circuit and microcomputer system comprising the same
JP2761524B2 (en) Parallel priority determination device
JP2635863B2 (en) Central processing unit
JP2001117862A (en) Microcomputer
JPS6342547A (en) Line control unit
JPH06332727A (en) Interruption requesting method
JPH04309134A (en) Interruption control circuit
JPH0376495B2 (en)
JPH0229993A (en) Initializing circuit for dual port ram
JPH05189246A (en) Interruption expansion system