JPS5998256A - Interruption controller - Google Patents

Interruption controller

Info

Publication number
JPS5998256A
JPS5998256A JP20699382A JP20699382A JPS5998256A JP S5998256 A JPS5998256 A JP S5998256A JP 20699382 A JP20699382 A JP 20699382A JP 20699382 A JP20699382 A JP 20699382A JP S5998256 A JPS5998256 A JP S5998256A
Authority
JP
Japan
Prior art keywords
interrupt
interruption
maskable
flag
processing
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.)
Granted
Application number
JP20699382A
Other languages
Japanese (ja)
Other versions
JPH0226245B2 (en
Inventor
Hideyo Kanayama
金山 英世
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
NEC Corp
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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP20699382A priority Critical patent/JPS5998256A/en
Publication of JPS5998256A publication Critical patent/JPS5998256A/en
Publication of JPH0226245B2 publication Critical patent/JPH0226245B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bus Control (AREA)

Abstract

PURPOSE:To distinguish easily a maskable interruption and a non-maskable interruption from each other, by providing a means which accepts and processes the non-maskable interruption without the influence upon the state of an interruption permission flag for the maskable interruption. CONSTITUTION:When a non-maskable interruption request signal INT0 is applied, an interruption request flag RQ30 is set. Therefore, a flag EI30 indicating the interruption execution is set, and an OR32 is set to 1 through an FFEX30, and the interruption processing is executed. Since other interruption are inhibited during the execution of the interruption processing, an interruption permission flag EI31 is not changed, and a return instruction RT1 is executed without executing an instruction EI after the execution of the interruption processing, and the control is returned to the original routine. When the instruction RTI is executed, the flag EI30 indicating the execution of the interruption processing for INT0 is reset, and it is determined by the output of the interruption permission flag EI31 whether other interruptions are permitted or not.

Description

【発明の詳細な説明】 この発明は、割込制御装置に関し、特にマイクロ・コン
ピュータ等で用いられる割込制御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an interrupt control device, and particularly to an interrupt control device used in a microcomputer or the like.

近年1個の半導体基板上に記憶装置、タイマ・カウンタ
、シリアル送受信機能等積々の機能を備えたマイクロ・
コンビエータが提供され、各種制御機器等いろいろな用
途に使用されるようになった。このようないわゆるシン
グルチップΦマイクロ・コンピュータにおいては、あら
かじめタイマ・カウンタに設定された時間ごとにCPU
 に割込要求信号を出力し、優先的に定められた処理を
その都度実行させたシ、外部からの割込要求信号によシ
所定の処理を優先して実行させる、いわゆる割込処理が
知られている。これらの割込にはCPUからの命令で割
込許可フラグをリセットすることによシマスフする(即
ち割込を受付けないようにする)ことが可能なマスカブ
ル割込と、マスク不可能なノンマスカブル割込(例えば
緊急割込等)とがある。従来、いずれの割込が発生した
場合でも、割込受付は時に割込許可7ラグ〜をリセット
していた。そのため、ノンマスカブル割込処理実行後身
前の処理70−へ復帰する場合、この割込許可フラグを
セットすればよいのかそれともリセットするのかの判断
が不可能であった。従って、記憶装置内に割込許可フラ
グに相当するフラグを設け、これをン7トウェア的に処
理するより他に方法がなく、プログラムが煩雑となった
シ、割込処理に要する時間が長くなるという欠点があっ
た。
In recent years, microcontrollers have been equipped with numerous functions such as storage devices, timers/counters, and serial transmission/reception functions on a single semiconductor substrate.
Combiators were introduced and came to be used for various purposes such as various control equipment. In such a so-called single-chip Φ microcomputer, the CPU
The so-called interrupt processing is known in which a predetermined process is executed preferentially each time by outputting an interrupt request signal to the external interrupt request signal. It is being These interrupts include maskable interrupts that can be masked (i.e., not accepted) by resetting the interrupt enable flag with a command from the CPU, and non-maskable interrupts that cannot be masked. (For example, emergency interruption, etc.) Conventionally, no matter which interrupt occurs, interrupt acceptance sometimes resets the interrupt permission 7 lag. Therefore, when returning to the previous process 70- after executing the non-maskable interrupt process, it is impossible to determine whether to set or reset the interrupt permission flag. Therefore, there is no other way than to provide a flag equivalent to the interrupt permission flag in the storage device and process it software-wise, which makes the program complicated and increases the time required for interrupt processing. There was a drawback.

この発明はマスク可能な割込とマスク不可能な割込とを
容易に区別することができ、これらの割込の終了後の復
帰が簡単な割込制御装置を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide an interrupt control device that can easily distinguish maskable interrupts from non-maskable interrupts, and that can easily return to normal mode after these interrupts are completed.

本発明はマスカブル割込に対する割込許可フラグの状態
に影響を及はすことなくノンマスカブル割込を受は付け
、これを処理する手段を設けたことを特徴とする。
The present invention is characterized by providing means for accepting and processing non-maskable interrupts without affecting the state of the interrupt permission flag for maskable interrupts.

以下この発明を図面を用いてその一実施例について説明
する。
An embodiment of the present invention will be described below with reference to the drawings.

まず従来の割込制御装置のブロック図を示した第1図に
ついて説明する。INTO〜INTnは割込要求信号で
あり、RQIO〜RQ1nは割込要求フラグで、EII
Iは割込許可フラグであシ、それぞれセット・リセット
型フリップフロップである。
First, FIG. 1 showing a block diagram of a conventional interrupt control device will be described. INTO~INTn are interrupt request signals, RQIO~RQ1n are interrupt request flags, and EII
I is an interrupt permission flag, and each is a set/reset type flip-flop.

MKII〜MKInは割込マスクレジスタ、人10〜A
lnはアンドゲート、PRIIは優先順位回路、OR,
11・0R12はオアゲート、EXIIはDタイプ・ス
リップ70ツブである。INTOはノンマスカブル割込
であ!D、lNTl〜I N T nはマスカブル割込
である。第2図は割込処理シーケンスを示す。まずマス
クレジスタMK 11〜MKnを論理“0″(以下、“
0″と略す)に設定し、EI  (割込許可)命令によ
シ割込許可フラグEIIIをセットする。
MKII~MKIn are interrupt mask registers, person 10~A
ln is an AND gate, PRII is a priority circuit, OR,
11/0R12 is an or gate, and EXII is a D type slip 70 tube. INTO is a non-maskable interrupt! D, INTl to INTn are maskable interrupts. FIG. 2 shows the interrupt processing sequence. First, mask registers MK11 to MKn are set to logic “0” (hereinafter “
0''), and the interrupt enable flag EIII is set by the EI (interrupt enable) instruction.

これによシ、全ての割込が有効となる。次に、lNTl
の割込要求信号が印加されるとRQIIがセットされ、
RQIIのQ出力が論理“1″(以下“1″と略す)、
アンドゲートA11が “1″、優先順位回路P几11
の011.0100及びアントゲ−)AIO、オアゲー
)OR12が“1″となシフリップフロップEXIIに
読み込まれ、割込処理が実行される。ここで優先順位回
路PRLIの011出力が“1”となるため、7リツプ
フロツプRQIIはリセットされ、次の割込要求信号の
待機状態となる。また割込許可フラグEIIIは、7リ
ツプフロツプEXII出力によシ自動的にリセットされ
、ノンマスカブル割込INTO以外の割込が禁示される
。割込処理実行が完了し、EI命令、RTI(復帰)命
令を実行後もとのルーチンに復帰する。
This enables all interrupts. Next, lNTl
When the interrupt request signal is applied, RQII is set,
The Q output of RQII is logic “1” (hereinafter abbreviated as “1”),
AND gate A11 is “1”, priority circuit P11
011.0100 and ``1'' of ``1'' and ``1'' are read into the shift flip-flop EXII, and interrupt processing is executed. Since the 011 output of the priority circuit PRLI becomes "1", the 7 lip-flop RQII is reset and enters a waiting state for the next interrupt request signal. Furthermore, the interrupt enable flag EIII is automatically reset by the output of the 7 lip-flop EXII, and interrupts other than the non-maskable interrupt INTO are prohibited. After the execution of the interrupt process is completed and the EI instruction and RTI (return) instruction are executed, the original routine is returned.

しかし、ノンマスカブル割込INTOは、フリップフロ
ップEIIIの状態によらず、割込処理が実行。
However, for the non-maskable interrupt INTO, interrupt processing is executed regardless of the state of flip-flop EIII.

され、それによってフリップフロップEIIIはリセッ
トされる。このためINTOに対応する割込処理実行後
、EI命令あるいはDI(割込禁示)命令のどちらを実
行してRTI 命令によりもとのルーチンに復帰するか
、判断が不可能であった。また、記憶装置(図示せず)
内に割込許可フラグEIIIに相当するフラグを設け、
ソフトウェア的に処理する方法もあるが、プログラムが
非常に煩雑となったシ、割込処理実行に要する時間が長
くなるという欠点があった。第3図は、この発明の一実
施例を示すブロック図であり、N個の割込要求信号に対
応する割込要求フラグと、割込要求フラグの出力を抑制
するN個よシ少ない割込抑制レジスタと、N個の割込順
位を決定する優先順位回路と、割込抑制レジスタによシ
抑制される全ての割込要求を抑制する2うの手段とを有
する割込制御装置である。RQ 30−RQ 3 nは
割込要求フラグ、EI30はノンマスカブル割込INT
Oの割込処理実行中を示すフラグ、EI31は割込許可
フラグを示し、それぞれセット・リセット型フリップフ
ロップである。MK31〜MK3nは割込マスクレジス
タ、A30〜A3nはアントゲ−)、PR31は優先順
位回路、0R31・0R32はオアゲート、EX30・
EX31はDタイプフリップフロップである。第4図は
ノンマスカブル割込INTOの処理シーケンスを示す。
, thereby resetting flip-flop EIII. Therefore, after execution of the interrupt process corresponding to INTO, it is impossible to determine whether to execute the EI instruction or the DI (interrupt inhibit) instruction and return to the original routine using the RTI instruction. Also, a storage device (not shown)
A flag corresponding to the interrupt permission flag EIII is provided in
Although there is a method of processing the interrupt using software, it has the drawbacks that the program becomes extremely complicated and the time required to execute the interrupt processing increases. FIG. 3 is a block diagram showing an embodiment of the present invention, in which interrupt request flags corresponding to N interrupt request signals and fewer than N interrupts for suppressing the output of the interrupt request flags are shown. This interrupt control device has a suppression register, a priority circuit that determines the order of N interrupts, and two means for suppressing all interrupt requests suppressed by the interrupt suppression register. RQ 30-RQ 3 n is an interrupt request flag, EI30 is a non-maskable interrupt INT
A flag indicating that interrupt processing is being executed at O and an interrupt permission flag at EI31 are set/reset type flip-flops. MK31 to MK3n are interrupt mask registers, A30 to A3n are analogue), PR31 is a priority circuit, 0R31 and 0R32 are OR gates, EX30 and
EX31 is a D type flip-flop. FIG. 4 shows the processing sequence of the non-maskable interrupt INTO.

INTOの割込要求信号が印加されると、割込要求フラ
グRQ30がセットされ、Q出力が“1″となシ、割込
実行中7ラグEI30がセットされるとともに7リツプ
フロツプEX30に読込まれる。フリップ70ツグEX
30の出力を受け、オアゲート0R32が“1″となシ
、割込処理が実行される。
When the INTO interrupt request signal is applied, the interrupt request flag RQ30 is set, the Q output is "1", and the interrupt execution 7 lag EI30 is set and read into the 7 lip-flop EX30. . flip 70 tsugu EX
In response to the output of 30, the OR gate 0R32 becomes "1" and interrupt processing is executed.

また優先順位回路PR31の030が“1″ となシ割
込要求フジグRQ30がリセットされる。ここで、割込
処理実行中7ラグEI30はセット状態であるため、他
の割込は禁示されアントゲ−トA30  出力は“0″
となる。割込許可フラグEI31は、ノンマスカブル割
込INTOの割込時に変化しないため、割込処理実行後
EI命令を実行せず、RTI命令実打抜、もとのルーチ
ンに復帰する。またRTI 命令実行時、INTO割込
処理実行中7ラグEI30はリセットされ、割込許可フ
ラグEI31の出力によシ他の割込の許可、不許可が決
まる。
Furthermore, when 030 of the priority circuit PR31 becomes "1", the interrupt request request RQ30 is reset. Here, since the 7-lag EI30 is set while the interrupt process is being executed, other interrupts are prohibited and the output of the ant gate A30 is "0".
becomes. Since the interrupt permission flag EI31 does not change at the time of the non-maskable interrupt INTO, the EI instruction is not executed after execution of the interrupt processing, the RTI instruction is actually executed, and the original routine is returned. Furthermore, when the RTI instruction is executed, the INTO interrupt processing execution lag EI30 is reset, and whether other interrupts are enabled or disabled is determined by the output of the interrupt enable flag EI31.

このように、ノンマスカブル割込処理実行時、割込許可
フラグに影響を与えない(すなわちリセットしない)た
め、ノンマスカブル割込処理実行後もとのルーチンに復
帰してもマスカブル割込許可フックは変化しない。
In this way, when non-maskable interrupt processing is executed, the interrupt enable flag is not affected (that is, it is not reset), so even if the original routine is returned after non-maskable interrupt processing is executed, the maskable interrupt enable hook does not change. .

以上の説明で明らかなように、この発明によれば、ノン
マスカブル割込処理実行後EI命令あるいはDI命令の
どちらの命令を実行するかの判断が全く不要である。ま
た記憶装置内に割込許可フラグに相当するフラグを設け
、ソフトウェア的に処理する必要がないため、プログラ
ム作成が容易であり、割込処理実行時間が短縮される。
As is clear from the above description, according to the present invention, there is no need to judge which instruction to execute, the EI instruction or the DI instruction, after execution of non-maskable interrupt processing. Further, since there is no need to provide a flag corresponding to an interrupt permission flag in the storage device and perform software processing, program creation is easy and interrupt processing execution time is shortened.

従って、マイクロコンピュータ等の情報処理装置に摘要
した場谷、非常に有効で汎用性の高い割込制御装置を提
供することができる。
Therefore, it is possible to provide a highly effective and highly versatile interrupt control device for information processing devices such as microcomputers.

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

第1図は、従来の割込制御装置を示すブロック図、第2
図は第1図を説明するだめの割込シーケンス図、第3図
はこの発明の一実施例を示すブロック図、第4図は第3
図を説明するための割込シーケンス図である。 RQIO〜RQ1n、EIII 、RQ30〜RQ3n
。 EI30.EI31・・・−セット・リセット型フリッ
プフロップ、MKll 〜MKIn、MK31〜MK3
n−−レジスタ、EXll 、EX30 、EX31・
・・・・・Dタイプフリップフロップ、Al O〜A1
 n 、 A30〜A3n −・・・アンドゲート、0
R11,0R12,0几31,0R32・・・・・・オ
アゲー)、PRII 、PR31・・・・・・優先順位
回路。
FIG. 1 is a block diagram showing a conventional interrupt control device, and FIG.
1 is an interrupt sequence diagram for explaining FIG. 1, FIG. 3 is a block diagram showing an embodiment of the present invention, and FIG.
FIG. 3 is an interrupt sequence diagram for explaining the figure. RQIO~RQ1n, EIII, RQ30~RQ3n
. EI30. EI31...-Set/reset type flip-flop, MKll ~ MKIn, MK31 ~ MK3
n--Register, EXll, EX30, EX31・
...D type flip-flop, Al O~A1
n, A30 to A3n -...and gate, 0
R11, 0R12, 0R31, 0R32......or game), PRII, PR31...Priority circuit.

Claims (1)

【特許請求の範囲】[Claims] マスク可能な割込要求信号とマスク不可能な割込要求信
号とを入力とする割込制御装置において、夫々の割込要
求に対してこれを許可するか否かを制御する手段を独立
して設けたことを特徴とする割込制御装置。
In an interrupt control device which receives a maskable interrupt request signal and a non-maskable interrupt request signal as input, a means for controlling whether or not to permit each interrupt request is provided independently. An interrupt control device characterized in that:
JP20699382A 1982-11-26 1982-11-26 Interruption controller Granted JPS5998256A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20699382A JPS5998256A (en) 1982-11-26 1982-11-26 Interruption controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20699382A JPS5998256A (en) 1982-11-26 1982-11-26 Interruption controller

Publications (2)

Publication Number Publication Date
JPS5998256A true JPS5998256A (en) 1984-06-06
JPH0226245B2 JPH0226245B2 (en) 1990-06-08

Family

ID=16532404

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20699382A Granted JPS5998256A (en) 1982-11-26 1982-11-26 Interruption controller

Country Status (1)

Country Link
JP (1) JPS5998256A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6345638A (en) * 1986-08-12 1988-02-26 Fujitsu Ltd Interruption control system
JPS63188237A (en) * 1987-01-31 1988-08-03 Nec Corp Interruption report system
JPS6458025A (en) * 1987-08-28 1989-03-06 Seiko Epson Corp Interruption processing circuit

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5295322U (en) * 1976-01-14 1977-07-16

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5295322U (en) * 1976-01-14 1977-07-16

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6345638A (en) * 1986-08-12 1988-02-26 Fujitsu Ltd Interruption control system
JPS63188237A (en) * 1987-01-31 1988-08-03 Nec Corp Interruption report system
JPS6458025A (en) * 1987-08-28 1989-03-06 Seiko Epson Corp Interruption processing circuit

Also Published As

Publication number Publication date
JPH0226245B2 (en) 1990-06-08

Similar Documents

Publication Publication Date Title
JP2867717B2 (en) Microcomputer
JPS5998256A (en) Interruption controller
JPS586971B2 (en) arithmetic processing unit
JPS62205441A (en) Microcomputer
JPS59111543A (en) Interruption controller
JPH0573296A (en) Microcomputer
JPS59133655A (en) Address stop control circuit
JPS6362013B2 (en)
JP2508026B2 (en) Timer control method
JPS638503B2 (en)
JPH047641A (en) Interruption control device
JPS6252900B2 (en)
JPH02191041A (en) Data processor
JPH04127260A (en) Exclusive control circuit for multiprocessor system
JPS5831465A (en) Processor controlling system
JPH06259383A (en) Method and device for interruption control
JPH06332720A (en) Signal control method
JPH0553831A (en) Computer unit with interrupting function
JPS59216253A (en) Interruption processing system
JPS61229123A (en) Data processor
JPH01321525A (en) Hardware semaphore
JPS62243031A (en) Information processor
JPH10161887A (en) Method and device for interruption signal synchronization
JPS6259818B2 (en)
JPH0287256A (en) Interruption control system