JPH0588916A - Interrupt controller - Google Patents

Interrupt controller

Info

Publication number
JPH0588916A
JPH0588916A JP25255291A JP25255291A JPH0588916A JP H0588916 A JPH0588916 A JP H0588916A JP 25255291 A JP25255291 A JP 25255291A JP 25255291 A JP25255291 A JP 25255291A JP H0588916 A JPH0588916 A JP H0588916A
Authority
JP
Japan
Prior art keywords
interrupt
signal
source
output
priority
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
JP25255291A
Other languages
Japanese (ja)
Inventor
Mutsuo Shitamae
睦夫 下前
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP25255291A priority Critical patent/JPH0588916A/en
Publication of JPH0588916A publication Critical patent/JPH0588916A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the interrupt handling time of an interrupt controller and to fractionalize the priority level on demand. CONSTITUTION:When at least one interrupt source signal from plural interrupt sources is inputted, an interrupt signal processing device 6 outputs the interrupt request signal encoded in accordance with its priority level to a CPU 2. Since this encoded signal indicates not only the priority level but also the interrupt source, the CPU 2 immediately executes proper interrupt handling. The interrupt signal processing device 6 discriminates which of the rise and the fall of the interrupt source signal is true in accordance with the interrupt level signal from the CPU 2. The interrupt source signal is encoded, and thereby, the priority level is fractionalized to process interrupt source signals whose number is larger than the number of interrupt inputs peculiar to the CPU 2. The interrupt handling time is shortened by these functions.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、割込ソース信号を入
力した時に、その優先度に応じて割込処理を行なう割込
制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an interrupt control device which, when an interrupt source signal is input, carries out interrupt processing in accordance with its priority.

【0002】[0002]

【従来の技術】産業用機器,OA機器,家庭用電化製品
等の電子装置に、プロセス制御又はシーケンス制御用と
してワンボード又はワンチップ化されたマイクロコンピ
ュータが使用されているが、一般にこれらの電子機器は
コストを下げるため、本来の性能を満たす範囲で出来る
だけローコストのマイクロコンピュータが選ばれ、その
周辺の装置や回路も簡単でローコストのものが望まれて
いる。
2. Description of the Related Art A one-board or one-chip microcomputer is used for process control or sequence control in electronic devices such as industrial equipment, office automation equipment, and household electric appliances. In order to reduce the cost of equipment, a low-cost microcomputer is selected as much as possible within the range of satisfying the original performance, and peripheral devices and circuits are desired to be simple and low-cost.

【0003】例えば或る作業の開始や終了時、軽度の事
故や誤動作の発生時、停電等の重大事故発生時など割込
みが必要になると割込信号(割込ソース信号)が出力さ
れ、中央処理装置(以下「CPU」ともいう)はその割
込信号を検出すると、その優先度(上記の例では後者に
なるほど優先度が高い)に応じて、現在処理中の作業を
中止してその対応処理を行なう。
An interrupt signal (interrupt source signal) is output when an interrupt is required, for example, when a certain work is started or ended, when a minor accident or malfunction occurs, or when a serious accident such as a power failure occurs. When the device (hereinafter also referred to as “CPU”) detects the interrupt signal, the device stops the work currently in progress and responds to the corresponding process according to its priority (the latter is higher in the above example). Do.

【0004】この割込信号は、CPUの論理の正負に合
せた極性すなわち正論理ならばローレベルからハイレベ
ルに変化した時(以下「立上り」という)を、負論理な
らばハイレベルからローレベルに変化した時(以下「立
下り」という)をそれぞれ真(アクティブ)としなけれ
ばならない。従って、割込信号をそのための割込処理用
LSIに入力し、そのLSI内のトリガレベル設定用レ
ジスタに割込信号の立上りと立下りのいずれを真とする
かを設定するか、あるいはノット回路を通すことにより
極性を合せていた。
This interrupt signal has a polarity matching positive or negative logic of the CPU, that is, a positive logic when it changes from a low level to a high level (hereinafter referred to as "rising"), and a negative logic, a high level to a low level. When it changes to (hereinafter referred to as "fall"), it must be true (active). Therefore, the interrupt signal is input to an interrupt processing LSI for that purpose, and a trigger level setting register in the LSI is used to set whether the rising edge or the falling edge of the interrupt signal is true or a knot circuit. The polarities were matched by passing through.

【0005】そのため、常時ハイレベルで作業続行中だ
けローレベルになる信号があって、その作業の開始及び
終了の時点すなわち立下りと立上りの両方で割込みを必
要とする場合は、その一方を上記のように処理して2つ
の独立した割込信号をつくるか、割込処理用LSIのト
リガレベル設定用レジスタの内容をシーケンスの途中で
変更する等の処理を行なっていた。
Therefore, when there is a signal which is always high and goes low only while the work is being continued, and when an interrupt is required at the start and end of the work, that is, at both the falling edge and the rising edge, one of them is set to the above. In this way, two independent interrupt signals are produced by the above process, or the contents of the trigger level setting register of the interrupt processing LSI are changed in the middle of the sequence.

【0006】また、一般にCPUの割込処理可能な入力
数に比べて必要な割込みの数が多いので、同じ優先度の
割込みをまとめてそのオア(論理和)をとり、CPUの
割込端子の1つに接続していた。
Further, since the number of interrupts required is generally larger than the number of inputs that can be processed by the CPU, interrupts of the same priority are collected together and the OR (logical sum) is taken to determine the interrupt terminal of the CPU. I was connected to one.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、割込処
理用LSIのトリガレベル設定用レジスタの内容の設定
又は変更はそのプログラムの命令ステップが比較的多い
ので、シーケンスの途中で内容の変更を繰返すと全体の
シーケンス制御が遅れる恐れがあった。一方、ノット回
路を通すか、レジスタの内容を変更しない場合は、それ
だけ割込みの数が増えることになる。
However, setting or changing the contents of the trigger level setting register of the interrupt processing LSI involves a relatively large number of instruction steps of the program, so if the contents are repeatedly changed in the middle of the sequence. The whole sequence control might be delayed. On the other hand, if the knot circuit is passed or the contents of the register are not changed, the number of interrupts will increase accordingly.

【0008】また、オアをとった割込みが入力すると、
CPUはその割込みを処理するためにどの割込ソース
(源)から出力されたかを特定する必要があるから、オ
アをとられたすべての割込ソースの状態をI/Oポート
を介してポーリングしなければならず、その数が多いほ
ど割込処理時間が長くなるという問題があった。
When an OR interrupt is input,
Since the CPU needs to determine from which interrupt source it was issued to service the interrupt, it polls the status of all interrupted interrupt sources via the I / O port. There is a problem in that the larger the number, the longer the interrupt processing time.

【0009】さらに、割込みの数が増えるに従ってその
優先度も細分化したくなるが、優先度毎にまとめてオア
をとることにより数の問題を解決しても、CPU固有の
入力数を超えて優先度を細分化することは不可能であっ
た。
Further, as the number of interrupts increases, the priority of the interrupts tends to be subdivided. However, even if the number problem is solved by collecting ORs for each priority, the priority exceeds the number of inputs peculiar to the CPU. It was impossible to subdivide the degree.

【0010】この発明は上記の点に鑑みてなされたもの
であり、割込処理時間を短縮することを第1の目的と
し、さらに、必要に応じては優先度の細分化を可能にす
ることを第2の目的とする。
The present invention has been made in view of the above points, and it is a first object of the present invention to shorten the interrupt processing time, and further, it is possible to subdivide the priority as necessary. Is the second purpose.

【0011】[0011]

【課題を解決するための手段】この発明は上記の目的を
達成するため、割込処理機能を有しシステム制御を行な
う中央処理装置を備えた割込制御装置において、中央処
理装置から入力する、割込ソース信号がハイレベル又は
ローレベルのいずれの時に割込みを真にするかを指示す
る割込レベル信号に応じて割込ソース信号の変化を検出
し、その割込ソース信号がハイレベルからローレベル
に、あるいはローレベルからハイレベルに変化した時に
そのいずれかの割込ソース信号による割込みを真と判定
する手段と、該手段が割込みを真と判定した時に、中央
処理装置に割込要求信号を出力する割込要求出力手段と
を設けたものである。
In order to achieve the above object, the present invention provides an interrupt control device having a central processing unit having an interrupt processing function and performing system control, inputting from the central processing unit. A change in the interrupt source signal is detected in response to the interrupt level signal that indicates when the interrupt source signal is high level or low level, and the interrupt source signal changes from high level to low level. Means for determining an interrupt caused by any one of the interrupt source signals as true when the level is changed to low level or high level, and an interrupt request signal to the central processing unit when the means determines that the interrupt is true And an interrupt request output means for outputting.

【0012】また、割込処理機能を有しシステム制御を
行なう中央処理装置を備えた割込制御装置において、入
力する複数の割込ソース信号を複数個ずつまとめてブロ
ックとし、その各ブロック毎に割込要求信号の出力の可
否を決定するブロック決定手段を設けたものである。
Further, in an interrupt control device having a central processing unit having an interrupt processing function and performing system control, a plurality of interrupt source signals to be input are grouped into a plurality of blocks, and each block is divided into blocks. Block determining means for determining whether to output the interrupt request signal is provided.

【0013】それらの割込制御装置において、割込ソー
ス信号を出力した割込ソースを指示するソース指示信号
を出力するソース指示出力手段を設けるとよい。
In these interrupt control devices, it is preferable to provide source instruction output means for outputting a source instruction signal for instructing the interrupt source that has output the interrupt source signal.

【0014】[0014]

【作用】この発明による割込制御装置は、中央処理装置
から入力する割込レベル信号に応じて判定手段が割込ソ
ース信号の変化を検出して、その割込ソース信号がハイ
レベルからローレベル或いはローレベルからハイレベル
に変化した時にそのいずれかの割込ソース信号による割
込みを真と判定し、割込要求出力手段はいずれかの割込
みが真と判定された時に割込要求信号を中央処理装置に
出力するから、割込みが発生した時の信号処理が容易に
なり、割込処理時間が短縮される。
In the interrupt control device according to the present invention, the judging means detects the change of the interrupt source signal according to the interrupt level signal inputted from the central processing unit, and the interrupt source signal changes from the high level to the low level. Alternatively, when the low level changes to the high level, the interrupt by any one of the interrupt source signals is determined to be true, and the interrupt request output means centrally processes the interrupt request signal when any of the interrupts is determined to be true. Since the signal is output to the device, the signal processing when an interrupt occurs becomes easy and the interrupt processing time is shortened.

【0015】また、ブロック決定手段が入力する複数の
割込ソース信号を複数個ずつまとめてブロックとし、そ
の各ブロック毎に割込要求信号の出力の可否を決定する
ことにより、中央処理装置固有の割込入力数よりも多い
割込入力数を設定することが出来る。それと共に、組合
せてオアをとらなければならない割込みの数が減少し、
ポーリングを必要とする頻度が減り、また1組のオアを
形成する割込みの数も減るからポーリングに要する時間
も減少し、割込処理時間が短縮される。
Further, a plurality of interrupt source signals input by the block determining means are grouped into a plurality of blocks, and whether or not to output the interrupt request signal is determined for each block. It is possible to set a larger number of interrupt inputs than the number of interrupt inputs. Along with that, the number of interrupts that must be combined and taken OR decreases.
The frequency of polling is reduced, and the number of interrupts forming a set of ORs is reduced, so that the time required for polling is reduced and the interrupt processing time is shortened.

【0016】さらに、予め各ブロック毎に優先度を設定
しておくことにより、中央処理装置の割込入力数によっ
て制限されている優先度の数を増やし細分化することが
出来る。
Furthermore, by setting priorities for each block in advance, the number of priorities limited by the number of interrupt inputs of the central processing unit can be increased and subdivided.

【0017】また、ソース指示出力手段はその出力する
ソース指示信号が割込ソースを指示するから、中央処理
装置は割込ソースの特定が容易になり、その分だけ割込
処理時間の短縮が可能になる。
Further, since the source instruction output means indicates the interrupt source by the source instruction output means, the central processing unit can easily identify the interrupt source, and the interrupt processing time can be shortened accordingly. become.

【0018】[0018]

【実施例】図1は、この発明の一実施例である割込制御
装置の構成を示すブロック図である。この割込制御装置
1は、割込処理機能を備え演算やシステム制御を行なう
CPU(中央処理装置)2と、プログラムや常数データ
等が格納されているROM3と、CPU2のワークメモ
リであるRAM4と、周辺装置や外部装置に接続され通
信やデータの入出力インタフェース機能を備えたI/O
ポート5と、直接にあるいはI/Oポート5を介して入
力する割込ソース信号を処理してCPU2にコード化さ
れた割込要求信号を出力する割込信号処理装置6とから
構成され、互にバスライン7で接続されている。
1 is a block diagram showing the configuration of an interrupt control device according to an embodiment of the present invention. The interrupt control device 1 includes a CPU (central processing unit) 2 which has an interrupt processing function and performs arithmetic operations and system control, a ROM 3 in which programs and constant data are stored, and a RAM 4 which is a work memory of the CPU 2. , I / O connected to peripheral devices and external devices and equipped with communication and data input / output interface functions
It comprises a port 5 and an interrupt signal processing device 6 for processing an interrupt source signal input directly or via the I / O port 5 and outputting a coded interrupt request signal to the CPU 2. To the bus line 7.

【0019】このように構成された割込装置1において
は、ROM3に格納されたメインルーチンのプログラム
に従ってCPU2が本体機器のシーケンス制御やプロセ
ス制御を含むシステム制御を実行しているが、本体機器
を構成する各装置がその作業の開始や終了を知らせるた
め、あるいは異常や事故を検出して割込ソース信号を出
力する(割込発生)と、割込信号処理装置6がその割込
ソース信号を入力し、予め設定されている優先度に従っ
た処理を行なって、優先度又は割込ソースをコード化し
た割込要求信号を専用のライン8を介してCPU2に出
力する。
In the interrupt device 1 thus configured, the CPU 2 executes system control including sequence control and process control of the main body device according to the program of the main routine stored in the ROM 3, When each of the constituent devices notifies the start or end of the work, or when an abnormality or an accident is detected and an interrupt source signal is output (interrupt occurrence), the interrupt signal processing device 6 outputs the interrupt source signal. An input is made, processing is performed in accordance with a preset priority, and an interrupt request signal obtained by coding the priority or the interrupt source is output to the CPU 2 via the dedicated line 8.

【0020】CPU2は割込要求信号を入力すると、そ
の優先度に従って現在処理中のルーチンを一時中止し、
その命令やデータ等をレジスタに退避された後、割込ソ
ースに応じた割込処理ルーチンのプログラムをROM3
から呼出して必要な処理を実行し、その処理が終ったら
レジスタに退避させておいた命令やデータを戻して前の
ルーチンに復帰する。
When the CPU 2 receives the interrupt request signal, it temporarily suspends the routine currently being processed in accordance with the priority of the interrupt request signal,
After the instruction and data are saved in the register, the program of the interrupt processing routine corresponding to the interrupt source is stored in the ROM 3
To execute the necessary processing, and when the processing is completed, the instruction and data saved in the register are returned to return to the previous routine.

【0021】割込処理ルーチンを実行中であってもそれ
より優先度の高い割込みが発生すれば、前の割込処理を
一時中断して後の割込処理を優先する。このように、割
込みは何重にも処理されることがあり、この場合レジス
タに退避させた複数の命令やデータは、後から退避させ
たものが先に処理される。
Even if the interrupt processing routine is being executed, if an interrupt with a higher priority occurs, the previous interrupt processing is suspended and the subsequent interrupt processing is prioritized. In this way, interrupts may be processed in multiple layers, and in this case, the plurality of instructions and data saved in the register are processed first after being saved.

【0022】実行中の割込処理ルーチンより優先度の低
い割込みが発生しても、CPU2はそれを受付けずに待
機(マスキング)させ、実行中の処理が終ってから受付
ける。もし、退避中の割込処理があれば、その優先度を
比較して受付けるか待機を続行させるかを決定する。そ
の優先度とそれによるマスキングは、予め設定された手
順に従って割込信号処理装置6がコード化された割込要
求信号を出力し、CPU2がそれを判断して行なう。
Even if an interrupt having a lower priority than the interrupt processing routine being executed occurs, the CPU 2 waits (masks) without accepting it and accepts it after the process being executed is completed. If there is an interrupt process during evacuation, the priority is compared and it is decided whether to accept or continue waiting. The priority and the masking by the priority are performed by the interrupt signal processing device 6 outputting a coded interrupt request signal according to a preset procedure, and the CPU 2 judging it.

【0023】図2は、割込信号処理装置6の第1実施例
を示すブロック図であり、1個のカスタムICであるP
LD(プログラマブル・ロジック・デバイス)10によ
り構成されている。このPLD10は、例えば市場に出
ている16R4のように、それぞれ図示しない多数の論
理用素子からなる論理アレー11と、各1個のアンプA
及びノット回路Nと、8個の極性反転する制御アンプC
と、4個のD−FF(フリップ・フロップ)回路Dとに
より構成され、ユーザの要求に応じて論理アレー11の
各論理用素子をそれぞれアンド素子,オア素子,ノット
素子に変換することにより、希望する論理式を満足する
ICになる。
FIG. 2 is a block diagram showing a first embodiment of the interrupt signal processing device 6, which is a single custom IC P.
It is composed of an LD (Programmable Logic Device) 10. The PLD 10 includes a logic array 11 including a large number of logic elements (not shown) and one amplifier A each, such as 16R4 on the market.
And a knot circuit N, and eight polarity-inverted control amplifiers C
And four D-FF (flip-flop) circuits D, by converting each logic element of the logic array 11 into an AND element, an OR element, and a knot element in accordance with a user's request, An IC that satisfies the desired logical expression.

【0024】PLD10には、それぞれピン番号を付し
て示した20個のピンを備え、20番ピンは+5Vの電
源(Vcc)に、10番ピンはグランド(GND)にそ
れぞれ接続されている。1乃至9及び11番ピンは各入
力用、14乃至17番ピンは出力用、12,13,1
8,19番ピンは入出力兼用の各端子である。
The PLD 10 is provided with 20 pins indicated by pin numbers, and the 20th pin is connected to the + 5V power source (Vcc) and the 10th pin is connected to the ground (GND). Pins 1 to 9 and 11 are for each input, Pins 14 to 17 are for output, 12, 13, 1
Pins 8 and 19 are terminals for both input and output.

【0025】以下、例えば「/S0」や「/WR」のよ
うに信号名「S0」や「WR」の前に付した「/」は、
その信号S0,WRが負論理すなわちローレベルが真で
ハイレベルが偽であることを示し、「/」を付さない信
号は正論理又は極性により異なる情報を伝える信号であ
ることを示す。また、原則として、PLD10に入出力
する(外部に現れる)信号は大文字からなる名を付し、
内部の論理演算に用いられる信号は小文字からなる名を
付している。
Hereinafter, for example, "/" added before the signal name "S0" or "WR" such as "/ S0" or "/ WR"
The signals S0 and WR indicate negative logic, that is, the low level is true and the high level is false, and the signal without "/" indicates that the signal conveys different information depending on the positive logic or polarity. Also, as a general rule, the signals input / output to / from the PLD 10 (appearing outside) should be named with capital letters,
Signals used for internal logical operations have names with lowercase letters.

【0026】1番ピンには、CPU2から出力される同
期の基準となるシステムクロック(以下単に「クロッ
ク」という)CLKが入力し、バッファ用のアンプAを
経て4個のD−FF回路Dの各クロック端子に接続され
ている。
A system clock (hereinafter simply referred to as "clock") CLK which is a reference for synchronization output from the CPU 2 is input to the 1st pin, and passes through a buffer amplifier A and four D-FF circuits D. It is connected to each clock terminal.

【0027】2乃至5番ピンにはそれぞれ割込ソース信
号である信号/S0〜/S3が、6〜9番ピンにはそれ
ぞれ信号ITLV,/ITEN,/WR,/RDが入力
し、各信号はそれぞれのピンを経て論理アレー11に入
力する。
Signals / S0 to / S3, which are interrupt source signals, are input to pins 2 to 5, and signals ITLV, / ITEN, / WR, and / RD are input to pins 6 to 9, respectively. Input to the logic array 11 via the respective pins.

【0028】11番ピンに入力する信号はノット回路N
を介して、14乃至17番ピンに出力する信号をそれぞ
れ制御する4個の制御アンプCを制御する。この実施例
では外部的に12番ピンに接続しているから、12番ピ
ンの出力信号/itenは直ちに内部にフィードバック
される。従って、14乃至17番ピンからそれぞれ出力
される信号は、信号/itenの極性に応じて同時に制
御される。
The signal input to the 11th pin is a knot circuit N.
The four control amplifiers C for controlling the signals output to the 14th to 17th pins are controlled via the. In this embodiment, since the pin 12 is externally connected, the output signal / iten of the pin 12 is immediately fed back to the inside. Therefore, the signals output from the 14th to 17th pins are simultaneously controlled according to the polarity of the signal / iten.

【0029】入出力兼用の12,13,18,19番ピ
ンから出力される各信号は、それぞれの制御アンプCが
論理アレー11からの内部信号によって制御されるか
ら、外部に出力するか否かをそれぞれ独立に決定され
る。一方、各ピンに信号が入力する時は、それぞれの制
御アンプCがオープンの状態(遮断状態)になっている
から、各入力信号は論理アレー11に直接に入力する。
Whether or not each signal output from the pins 12, 13, 18, and 19 which also serve as input / output is output to the outside because each control amplifier C is controlled by the internal signal from the logic array 11. Are determined independently. On the other hand, when a signal is input to each pin, each input signal is directly input to the logic array 11 because each control amplifier C is in the open state (cutoff state).

【0030】13番ピンには信号/SELが入力し、1
4,15番ピンからはそれぞれコード化された割込要求
信号を形成する信号/INTR0,/INTR1がプル
アップされたラインに出力され、16,17番ピンは、
この実施例では外部的にNC(無接続)になっている。
但し、17番ピンには内部的に割込要求信号が出力され
る時に信号/laitenと同一の信号が現れる。1
8,19番ピンにはそれぞれ信号/MASINT,/L
MATCHが出力されているが、この第1実施例では1
8番ピンはNCであり、19番ピンはデータバスのD0
ラインに接続されている。
Signal / SEL is input to pin 13 and 1
Signals / INTR0, / INTR1 forming coded interrupt request signals are output from the pins 4 and 15 to the pulled-up line, and pins 16 and 17 are
In this embodiment, the external connection is NC (no connection).
However, the same signal as the signal / laiten appears at the 17th pin when the interrupt request signal is internally output. 1
Signals / MASINT and / L are provided on pins 8 and 19, respectively.
MATCH is output, but in this first embodiment, 1
8th pin is NC, 19th pin is D0 of data bus
Connected to the line.

【0031】以下、PLD10に入出力する各信号につ
いて、まとめて説明する。まず、入力信号群について、
信号/S0,/S2,/S3は、各割込ソースからそれ
ぞれ入力する負論理の割込ソース信号であり、例えば信
号/S0はタイマからの、信号/S2はデータ送受信の
ための、信号/S3は作業又は処理の終了を示す各割込
信号である。
The signals input to and output from the PLD 10 will be collectively described below. First, regarding the input signal group,
Signals / S0, / S2, / S3 are negative logic interrupt source signals respectively input from the respective interrupt sources. For example, signal / S0 is from a timer, signal / S2 is for transmitting / receiving data, S3 is each interrupt signal indicating the end of the work or processing.

【0032】信号/S1は、作業又は処理続行中はロー
レベルになっている割込(ソース)信号であるが、その
開始及び終了の時点すなわち立下りと立上りの両方でC
PU2に割込要求信号を出力する必要がある。信号IT
LVはCPU2から入力する信号で、そのレベルの
「H」か「L」かで信号/S1のような割込信号の立上
りで割込要求信号を真とする(出力する)か、立下りで
真とするかを指示する。
The signal / S1 is an interrupt (source) signal which is at a low level during the work or the processing is continued, but it is C at the start and end points thereof, that is, at both the falling edge and the rising edge.
It is necessary to output an interrupt request signal to PU2. Signal IT
LV is a signal input from the CPU 2. Depending on the level of "H" or "L", the interrupt request signal becomes true (output) at the rising edge of the interrupt signal such as the signal / S1 or at the falling edge. Indicate whether to be true.

【0033】信号/ITENはCPU2からデータバス
のD0ラインを介して入力する負論理の信号で、下記の
信号/WR,/SELが共に真(L)の時、PLD10
の内部で、クロックCLKの立上りによりラッチされ
る。信号/WR,/RDもCPU2から入力する負論理
の信号で、各装置又は素子(ここではPLD10)への
それぞれデータ書込み,読出しを指示する。信号/SE
Lは、CPU2からアドレスバスを介して出力されるチ
ップセレクト信号をデコードして得られ、信号/ITE
Nのラッチ及び下記の信号/LMATCHの読出し時に
真(L)になる。
The signal / ITEN is a negative logic signal input from the CPU 2 via the D0 line of the data bus. When both of the following signals / WR and / SEL are true (L), the PLD 10
It is latched by the rising edge of the clock CLK. The signals / WR and / RD are also negative logic signals input from the CPU 2 and instruct to write or read data to or from each device or element (here, the PLD 10). Signal / SE
L is obtained by decoding the chip select signal output from the CPU 2 via the address bus, and the signal / ITE
It becomes true (L) at the time of latching N and reading the following signal / LMATCH.

【0034】つぎに、出力信号群について、信号INT
R0,INTR1はこの2ビット1組で割込要求信号を
形成すると共に、その優先度(プライオリティ)とその
優先度に対応する割込ソースを指示するソース指示信号
をも兼ねている。信号/LMATCHは、信号/S1と
信号ITLVとのレベルが一致したか否かを示す信号で
あり、この実施例では信号/RD,/SELが共に真
(L)である時にこの信号/LMATCHの状態(レベ
ル)がデータバスのD0ラインに出力される。内部処理
のための信号群については、その詳細を後に述べる。
Next, regarding the output signal group, the signal INT
R0 and INTR1 form an interrupt request signal with a set of 2 bits, and also serve as a source instruction signal for instructing the priority and the interrupt source corresponding to the priority. The signal / LMATCH is a signal indicating whether or not the levels of the signal / S1 and the signal ITLV match, and in this embodiment, when the signals / RD and / SEL are both true (L), the signal / LMATCH The state (level) is output to the D0 line of the data bus. The details of the signal group for internal processing will be described later.

【0035】表1は、割込(ソース)信号/S0乃至/
S3が真になった時、すなわちいずれかの割込みが発生
した場合及び割込みが発生していない(NONE)場合
の、エンコード割込要求信号のエンコード値と各割込み
の優先度(「優先順位」ともいう)の一例を示す表であ
る。
Table 1 shows the interrupt (source) signals / S0 through //
When S3 becomes true, that is, when any interrupt occurs and no interrupt occurs (NONE), the encode value of the encode interrupt request signal and the priority of each interrupt (also referred to as "priority order") It is a table showing an example.

【0036】[0036]

【表1】 [Table 1]

【0037】表1から明らかなように、常時すなわち割
込みが発生していない時は信号/INTR0,1は共に
偽(H)であるが、信号/S0が真(L)になると信号
/INTR0,1は共に真(L)になり、信号/S2が
真になると信号/INTR1が真(L)、信号/S1又
は/S3が真になると信号/INTR0が真(L)にな
る。その優先順位は後になるほど順に低くなる。
As is clear from Table 1, the signals / INTR0 and 1 are both false (H) at all times, that is, when the interrupt is not generated, but when the signal / S0 becomes true (L), the signal / INTR0,1. 1 becomes true (L), the signal / INTR1 becomes true (L) when the signal / S2 becomes true, and the signal / INTR0 becomes true (L) when the signal / S1 or / S3 becomes true. The priority becomes lower in the later order.

【0038】このように、割込信号/S0乃至/S3の
入力に応じて優先度を決め、エンコード値を出力するP
LD10の作用を、その作用を決定する論理式と図面と
に基づいて説明する。
As described above, the priority level is determined according to the input of the interrupt signals / S0 to / S3, and the encoded value P is output.
The operation of the LD 10 will be described based on the logical formula for determining the operation and the drawings.

【0039】数1及び数2に示す論理式においては、右
辺に使用されている「/」はその信号のローレベルを真
とし、左辺に使用されている「/」は右辺の論理式が真
となった時にその信号がローレベルになることを示す。
その真,偽について論理演算する演算記号は、「*」が
論理積(アンド)、「+」が論理和(オア)、「±」が
排他的論理和(エキスクルーシブ・オア)をそれぞれ示
し、「:=」は右辺の論理結果が直ちに左辺に現れる
(「=」の場合)のではなく、その論理結果がクロック
CLKの立上りでラッチされ、そのラッチされた結果が
左辺に現れることを示す。
In the logical expressions shown in the equations (1) and (2), "/" used on the right side is the low level of the signal, and "/" used on the left side is the logical expression on the right side. Indicates that the signal becomes low level.
As for the operation symbols that perform logical operations on true and false, “*” indicates a logical product (and), “+” indicates a logical sum (or), and “±” indicates an exclusive logical sum (exclusive or). , ": =" Indicates that the logical result on the right side does not immediately appear on the left side (in the case of "="), but the logical result is latched at the rising edge of the clock CLK and the latched result appears on the left side. ..

【0040】[0040]

【数1】(1)pr1=/S0 (2)pr2=/S2*/pr1 (3)lmatch=S1±ITLV (4)pr3=(/lmatch+/S3)*/pr2*/pr1 (5)/laiten:=(/SEL*/WR*/ITEN)+
(WR*/laiten) (6)/iten=/laiten
(1) pr1 = / S0 (2) pr2 = / S2 * / pr1 (3) lmatch = S1 ± ITLV (4) pr3 = (/ lmatch + / S3) * / pr2 * / pr1 (5) / laiten: = (/ SEL * / WR * / ITEN) +
(WR * / laiten) (6) / iten = / laiten

【0041】[0041]

【数2】 (1)/LMATCH=/SEL*/RD*/lmatch (2)/INTR0=/iten*(pr1+pr3) (3)/INTR1=/iten*(pr1+pr2) (4)/MASINT=pr1+pr2+pr3(2) / LMATCH = / SEL * / RD * / lmatch (2) / INTR0 = / iten * (pr1 + pr3) (3) / INTR1 = / iten * (pr1 + pr2) (4) / MASINT = pr1 + pr2 + pr3

【0042】上記の数1はPLD10の内部で処理され
る信号を、数2は出力される信号の論理式をそれぞれ示
す、数1の(6)に示した信号/itenは12番ピン
から一度外部に出力されるが、外部的な接続により直ち
に11番ピンから入力されるため、内部信号として取扱
う。
[Mathematical formula-see original document] The above equation 1 shows the signal processed inside the PLD 10, and the equation 2 shows the logical expression of the output signal. The signal / iten shown in (6) of the equation 1 is once output from the 12th pin. Although it is output to the outside, it is handled as an internal signal because it is input from pin 11 immediately by an external connection.

【0043】図3は入力するクロックCLK及び各信号
/SEL,/ITEN,/WR,/RDと、図4は入力
する割込(ソース)信号/S1,/S3及び信号/IT
LVと、それぞれ内部信号/laiten,/lmat
ch及び出力する割込要求信号/INTR0,/INT
R1との関係の一例を示すタイムチャートである。
FIG. 3 shows the input clock CLK and each signal / SEL, / ITEN, / WR, / RD, and FIG. 4 shows the input interrupt (source) signals / S1, / S3 and signal / IT.
LV and internal signals / laiten, / lmat respectively
ch and output interrupt request signal / INTR0, / INT
It is a time chart which shows an example of a relation with R1.

【0044】各波形の左側に示した信号名は、各信号の
レベルをそのまま表わすため「/」を除いて示したもの
であり、各タイミングを示す破線には本文説明との対比
の便のためアルファベットを付している。また、図3に
おいてITENの波形の一部を1点鎖線で示したのは、
ハイレベルかローレベルか(以下それぞれ「ハイ」,
「ロー」という)場合によってどちらもあり得る部分で
ある。
The signal names shown on the left side of each waveform are shown without the "/" in order to represent the level of each signal as it is, and the broken line showing each timing is for convenience of comparison with the description of the text. The alphabet is attached. Also, in FIG. 3, a part of the waveform of ITEN is shown by a one-dot chain line,
High level or low level (hereinafter “high”,
It is a part that can be both depending on the case.

【0045】まず、数1の(1)により割込信号/S0
が真の間は優先度を示す信号のpr1(プライオリティ
1)がハイになる。(2)により割込信号/S2が真に
なると、pr1がローの時はpr2(プライオリティ
2)がハイになるが、pr1がハイの時はpr2はロー
である。すなわち、/S0の方が優先度が高く、/S0
が真の間は/S2は受付けられず、マスクされて了う。
First, the interrupt signal / S0 according to (1) of the equation 1
While is true, the signal pr1 (priority 1) indicating the priority becomes high. When the interrupt signal / S2 becomes true by (2), pr2 (priority 2) becomes high when pr1 is low, but pr2 is low when pr1 is high. That is, / S0 has a higher priority, and / S0
While / is true, / S2 is not accepted and masks and ends.

【0046】数1の(3)は、その立下りと立上りで割
込みが発生する割込信号S1と入力信号ITLVとの排
他的論理和がとられてレベルの一致/不一致を示す信号
lmatchのレベルが決定されることを示し、図4の
タイミングA,B,C,D,Eの各間の部分に示したよ
うに、S1とITLVのレベルが不一致の時にlmat
chはハイになり、一致の時にローになる。したがっ
て、ITLVがローの時はS1のレベルがそのままlm
atchのレベルになり、ハイの時はS1のレベルが反
転してlmatchに現われる。
(3) of the equation (1) is the level of the signal lmatch indicating the level match / mismatch by taking the exclusive OR of the interrupt signal S1 and the input signal ITLV at which the interrupt is generated at the falling edge and the rising edge. Is determined, and as shown in the portions between timings A, B, C, D, and E in FIG. 4, when the levels of S1 and ITLV do not match, lmat
ch goes high and goes low on a match. Therefore, when ITLV is low, the level of S1 remains lm
The level of S1 is reached, and when high, the level of S1 is inverted and appears in lmatch.

【0047】数1の(4)により、lmatchがロー
か割込信号/S3が真(ロー)になるとpr3(プライ
オリティ3)がハイになるが、pr1又はpr2のいず
れかでもハイ、すなわち/S0又は/S2の割込みが発
生していればマスクされて了う。すなわち、割込みが同
時に又は一方を処理中に他の割込みが発生した場合、ど
ちらを優先して処理するかを示す優先度はpr1(/S
0)が最も高く、pr2(/S2)がそれに次ぎ、pr
3(/S1,/S3は同じレベル)が最も低い。
According to the equation (4), pr3 (priority 3) becomes high when lmatch becomes low or the interrupt signal / S3 becomes true (low), but either pr1 or pr2 becomes high, that is, / S0. Or, if the / S2 interrupt is generated, the masking ends. That is, when interrupts occur simultaneously or while one interrupt is being processed and the other interrupt occurs, the priority indicating which is prioritized is pr1 (/ S
0) is the highest, pr2 (/ S2) is next, pr
3 (/ S1 and / S3 are at the same level) is the lowest.

【0048】数1の(5)については図3を参照して説
明する。図3に示したように、CPU2からそれぞれ入
力する各信号SEL,ITEN,WRがそれぞれ真(ロ
ー)になると、(5)に示した論理式の右辺の第1項が
真になり、第2項はその内のWRによって偽になるが、
第1項と第2項の論理和がとられて右辺が真になり、ク
ロックCLKの立上りAでラッチされた結果により内部
信号laiten(ラッチド・インタラプト・イネーブ
ル)はローになり、同時にSEL,ITEN,WRがハ
イに戻る。
The equation (5) of the equation 1 will be described with reference to FIG. As shown in FIG. 3, when the signals SEL, ITEN, and WR respectively input from the CPU 2 become true (low), the first term on the right side of the logical expression shown in (5) becomes true, and the second The term becomes false due to WR in it,
The logical sum of the first and second terms is taken, the right side becomes true, and the result of being latched at the rising edge A of the clock CLK causes the internal signal laiten (latched interrupt enable) to go low, and at the same time, SEL and ITEN. WR returns to high.

【0049】次のクロックの立上りBでは、WRがハイ
に戻っているから、数1の(5)の論理式の右辺の第1
項は偽になるが、WR,/laitenは共にハイであ
るから第2項は真になり、laitenはローのままに
保持される。12番ピン,11番ピンを経て再び内部に
フィードバックされ14乃至17番ピンの出力を制御す
る信号itenは、数1の(6)によりlaitenと
同じものである。このlaiten及びitenは、再
びSEL,WRが真(ロー)になり、ITENがハイで
ある時に、数1の(5)の右辺の第1項及び第2項が共
に偽となり、クロックCLKの立上りE(図3)でロッ
クされてハイに戻る。
At the next rising edge B of the clock, WR returns to high, so that the first side on the right side of the logical expression (5) of equation 1 is used.
The term becomes false, but since WR and / laiten are both high, the second term is true and laiten remains low. The signal iten, which is fed back to the inside through the 12th and 11th pins and controls the output of the 14th to 17th pins, is the same as the laiten according to the equation (6). When SEL and WR are true (low) again and ITEN is high, the first term and the second term on the right side of (5) of Formula 1 are both false and the laiten and iten rise and the clock CLK rises. It locks at E (Fig. 3) and returns to high.

【0050】数2は出力信号の論理式を示し、その
(1)によって入力信号/SEL,/RDが共に真(ロ
ー)の時(図3のクロックCLKの立下りCと立上りD
の間)に、内部信号lmatchのレベルはそのまま外
部信号LMATCHとして、19番ピンから出力され
る。それ以外の時は、LMATCHはハイである。数2
の(2)及び(3)は、PLD10からCPU2に出力
する割込要求信号を構成する信号/INTR0及び/I
NTR1の論理式を示し、数1の(1),(2),
(4)によりそれぞれ決定された複数個が同時にハイに
なることはないpr1,pr2,pr3を組合せて決定
される。
Equation 2 shows the logical expression of the output signal. According to (1), when the input signals / SEL and / RD are both true (low) (falling C and rising D of the clock CLK in FIG. 3).
During the period), the level of the internal signal lmatch is output as it is from the 19th pin as the external signal LMATCH. Otherwise, LMATCH is high. Number 2
(2) and (3) are signals / INTRO and / I which constitute the interrupt request signal output from the PLD 10 to the CPU 2.
The logical formula of NTR1 is shown, and the equations (1), (2),
It is determined by combining pr1, pr2 and pr3 such that the plurality determined in (4) do not become high at the same time.

【0051】/INTR0は数2の(2)により、pr
1又はpr3がハイであって/itenが真(ロー)の
時に真(ロー)になり、/INTR1は(3)により、
pr1又はpr2がハイであって/itenが真の時に
真(ロー)になる。
/ INTR0 is pr according to (2) of equation 2.
1 or pr3 is high and / iten is true (low), true (low), / INTR1 is (3)
Goes true (low) when pr1 or pr2 is high and / iten is true.

【0052】数2の(4)に示した出力信号/MASI
NTは、/S0〜/S3のいずれかの割込みが発生すれ
ばpr1,pr2,pr3の論理和により真(ロー)に
なる。この信号は外部無接続の18番ピンに出力される
からこの実施例では使用されないが、後述する割込信号
処理装置6の第2実施例では有効に作用する。
Output signal / MASI shown in (4) of equation 2
NT becomes true (low) by the logical sum of pr1, pr2, and pr3 when any of the interrupts / S0 to / S3 occurs. This signal is not used in this embodiment because it is output to the externally unconnected pin 18, but it works effectively in the second embodiment of the interrupt signal processing device 6 described later.

【0053】以上説明したことから、表1に示したよう
に、割込みがなければpr1〜3はすべてはすべてロー
であるから、/INTR0,1は共に偽(ハイ)であ
る。S0のソースに割込みが発生すると、優先度(順
位)1のpr1がハイになるから/INTR1,/IN
TR0は共にハイになる。S2のソースに割込みが発生
すると、S0による割込みがなければ順位2のpr2が
ハイになるから、/INTR1はロー,/INTR0は
ハイになる。
From the above description, as shown in Table 1, since all pr1 to pr3 are low unless there is an interrupt, / INTR0 and 1 are both false (high). When an interrupt occurs at the source of S0, pr1 of priority (rank) 1 becomes high. / INTR1, / IN
TR0 goes high together. When an interrupt occurs at the source of S2, pr2 of rank 2 goes high unless there is an interrupt by S0, so / INTR1 goes low and / INTR0 goes high.

【0054】S3のソースに割込みが発生するか、/I
TLVのレベルに応じて信号S1の立上りか立下りで割
込みが真と判定(lmatchがハイ)されて、S0又
はS2による割込みがなければ順位3のpr3がハイに
なり、/INTR1はハイ,/INTR0はローにな
る。
An interrupt occurs at the source of S3 or / I
If the interrupt is determined to be true (lmatch is high) at the rising or falling of the signal S1 according to the level of TLV, and if there is no interrupt by S0 or S2, pr3 of rank 3 becomes high, / INTR1 becomes high, / INTRO goes low.

【0055】CPU2は、専用のライン8(図1)を介
して入力する割込要求信号/INTR0,1がいずれも
ハイであれば割込なしと判定する。いずれか1つでも真
(L)であれば割込発生と判定し、割込処理に移る。そ
の際に割込要求信号はコード化されて、優先度と同時に
ソース指示信号をも兼ねているから、コードを解読して
割込ソースに応じた割込処理を行なうことが出来る。
The CPU 2 determines that there is no interrupt if both the interrupt request signals / INTR0, 1 input via the dedicated line 8 (FIG. 1) are high. If any one of them is true (L), it is determined that an interrupt has occurred, and the process proceeds to the interrupt process. At this time, the interrupt request signal is coded and serves as the source instruction signal as well as the priority. Therefore, it is possible to decode the code and perform the interrupt processing according to the interrupt source.

【0056】表1に示したように、INTR1,INT
R0が〔L,L〕であれば優先度1で割込ソースはS0
すなわちタイマからの割込みであり、〔L,H〕であれ
ば優先度2でS2すなわちデータ送受信の割込である。
As shown in Table 1, INTR1, INT
If R0 is [L, L], priority is 1 and interrupt source is S0
That is, it is an interrupt from a timer, and if it is [L, H], it is S2 with a priority of 2, that is, an interrupt of data transmission / reception.

【0057】しかしながら、〔H,L〕であれば優先度
3であることは明らかであるが、割込ソースがS1,S
3のどちらかは分らないから、CPU2はI/Oポート
5を介してポーリングを行ない、S3すなわち或る作業
又は処理の終了を示すのか、S1を出力している作業の
開始又は終了を示しているのかを、割込ソースのレベル
を調べることで処理プログラムを選択する。もし、S1
であれば、CPU2自身が出力している信号ITLVの
レベルによって、作業の開始か終了かを判定する。
However, if it is [H, L], it is obvious that the priority is 3, but the interrupt sources are S1 and S.
Since it does not know which of the three, the CPU2 polls through the I / O port 5 to indicate S3, that is, the end of a certain work or process, or the start or end of the work outputting S1. The processing program is selected by checking the interrupt source level. If S1
If so, it is determined whether the work is started or ended according to the level of the signal ITLV output by the CPU 2 itself.

【0058】このように、割込信号処理装置6が、CP
U2にコード化した割込要求信号を出力するから、CP
U2は2ビットの入力で3レベルの優先度あるいは4個
の割込ソースによる割込みを処理することが出来る。さ
らに細分化された優先度あるいは多数の割込みを処理す
る場合の例を次に示す。
In this way, the interrupt signal processing device 6
Since the interrupt request signal coded to U2 is output, CP
U2 is a 2-bit input and can handle interrupts with three levels of priority or four interrupt sources. An example of processing a further subdivided priority or a large number of interrupts is shown below.

【0059】図5は、割込信号処理装置6の第2実施例
を示すブロック図であり、2個のPLDすなわちメイン
のPLD15とサブのPLD16とから構成されてい
る。メインのPLD15は、第1実施例のPLD10と
同一の論理構成であるから、重複する部分の説明は省略
する。サブのPLD16は、論理構成は若干異なるが、
電源(Vcc),GND,入力用,出力用,入出力兼用
の各端子の配列は全く同様である。
FIG. 5 is a block diagram showing a second embodiment of the interrupt signal processing device 6, which is composed of two PLDs, that is, a main PLD 15 and a sub PLD 16. Since the main PLD 15 has the same logical configuration as the PLD 10 of the first embodiment, the description of the overlapping parts will be omitted. The sub PLD 16 has a slightly different logical configuration,
The power supply (Vcc), GND, input, output, and input / output terminals are arranged in exactly the same manner.

【0060】すなわち、クロックCLK及び入力信号/
ITEN,/WR,/RD,/SELはPLD15,1
6の各1,7,8,9,13番ピンにそれぞれ並列に入
力し、各11番ピンと12番ピンとは外部的に接続され
ている。PLD15及び16の各2乃至5番ピンには、
それぞれ割込ソース信号/S0〜3及び/S4〜7が入
力する。
That is, the clock CLK and the input signal /
ITEN, / WR, / RD, / SEL are PLD15, 1
Inputs are made in parallel to pins 1, 7, 8, 9, and 13 of 6, respectively, and pins 11 and 12 are externally connected. Pins 2 to 5 of PLDs 15 and 16 are
The interrupt source signals / S0-3 and / S4-7 are input, respectively.

【0061】入力信号で異なる所は、PLD15の6番
ピンには第1実施例と同じく信号ITLVが入力するの
に対し、PLD16の6番ピンは、PLD15の/S0
〜3のいずれかの割込みが入力した時に、その18番ピ
ンから出力する信号/MASINTが入力する。
The difference between the input signals is that the signal ITLV is input to the 6th pin of the PLD 15 as in the first embodiment, whereas the 6th pin of the PLD 16 is / S0 of the PLD 15.
When any of the interrupts 3 to 3 is input, the signal / MASINT output from the 18th pin is input.

【0062】PLD15,16の各14及び15番ピン
から出力される割込要求信号/INTR0及び/INT
R1はそれぞれ互いに並列に接続されて、それぞれプル
アップされたラインに出力する。PLD15の18,1
9番ピンからはそれぞれ信号/MASINT,/LMA
TCHが出力される。PLD15の16,17番ビン及
びPLD16の16乃至19番ピンはNCである。
Interrupt request signals / INTR0 and / INT output from pins 14 and 15 of PLDs 15 and 16, respectively.
The R1s are connected in parallel with each other and output to the pulled-up lines. PLD15 18,1
Signals / MASINT and / LMA from pin 9 respectively
TCH is output. The 16th and 17th bins of PLD 15 and the 16th to 19th pins of PLD 16 are NC.

【0063】表2は、サブのPLD16の2乃至6番ピ
ンに入力する割込(ソース)信号/S4乃至/S7及び
信号/MASINTが真になった時、すなわちいずれか
の割込みが発生した場合及び割込みが発生していない
(NONE)場合の、エンコード割込要求信号のエンコ
ード値と各割込みの優先度の一例を示す表である。
Table 2 shows that when the interrupt (source) signals / S4 to / S7 and the signal / MASINT input to pins 2 to 6 of the sub PLD 16 become true, that is, when any interrupt occurs. 9 is a table showing an example of the encode value of the encode interrupt request signal and the priority of each interrupt when an interrupt has not occurred (NONE).

【0064】表2から明らかなように、常時すなわち割
込みが発生していない時は信号/INTR0,1は共に
偽(H)であるが、信号/MASINTが真(L)にな
ると信号/INTR0,1は共に真(L)になり、信号
/S4又は/S5が真になると信号/INTR1が真
(L)、信号/S6又は/S7が真になると信号/IN
TR0が真(L)になる。その優先順位は後になるほど
順に低くなる。
As is apparent from Table 2, the signals / INTR0 and 1 are both false (H) at all times, that is, when the interrupt is not generated, but when the signal / MASINT becomes true (L), the signal / INTR0,1. 1 becomes true (L), signal / INT4 becomes true (L) when signal / S4 or / S5 becomes true, and signal / IN becomes true when signal / S6 or / S7 becomes true.
TR0 becomes true (L). The priority becomes lower in the later order.

【0065】[0065]

【表2】 [Table 2]

【0066】この第2実施例においては、それぞれ4個
の割込信号をブロックとして入力する2個のPLDのう
ち、メインのPLD15の方がサブのPLD16より優
先度が高く、それぞれのPLD15,16において割込
ソース毎に優先度が設定されているから各割込信号の優
先度は高い方から順に、/S0,/S2,(/S1又は
/S3),(/S4又は/S5),(/S6又は/S
7)となっている。
In the second embodiment, of the two PLDs each of which inputs four interrupt signals as a block, the main PLD 15 has a higher priority than the sub PLD 16, and the respective PLDs 15 and 16 are provided. Since priority is set for each interrupt source in /, the priority of each interrupt signal is / S0, / S2, (/ S1 or / S3), (/ S4 or / S5), ( / S6 or / S
7).

【0067】サブのPLD16の作用を数3及び数4に
示す論理式に基づいて説明する。数3及び数4は、それ
ぞれ数1及び数2に示したと同様に、内部信号に関する
論理式と外部出力信号に関する論理式とに分けたもので
ある。
The operation of the sub PLD 16 will be described based on the logical expressions shown in equations (3) and (4). The mathematical expressions 3 and 4 are divided into the logical expressions for the internal signal and the external output signal, as in the expressions 1 and 2, respectively.

【0068】[0068]

【数3】(1)pr1=/MASINT (2)pr2=(/S4+/S5)*/pr1 (3)pr3=(/S6+/S7)*/pr2*/pr1 (4)/laiten:=(/SEL*/WR*ITEN)+
(WR+/laiten) (5)/iten=/laiten
[Equation 3] (1) pr1 = / MASINT (2) pr2 = (/ S4 + / S5) * / pr1 (3) pr3 = (/ S6 + / S7) * / pr2 * / pr1 (4) / laiten: = ( / SEL * / WR * ITEN) +
(WR + / laiten) (5) / iten = / laiten

【0069】[0069]

【数4】 (1)/INTR0=/iten*(pr1+pr3) (2)/INTR1=/iten*(pr1+pr2)(4) (1) / INTR0 = / iten * (pr1 + pr3) (2) / INTR1 = / iten * (pr1 + pr2)

【0070】ここで、PLD15から入力する信号/M
ASINTは、数2の(4)に示したように、pr1乃
至pr3の論理和の結果に応じて真(L)になる。従っ
て、数3の(1)によりPLD15の割込信号/S0〜
/S3 のいずれかに割込みが発生すれば、pr1(プ
ライオリティ1)がハイになる。
Here, the signal / M input from the PLD 15
ASINT becomes true (L) according to the result of the logical sum of pr1 to pr3, as shown in (4) of Equation 2. Therefore, the interrupt signal / S0 of the PLD 15 is calculated by the equation (1) in Equation 3.
If an interrupt occurs on any of / S3, pr1 (priority 1) goes high.

【0071】数3の(2)により、PLD16の割込信
号/S4,/S5のいずれかが真になり、pr1がロー
であればpr2(プライオリティ2)がハイになる。同
様に(3)により、割込信号/S6,/S7のいずれが
真になり、pr1及びpr2が共にローであればpr3
がハイになる。従って、上記の/S0から(/S6又は
/S7)の優先順位が決定されることになる。数3の
(5)及び数4の(1),(2)は、それぞれ数1の
(6)及び数2の(2),(3)と同一であるから説明
を省略する。
According to the equation (2), either of the interrupt signals / S4 and / S5 of the PLD 16 becomes true, and if pr1 is low, pr2 (priority 2) becomes high. Similarly, by (3), if either of the interrupt signals / S6, / S7 becomes true and both pr1 and pr2 are low, pr3
Becomes high. Therefore, the priority order from / S0 to (/ S6 or / S7) is determined. Since the expression (5) and the expression (1) and (2) of the expression 4 are the same as the expression (6) and the expression (2) and (3) of the expression 2, respectively, the description thereof will be omitted.

【0072】数3の(4)は数1の(5)に似ている
が、論理式の右辺の第1項において、論理積(アンド)
の一要素である信号ITENが、前者はITENであ
り、後者は/ITENである。従って、CPU2から入
力する信号ITENがハイであれば、PLD16の信号
/laitenすなわち/itenがアクティブにな
り、数4の(1),(2)に示したように、PLD16
がイネーブルとなる。
Equation (4) is similar to Equation (5), but in the first term on the right side of the logical expression, the logical product (AND)
The signal ITEN which is one of the elements is the former ITEN and the latter / ITE. Therefore, if the signal ITEN input from the CPU 2 is high, the signal / laiten of the PLD 16, that is, / iten becomes active, and as shown in (1) and (2) of Equation 4, the PLD 16
Is enabled.

【0073】反対に、信号ITENがローであれば、P
LD15の信号/laiten,/itenがアクティ
ブになり、数2の(2),(3)に示したように、PL
D15がイネーブルとなる。したがって、PLD15,
16が同時にイネーブル又はディスエーブルになること
はなく、必ず一方がイネーブルで他方がディスエーブル
になる。ディスエーブルになったPLDの14,15番
ピンの出力はオープン(遮断)状態になるから、割込要
求信号INTR0,1の各ラインが共通であっても何ら
問題はない。
Conversely, if the signal ITEN is low, then P
The signals / laiten and / iten of the LD15 become active, and as shown in (2) and (3) of the equation 2, the PL
D15 is enabled. Therefore, PLD15,
16 are never enabled or disabled at the same time, always one enabled and the other disabled. Since the outputs of the disabled PLD pins 14 and 15 are open (cut off), there is no problem even if each line of the interrupt request signals INTR0 and INTR1 is common.

【0074】以上の説明及び表2に示したように、PL
D16は信号/MASINTが優先度1で、割込信号/
S4又は/S5がそれに次ぎ、割込信号/S6又は/S
7の優先度3が最も低い。/S4と/S5、/S6と/
S7の優先度はそれぞれ同レベルである。
As shown in the above description and Table 2, PL
D16 has a signal / MASINT with a priority of 1, and an interrupt signal /
S4 or / S5 is next, and interrupt signal / S6 or / S
Priority 3 of 7 is the lowest. / S4 and / S5, / S6 and /
The priorities of S7 are the same level.

【0075】この第2実施例においては、通常時にはC
PU2は信号/ITENのレベルをハイにして出力して
いるから、サブのPLD16がイネーブルであり、割込
みがなければ(NONE)、INTR0,1が共にハイ
になっている。
In the second embodiment, C is normally used.
Since the PU2 outputs the signal / ITEN with the high level, the sub PLD 16 is enabled, and if there is no interrupt (NONE), both INTR0 and INTR1 are high.

【0076】割込ソースS4〜S7のいずれかに割込み
が発生すると、PLD16が出力する割込要求信号IN
TR0又は1のいずれかがローになり、CPU2は割込
みの発生を検知しそのコードを解析して、INTR0が
ローであれば優先度3と判定して割込ソースS6とS7
を、INTR1がローであれば優先度2と判定して割込
ソースS4とS5をそれぞれポーリングすることによ
り、割込ソースを特定してそれぞれに対応する割込処理
プログラムを実行する。
When an interrupt occurs in any of the interrupt sources S4 to S7, the interrupt request signal IN output from the PLD 16
When either TR0 or 1 becomes low, the CPU 2 detects the occurrence of the interrupt, analyzes the code, and if INTR0 is low, determines that the priority level is 3 and interrupt sources S6 and S7.
If INTR1 is low, it is determined as priority 2 and the interrupt sources S4 and S5 are respectively polled to specify the interrupt source and execute the interrupt processing program corresponding to each.

【0077】PLD16より優先度の高いメインのPL
D15の割込ソースS0〜S3に割込みが発生すると、
PLD15はそれを検知して信号/MASINTを真
(L)にするから、PLD16は割込ソースS4〜S7
からの割込みの有無に関係なく、INTR0,1を共に
ローにして(PLD16の)優先度1の割込要求信号を
出力する。
Main PL having higher priority than PLD 16
When an interrupt occurs on the interrupt source S0 to S3 of D15,
Since the PLD 15 detects this and sets the signal / MASINT to true (L), the PLD 16 sets the interrupt sources S4 to S7.
Irrespective of the presence or absence of an interrupt from, both INTR0 and INTR1 are set to low and an interrupt request signal of priority 1 (of PLD 16) is output.

【0078】CPU2は、PLD16からの優先度1の
割込要求信号を検知してメインのPLD15に割込みが
発生したことを知ると、直ちに/ITENのレベルをロ
ーに切換えるから、PLD16がディエーブルに、PL
D15がイネーブルになる。次に、CPU2はPLD1
5の出力する割込要求信号を入力してデコードし、割込
みの発生したソースに応じた割込処理プログラムを実行
する。その処理が終りPLD15に他の割込みが発生し
ていなければ、信号/ITENのレベルをハイに戻して
PLD16からの割込要求信号を待機する。
When the CPU 2 detects the interrupt request signal of priority 1 from the PLD 16 and knows that the main PLD 15 is interrupted, it immediately switches the level of / ITEN to low, so that the PLD 16 is disabled. PL
D15 is enabled. Next, CPU2 is PLD1
The interrupt request signal output by the signal 5 is input and decoded, and the interrupt processing program corresponding to the source where the interrupt occurs is executed. If the processing ends and no other interrupt is generated in the PLD 15, the level of the signal / ITEN is returned to high and the interrupt request signal from the PLD 16 is waited.

【0079】このように、常時はサブのPLD16をイ
ネーブルにしているが、メインのPLD15に割込みが
発生すれば直ちにPLD15に切換えるから、優先度は
PLD15の方が高く、各PLDの中では予め設定した
優先度に応じて割込処理するから、この第2実施例では
優先度が実質的に5レベルに細分化され、割込ソースの
数も8個に増加している。
As described above, the sub PLD 16 is normally enabled, but when the main PLD 15 is interrupted, it is switched to the PLD 15 immediately. Therefore, the PLD 15 has a higher priority and is set in advance in each PLD. Since the interrupt processing is performed according to the priority, the priority is subdivided into substantially five levels in this second embodiment, and the number of interrupt sources is increased to eight.

【0080】さらに優先度を細分化し割込ソースの数を
増加させたい場合は、第2のサブのPLDを設け、その
6番ピンにPLD16の18番ピンから信号/MASI
NTに相当する信号を出力すればよい。この時、信号/
ITENに相当する信号をデータバスの他のラインを介
して送るようにすればよい。
To further subdivide the priority and increase the number of interrupt sources, a second sub PLD is provided, and the 6th pin thereof is provided with a signal / MASI from the 18th pin of the PLD 16.
It suffices to output a signal corresponding to NT. At this time, the signal /
A signal corresponding to ITEN may be sent via another line of the data bus.

【0081】このように優先度を細分化し処理可能な割
込ソースの数を増せば、オアをとる割込みの組数が減っ
てポーリングの頻度が少なくなり、また、1組の中の割
込ソースの数も減少するから一回のポーリング所要時間
が速くなる。したがって、割込ソースの特定が簡単にな
って割込処理時間が短縮される。
If the priority is subdivided and the number of interrupt sources that can be processed is increased in this way, the number of OR interrupt sets decreases and the polling frequency decreases, and the interrupt sources in one set also decrease. Since the number of polls also decreases, the time required for one polling becomes faster. Therefore, the identification of the interrupt source is simplified and the interrupt processing time is shortened.

【0082】[0082]

【発明の効果】以上説明したように、この発明による割
込制御装置は、割込処理時間を短縮することが出来る。
さらに、必要に応じては優先度の細分化が可能になる。
As described above, the interrupt control device according to the present invention can shorten the interrupt processing time.
Further, the priority can be subdivided as necessary.

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

【図1】この発明による割込制御装置の一実施例の構成
を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an embodiment of an interrupt control device according to the present invention.

【図2】図1に示した割込信号処理装置の第1実施例を
示すブロック図である。
FIG. 2 is a block diagram showing a first embodiment of the interrupt signal processing device shown in FIG.

【図3】図2に示した割込信号処理装置の各部の信号の
一例を示すタイムチャートである。
FIG. 3 is a time chart showing an example of signals of respective parts of the interrupt signal processing device shown in FIG.

【図4】図2に示した割込信号処理装置の他の部分の信
号の一例を示すタイムチャートである。
FIG. 4 is a time chart showing an example of signals of other portions of the interrupt signal processing device shown in FIG.

【図5】図1に示した割込信号処理装置の第2実施例を
示すブロック図である。
5 is a block diagram showing a second embodiment of the interrupt signal processing device shown in FIG.

【符号の説明】[Explanation of symbols]

1 割込制御装置 2 CPU
(中央処理装置) 6 割込信号処理装置(割込みを真と判定する手段,割
込要求出力手段,ブロック決定手段,ソース指示出力手
段) 10,15,16 PLD(プログラマブル・ロジック
・デバイス) 11 論理アレー S0〜S7 割込ソース信号 ITLV 割
込レベル信号
1 Interrupt control device 2 CPU
(Central processing unit) 6 Interrupt signal processing device (means for determining an interrupt to be true, interrupt request output means, block determination means, source instruction output means) 10, 15, 16 PLD (programmable logic device) 11 logic Array S0 to S7 Interrupt source signal ITLV Interrupt level signal

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 割込処理機能を有しシステム制御を行な
う中央処理装置を備えた割込制御装置において、 前記中央処理装置から入力する、割込ソース信号がハイ
レベル又はローレベルのいずれの時に割込みを真にする
かを指示する割込レベル信号に応じて前記割込ソース信
号の変化を検出し、その割込ソース信号がハイレベルか
らローレベルに、あるいはローレベルからハイレベルに
変化した時にそのいずれかの割込ソース信号による割込
みを真と判定する手段と、 該手段が前記割込みを真と判定した時に、前記中央処理
装置に割込要求信号を出力する割込要求出力手段とを設
けたことを特徴とする割込制御装置。
1. An interrupt control device having a central processing unit having an interrupt processing function and performing system control, when an interrupt source signal input from said central processing unit is at a high level or a low level. A change in the interrupt source signal is detected in response to an interrupt level signal indicating whether to make an interrupt true, and when the interrupt source signal changes from a high level to a low level or from a low level to a high level. An interrupt request output means for outputting an interrupt request signal to the central processing unit when the interrupt is determined to be true by the interrupt source signal is provided. An interrupt control device characterized in that
【請求項2】 割込処理機能を有しシステム制御を行な
う中央処理装置を備えた割込制御装置において、 入力する複数の割込ソース信号を複数個ずつまとめてブ
ロックとし、その各ブロック毎に割込要求信号の出力の
可否を決定するブロック決定手段を設けたことを特徴と
する割込制御装置。
2. An interrupt control device having a central processing unit for controlling the system having an interrupt processing function, wherein a plurality of interrupt source signals to be inputted are grouped into a plurality of blocks, and each block is divided into blocks. An interrupt control device comprising block determining means for determining whether to output an interrupt request signal.
【請求項3】 請求項1又は2記載の割込制御装置にお
いて、 前記割込ソース信号を出力した割込ソースを指示するソ
ース指示信号を出力するソース指示出力手段を設けたこ
とを特徴とする割込制御装置。
3. The interrupt control device according to claim 1 or 2, further comprising source instruction output means for outputting a source instruction signal for instructing an interrupt source that has output the interrupt source signal. Interrupt control device.
JP25255291A 1991-09-30 1991-09-30 Interrupt controller Pending JPH0588916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25255291A JPH0588916A (en) 1991-09-30 1991-09-30 Interrupt controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25255291A JPH0588916A (en) 1991-09-30 1991-09-30 Interrupt controller

Publications (1)

Publication Number Publication Date
JPH0588916A true JPH0588916A (en) 1993-04-09

Family

ID=17238960

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25255291A Pending JPH0588916A (en) 1991-09-30 1991-09-30 Interrupt controller

Country Status (1)

Country Link
JP (1) JPH0588916A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7269678B2 (en) 2004-03-26 2007-09-11 Denso Corporation Interrupt request program and microcomputer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7269678B2 (en) 2004-03-26 2007-09-11 Denso Corporation Interrupt request program and microcomputer

Similar Documents

Publication Publication Date Title
JPS6156542B2 (en)
KR890015142A (en) Direct Memory Access Control
US4270184A (en) Microprocessor-based programmable logic controller
US4788639A (en) Frequency-coded multi-level interrupt control system for a multiprocessor system
JPH0588916A (en) Interrupt controller
JPH07105175A (en) Microcomputer
KR970003319B1 (en) Data processing system having serial interface
EP0358330A1 (en) Programmable interrupt controller
JPH01246602A (en) Special function unit for programmable controller
KR940008481B1 (en) Interrupt circuit in control system
JPS63211438A (en) Interruption control circuit
KR890004536Y1 (en) Micro computer's interrupt circuit
KR950004207B1 (en) Interface circuit
EP0079159A2 (en) Asynchronous interface
JPS63296139A (en) Interruption control circuit
JPH06195296A (en) Automatic port switching device
KR950008788Y1 (en) Parallel port communication system
JPS63221432A (en) Computer
JPH03130832A (en) Interruption controller
JPS61153739A (en) Interrupting circuit of microprocessor
JPS6226557A (en) Programmable controller
JPS5816323A (en) Control processing system to plural input and output devices
JPS62224848A (en) Logic circuit switching circuit
JPH02300940A (en) Maintenance circuit for display device of computer control system
JPS61107460A (en) Multiprocessor system