[go: up one dir, main page]

JPS63234328A - Processing method for interruption of computer - Google Patents

Processing method for interruption of computer

Info

Publication number
JPS63234328A
JPS63234328A JP6783787A JP6783787A JPS63234328A JP S63234328 A JPS63234328 A JP S63234328A JP 6783787 A JP6783787 A JP 6783787A JP 6783787 A JP6783787 A JP 6783787A JP S63234328 A JPS63234328 A JP S63234328A
Authority
JP
Japan
Prior art keywords
interrupt
interruption
routine
interrupt signal
cpu
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
Application number
JP6783787A
Other languages
Japanese (ja)
Inventor
Yukio Kato
幸男 加藤
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP6783787A priority Critical patent/JPS63234328A/en
Publication of JPS63234328A publication Critical patent/JPS63234328A/en
Pending 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Abstract

PURPOSE:To reduce hardware in size and cost by performing the interruption processing on the inside of a CPU without providing an interruption signal holding circuit on the outside of the CPU. CONSTITUTION:An interruption signal A is supplied to an interruption pin and an input-1 pin of a CPU 4. The CPU 4 is shifted to an interruption processing routine from a main routine with input of the signal A and then inhibits the subsequent interruptions to carry out the interruption processing. When this interruption processing is over, the CPU 4 is reset to the main routine. In this case, however, an interruption inhibiting state is not released. Instead a fact that the signal A is not active is confirmed and an interruption permitted by an interruption signal sense routine that is carried out in the intervals of the normal processing in the main routine. In such a permission >=2 times interruption are prevented by the same interruption signal. As a result, an interruption signal holding circuit set on the outside of the CPU can be omitted for reduction of the hardware in size and cost.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、コンピュータシステムにおけるレベル検出型
割込み信号検出を用いた割込み処理方法に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an interrupt processing method using level detection type interrupt signal detection in a computer system.

〔従来の技術〕[Conventional technology]

従来のこの種の割込み方法として、トランジスタ技術1
985年10月号通巻253号(CQ出版社)第443
〜454頁に記載されたものがある。以下、第2図を参
照して、従来の割込み信号入力回路の一例につき説明す
る。同図に示す割込信号入力回路は、割込信号保持のた
めのフリップフロップ1で構成されている。割込み処理
のフローヂV−トを第3図に、タイムチャートを第4図
に示す。図示のように、外部からの割込信号A(第2図
)の立ち上がりエツジで、フリップフロップ1の出力Q
が“11パにセットされ、CPU (中央処理装置)2
に対する割込みが発生する。即ちCPU2に割込み信号
Bが供給される。CPUは割込みが発生すると、割込み
に対する様々な処理を行ない、割込信号リセットパルス
Cを出力し、割込許可命令(EI)を実行して割込処理
を終了する。
The conventional interrupt method of this type is transistor technology 1.
October 985 issue, volume 253 (CQ Publishing) No. 443
There is one described on pages 454 to 454. An example of a conventional interrupt signal input circuit will be described below with reference to FIG. The interrupt signal input circuit shown in the figure is composed of a flip-flop 1 for holding an interrupt signal. The flowchart of the interrupt processing is shown in FIG. 3, and the time chart is shown in FIG. 4. As shown in the figure, at the rising edge of the external interrupt signal A (Fig. 2), the output Q of flip-flop 1
is set to “11,” and CPU (Central Processing Unit) 2
An interrupt occurs. That is, the interrupt signal B is supplied to the CPU 2. When an interrupt occurs, the CPU performs various processes for the interrupt, outputs an interrupt signal reset pulse C, executes an interrupt enable instruction (EI), and ends the interrupt process.

上記割込信号リセットパルスCがフリップフロップ1を
初期化することによって、次に外部からの割込み信号A
が立ち上がるまでCPUへの割込み信号Bは“L tp
に保たれることになる。よって、割込み信号アクティブ
時間TA(第4図)の長短に拘らず外部からの割込信号
Aが一度入力される毎に、割込処理を一度だけ実行する
様になっている。
The interrupt signal reset pulse C initializes the flip-flop 1, and then the external interrupt signal A
The interrupt signal B to the CPU is “L tp” until
will be maintained. Therefore, regardless of the length of the interrupt signal active time TA (FIG. 4), the interrupt process is executed only once each time the interrupt signal A from the outside is input.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかしながら、上記の割込処理方法では、割込み信号保
持回路をCPUの外部に設ける必要があり、ハードウェ
アのサイズが大きく、またコストが高いという問題点が
あった。
However, the above-mentioned interrupt processing method requires an interrupt signal holding circuit to be provided outside the CPU, resulting in a problem that the hardware size is large and the cost is high.

この発明は、以上述べた、割込信号保持回路がCPUの
外部に必要であるという問題点を除去し、ハードウェア
のサイズが小さくかつコストの低い装置を提供すること
を目的とする。
An object of the present invention is to eliminate the above-mentioned problem that an interrupt signal holding circuit is required outside the CPU, and to provide a device with small hardware size and low cost.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の割込み処理方法は、割込み信号を受けたとぎ、
メインルーチンから、それ以後の割込みを禁止する命令
を含む割込み処理のためのルーチンに移ってそれを実行
し、それが終了したらメインルーチンに戻ることと、メ
インルーチンの通常の処理の合間に割込み信号がアクテ
ィブでおるかどうかを検出するセンスルーチンを実行す
ることと、上記割込み処理のルーチンからメインルーチ
ンに移った後、該センスルーチンで割込み信号がアクテ
ィブでないことが少くとも一度検出されたら割込み許可
命令を実行することとを含み、上記センスルーチンは、
1つの割込み信号から次の割込み信号までの時間間隔よ
りも短い時間間隔で実行されるようプログラムされてい
ることを特徴とするものである。
The interrupt processing method of the present invention includes, upon receiving an interrupt signal,
From the main routine, move to a routine for interrupt processing that includes an instruction to disable subsequent interrupts, execute it, and return to the main routine when it is finished, and interrupt signal processing between the main routine's normal processing. Execute a sense routine that detects whether the interrupt signal is active, and after moving from the above interrupt processing routine to the main routine, if the sense routine detects that the interrupt signal is not active at least once, an interrupt enable instruction is executed. The above sense routine includes:
It is characterized in that it is programmed to be executed at a time interval shorter than the time interval from one interrupt signal to the next interrupt signal.

〔作 用〕[For production]

上記の処理方法においては、割込みの処理はすべてCP
U内部で行なわれる。即ち、割込み信号が発生すると、
メインルーチンから割込み処理のためのルーチンに移る
。割込み処理のルーチンでは、以後の割込みを禁止して
、割込み処理を行なう。これが終ると、メインルーチン
に戻るが、この時は、割込み禁止の解除、即ち、割込み
許可を行なわない。代りにメインルーチンの通常の処理
の合間に実行されるセンスルーチンによって、割込み信
号がアクティブでなくなったことを確認した上で、割込
みの許可を行なう。これは同一の割込み信号に対し、割
込み処理を重ねて行なわないようにするためである。
In the above processing method, all interrupt processing is done by the CP.
This is done inside the U. That is, when an interrupt signal occurs,
Move from the main routine to the routine for interrupt processing. In the interrupt processing routine, subsequent interrupts are prohibited and the interrupt processing is performed. When this is finished, the process returns to the main routine, but at this time, interrupt prohibition is not canceled, that is, interrupts are not enabled. Instead, a sense routine executed between normal processing of the main routine confirms that the interrupt signal is no longer active, and then permits the interrupt. This is to avoid repeating interrupt processing for the same interrupt signal.

また、センスルーチンが実行されるまでの時間間隔が、
1つの割込み信号から次の割込み信号までの時間間隔よ
りも短くなるようプログラムされている。この結果、割
込み信号の検出をし損うことがない。
Also, the time interval before the sense routine is executed is
It is programmed to be shorter than the time interval from one interrupt signal to the next. As a result, there is no possibility of failing to detect an interrupt signal.

〔実施例〕〔Example〕

第1図は本発明一実施例で用いられる割込み信号回路を
示し、第5図はその処理方法のフローヂャートを示す。
FIG. 1 shows an interrupt signal circuit used in one embodiment of the present invention, and FIG. 5 shows a flowchart of its processing method.

第1図に示す様に、割込み信号Aは、第2図のように割
込信号リセット回路を介さず、CPU4の割込みピンと
、割込信号検出のための入力1ピンに入力される。この
割込み信号Aが入ると、CPU4はメインルーチンから
割込み処理のためのルーチンに移る。割込み処理のため
のルーチンでは第5図(a)に示すように、以後の割込
みの禁止を行なった(202 )後、割込み処理(20
4)を実行する。割込み処理が終ると、割込み許可命令
を実行せず、割込み禁止のままメインルーチンにリター
ンする(206>。メインルーチンは、第5図(b)に
示す様に本来の処理a〜処理C(102,112,12
2)を行なうが、各処理が終了する度に、割込み信号セ
ンスルーチン(104,114,124>を実行してい
る。割込信号センスルーチンでは、割込み信号Aがアク
ティブでない事を確認しだら(105,115,125
)割込み許可命令を実行する(106,116,126
 )。
As shown in FIG. 1, the interrupt signal A is input to the interrupt pin of the CPU 4 and the input 1 pin for detecting the interrupt signal, without passing through the interrupt signal reset circuit as shown in FIG. When this interrupt signal A is input, the CPU 4 shifts from the main routine to a routine for interrupt processing. In the routine for interrupt processing, as shown in FIG. 5(a), after prohibiting future interrupts (202), interrupt processing (20
Execute 4). When the interrupt processing is finished, the interrupt enable instruction is not executed and the process returns to the main routine with interrupts disabled (206>. The main routine performs the original processing a to processing C (102) as shown in FIG. 5(b). ,112,12
2), but each time each process is completed, the interrupt signal sense routine (104, 114, 124>) is executed.In the interrupt signal sense routine, after confirming that the interrupt signal A is not active, 105, 115, 125
) Execute interrupt enable instruction (106, 116, 126
).

次に第6図のタイムチャートを用いて動作について説明
する。割込み信号Aがアクティブ(“H99)になると
割込処理が開始され、割込みが禁止になる。即ち、第6
図の割込み許可がL″になる。
Next, the operation will be explained using the time chart shown in FIG. When interrupt signal A becomes active (“H99”), interrupt processing is started and interrupts are disabled.
The interrupt permission in the figure becomes L''.

これは、1つの割込みの実行中に他の割込みの受付けを
行なわないようにするためである。割込み処理を終了す
ると、メインルーチンに戻るが、割込みの禁止が続けら
れる。そして、次に割込みが許可されるのは、第6図の
81〜S3のタイミング、つまり、割込み信号がアクテ
ィブでなくなった後の最初の割込み信号センスルーチン
においてである。
This is to prevent acceptance of another interrupt while one interrupt is being executed. When the interrupt processing ends, the process returns to the main routine, but interrupts continue to be disabled. The next time an interrupt is permitted is at the timings 81 to S3 in FIG. 6, that is, in the first interrupt signal sensing routine after the interrupt signal becomes inactive.

このように割込み信号がアクティブでなくなったことを
確認してから割込みを許可することで、1つの割込み信
号によって2回以上割込みが発生する事を防いでいる。
By allowing an interrupt after confirming that the interrupt signal is no longer active in this way, it is possible to prevent one interrupt signal from causing two or more interrupts.

次に割込み信号Aがアクティブでない時間をTA  (
第6図のTAI、 TA2> 、メインルーチンの各処
理に要する時間をT)l(第6図のTHa−T)Ic)
とする。ここでTA <THとなる事があると、即ちメ
インルーチンの処理が終る前に次の割込み信号が発生す
ると、第7図に示す様に割込信号Aが入力されたにも拘
らず割込みが発生しないという事が起こり1qる。その
ためT)1の通常起こり得る範囲内の最大値T Hma
xがTAの通常起こり得る最小値TAminより小とな
る様にTHが設定されている。本実施例では、THはメ
インルーチンの各処理の時間であり、これは言い換れば
割込み信号センスルーチンから次の割込み信号センスル
ーチンまでの時間があるから、T Hmax< T A
m1nとなる様に割込み信号センスルーチンを挿入する
事によって、割込み信号があったときに、割込み処理を
実行し損うことがないようにしている。
Next, the time during which interrupt signal A is not active is TA (
TAI in Figure 6, TA2>, the time required for each process of the main routine T)l (THa-T in Figure 6) Ic)
shall be. If TA < TH, that is, the next interrupt signal occurs before the main routine processing is completed, the interrupt will not occur even though the interrupt signal A has been input, as shown in Figure 7. It happens that it does not occur. Therefore, the maximum value T Hma within the normally possible range of T)1
TH is set so that x is smaller than the normally possible minimum value TAmin of TA. In this embodiment, TH is the time for each process in the main routine. In other words, since there is a time from one interrupt signal sensing routine to the next interrupt signal sensing routine, THmax<TA
By inserting the interrupt signal sensing routine so that m1n occurs, it is possible to prevent failure to execute interrupt processing when an interrupt signal is received.

(発明の効果) 以上説明したように本発明によれば、CP口外部の割込
み信号保持回路が不必要になるためハードウェアのサイ
ズの縮小、コストダウンの効果がある。また、割込禁止
の期間が従来技術に比べて長いため割込み信号入力ライ
ンに対する耐ノイズ性が高くなる。これは、割込み禁止
中は、割込入力ラインにノイズが現われてもCPUがそ
の影響をうけないためである。
(Effects of the Invention) As described above, according to the present invention, an interrupt signal holding circuit outside the CP port is unnecessary, so that there is an effect of reducing the size of hardware and reducing costs. Furthermore, since the interrupt prohibition period is longer than in the prior art, noise resistance against the interrupt signal input line is improved. This is because while interrupts are disabled, even if noise appears on the interrupt input line, the CPU is not affected by it.

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

第1図は本発明一実施例で用いられる割込み入力回路を
示すブロック図、 第2図は従来の割込み信号入力回路を示すブロック図、 第3図は従来の割込み処理を示すフローチャート、 第4図は従来の割込み処理を示すタイムチャート、 第5図は本発明一実施例における割込み処理を示すフロ
ーチャート、 第7図はセンスルーチンの実行のタイミングを説明する
ためのタイムチャー1〜である。 4・・・CPU、104..114.124・・・割込
み信号センスルーチン、105.115.125・・・
割込み信号検出、106、116.126・・・割込み
許可、202・・・割込み禁止、204・・・割込み処
理。 本発明【;よるか1汲み入力回路 羊1回
FIG. 1 is a block diagram showing an interrupt input circuit used in an embodiment of the present invention, FIG. 2 is a block diagram showing a conventional interrupt signal input circuit, FIG. 3 is a flowchart showing conventional interrupt processing, and FIG. 4 5 is a flowchart showing interrupt processing in an embodiment of the present invention. FIG. 7 is a time chart 1 to 1 for explaining the timing of execution of a sense routine. 4...CPU, 104. .. 114.124... Interrupt signal sense routine, 105.115.125...
Interrupt signal detection, 106, 116.126... Interrupt permission, 202... Interrupt prohibition, 204... Interrupt processing. The present invention [; depending on the input circuit one time

Claims (1)

【特許請求の範囲】 レベル検出型の割込み信号検出を用いた割込み処理方法
において、 割込み信号を受けたとき、メインルーチンから、それ以
後の割込みを禁止する命令を含む割込み処理のためのル
ーチンに移ってそれを実行し、それが終了したらメイン
ルーチンに戻ることと、メインルーチンの通常の処理の
合間に割込み信号がアクティブであるかどうかを検出す
るセンスルーチンを実行することと、 上記割込み処理のルーチンからメインルーチンに移った
後、該センスルーチンで割込み信号がアクティブでない
ことが少くとも一度検出されたら割込み許可命令を実行
することとを含み、 上記センスルーチンは、1つの割込み信号から次の割込
み信号までの時間間隔よりも短い時間間隔で実行される
ようプログラムされていることを特徴とするコンピュー
タの割込み処理方法。
[Claims] In an interrupt processing method using level detection type interrupt signal detection, when an interrupt signal is received, the main routine moves to a routine for interrupt processing that includes an instruction to prohibit subsequent interrupts. and return to the main routine when it is finished, and execute a sense routine that detects whether the interrupt signal is active in between the main routine's normal processing; and the above interrupt handling routine. and executing an interrupt enable instruction at least once the sense routine detects that the interrupt signal is not active; 1. A computer interrupt processing method, characterized in that the computer is programmed to be executed at a shorter time interval than the current time interval.
JP6783787A 1987-03-24 1987-03-24 Processing method for interruption of computer Pending JPS63234328A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6783787A JPS63234328A (en) 1987-03-24 1987-03-24 Processing method for interruption of computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6783787A JPS63234328A (en) 1987-03-24 1987-03-24 Processing method for interruption of computer

Publications (1)

Publication Number Publication Date
JPS63234328A true JPS63234328A (en) 1988-09-29

Family

ID=13356458

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6783787A Pending JPS63234328A (en) 1987-03-24 1987-03-24 Processing method for interruption of computer

Country Status (1)

Country Link
JP (1) JPS63234328A (en)

Similar Documents

Publication Publication Date Title
JPH0481932A (en) Interruption controller
TW528944B (en) A processing system and method of resetting a plurality of processing modules
JPS63234328A (en) Processing method for interruption of computer
CN110832459B (en) Vehicle control device
JPS6027038A (en) Program runaway detection method
JPH064301A (en) Time division interrupt control method
JPH0485630A (en) Interruption controller
JP2008077184A (en) Interrupt control circuit
JPH03266110A (en) Resetting device for computer
JPH04267438A (en) Double exception detector
JPH0423049A (en) Bus cycle re-executing method
JPS6331143Y2 (en)
JP2587881B2 (en) Image forming device
JPH04156651A (en) Bus controller for interface of small computer system
JPH07319712A (en) Interruption processing method and data processor
JPH04270441A (en) Data processor
JPS63124156A (en) Memory error detection method
JPH0474244A (en) Latch circuit
JPH06314232A (en) Memory switching control circuit
JP2004157662A (en) Dynamic stack overwrite monitoring method
JPH04304548A (en) Microprocessor device
JPH07219784A (en) Interruption control system
JPH04237337A (en) information processing equipment
JPH0814796B2 (en) Parity error processing method
JPH06350677A (en) Interrupt request type switching request signal monitoring system