JPH06175860A - Microprocessor application device - Google Patents
Microprocessor application deviceInfo
- Publication number
- JPH06175860A JPH06175860A JP32806092A JP32806092A JPH06175860A JP H06175860 A JPH06175860 A JP H06175860A JP 32806092 A JP32806092 A JP 32806092A JP 32806092 A JP32806092 A JP 32806092A JP H06175860 A JPH06175860 A JP H06175860A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- int
- signal
- data
- circuit
- 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
Links
Landscapes
- Bus Control (AREA)
- Exchange Systems With Centralized Control (AREA)
Abstract
(57)【要約】
【目的】短い余裕時間内に、処理の要求を確実に行える
ようにすること。
【構成】割込み(INT) 原因発生期間、INT 信号とステー
タス(ST)を出す複数の回路をデイジーチェーン接続し上
流側程INT の優先順位(PY)を高くしこれら回路は上位IN
T により下位INT は保留とする構成とし、INT 信号によ
りCPU3にINT 処理させる装置において、CPU3には最上位
のINT を受けマスク信号(MSK) 発生指令する手段、最上
位INT を受けると各回路のSTをPY上位から調べ、INT 発
生STがある回路に対してはその回路に対し定めた処理ル
ーチン(RT)をPYに従い行う手段、INT 発生がある回路全
てに対する夫々所定のRTを終了するとMSK 解除指令(CM
D) とINT 解除処理をする手段を設け、またMSK 発生指
令を受けるとCMD を受ける迄の間MSK を発生する手段10
c 、該MSK をCPU のINT 解除処理時間は遅延させる手段
10a 、遅延されたMSK と各回路のINT 信号を通す回路10
b とを持つ手段10を設ける。
(57) [Summary] [Purpose] To ensure that processing requests can be made within a short time. [Structure] A plurality of circuits that output INT signal and status (ST) are connected in a daisy chain during an interrupt (INT) cause occurrence period, and the priority level (PY) of INT is increased toward the upstream side, and these circuits are higher IN
In a device in which the lower INT is held by T, and the CPU3 performs INT processing by the INT signal, the CPU3 receives the highest INT and outputs a command to generate a mask signal (MSK). ST is checked from the upper PY, and for a circuit with an INT generated ST, a means for performing the processing routine (RT) specified for that circuit according to PY, and when each predetermined RT for all circuits with an INT generated is finished, the MSK is released. Directive (CM
D) and means to release INT, and means to generate MSK until receiving CMD when receiving MSK generation command 10
c, means to delay the MSK's INT release processing time
10a, circuit to pass delayed MSK and INT signal of each circuit 10
Provide means 10 with b and.
Description
【0001】[0001]
【産業上の利用分野】本発明は割り込みによるデータ転
送時の制御を短時間に実施可能とし、データ端末接続装
置等に使用して最適なマイクロプロセッサ応用装置に関
する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor application device which enables control of data transfer by interruption in a short time and is optimal for use in a data terminal connection device or the like.
【0002】[0002]
【従来の技術】電子交換機、例えば、構内交換機(PB
X)においては、内部でのデータ伝送を64KBPSのシリア
ル伝送で行っており、一方、電話網を使用してデータ端
末によりデータ通信を行う場合、データ端末では標準的
なシリアル入出力インターフェースを使用して4800BPS
とか、9600BPS とかの伝送速度でデータ授受を行うこと
から、両者の間のインターフェースをとるデータ端末接
続装置を使用する。すなわち、データ端末接続装置を介
してデータ端末をPBXに接続し、データ通信する。2. Description of the Related Art Electronic exchanges, such as private branch exchanges (PBs)
In X), internal data transmission is performed by 64 KBPS serial transmission, while when data communication is performed by the data terminal using the telephone network, the data terminal uses a standard serial input / output interface. 4800 BPS
Since data is transmitted and received at a transmission rate of 9600 BPS, a data terminal connection device is used as an interface between the two. That is, the data terminal is connected to the PBX via the data terminal connection device to perform data communication.
【0003】ところで、従来のデータ端末接続装置は図
6に示すような構成である。図に示すように、データ端
末接続装置1は通信部2、中央処理装置(CPU;マイ
クロプロセッサ)3、ROM4、データバッファである
RAM5、シリアル通信用の入出力インターフェース
(以下、SIO(Serial I/O Controller) と称する)6
および7、シリアル転送を効率良く行うための支援を行
うダイレクト・メモリ・アクセス・コントローラ(以
下、DMAと称する)8、端末とのインターフェースの
ためのドライバ/レシーバ9等で構成されている。そし
て、これらは共通バス上で互いに接続されている。ドラ
イバ/レシーバ9はSIO7の出力するシリアルデータ
をデータ端末側に伝送し、データ端末側からのデータを
受信してSIO7に入力するものである。By the way, the conventional data terminal connection device has a structure as shown in FIG. As shown in the figure, the data terminal connection device 1 includes a communication unit 2, a central processing unit (CPU; microprocessor) 3, a ROM 4, a RAM 5 as a data buffer, an input / output interface for serial communication (hereinafter, SIO (Serial I / O Controller)) 6
And 7, a direct memory access controller (hereinafter, referred to as DMA) 8 for supporting efficient serial transfer, a driver / receiver 9 for interfacing with a terminal, and the like. And these are mutually connected on the common bus. The driver / receiver 9 transmits the serial data output from the SIO 7 to the data terminal side, receives the data from the data terminal side, and inputs the data to the SIO 7.
【0004】CPU3は全体の制御を司るものであり、
ROM4に記憶されたプログラムを実行して制御を行
う。通信部2はPBXとのデータ授受を行うためのもの
である。The CPU 3 is responsible for overall control,
The program stored in the ROM 4 is executed for control. The communication unit 2 is for exchanging data with the PBX.
【0005】RAM5はデータを一時蓄積するためのメ
モリであり、このRAM5はDMA8により、指定範囲
のアドレスがアクセスされてCPUの介在なしに直接デ
ータ転送が行われる。DMA8はアクセス開始アドレス
と範囲の情報をCPU3から受け、且つ、アクセス開始
の指令を受けるとこれら情報に基づいてRAM5をダイ
レクトメモリアクセス制御する。このダイレクトメモリ
アクセス制御は通常、CPUのバス・アクセスの合間を
利用して行われる。The RAM 5 is a memory for temporarily storing data, and the RAM 5 directly accesses the RAM 5 by accessing an address in a specified range by the DMA 8. The DMA 8 receives the access start address and the range information from the CPU 3, and upon receiving the access start command, controls the RAM 5 for direct memory access based on the information. This direct memory access control is normally performed by using the interval between CPU bus accesses.
【0006】SIO6,7はシリアル通信インターフェ
ースLSIであり、直列データ(シリアルデータ)を並
列データ(パラレルデータ)に変換して取り込み、ま
た、並列データを直列データに変換して出力するもので
ある。SIO6,7としては、ここでは一例として8ビ
ットマイクロプロセッサ・ファミリィであるZ80 ファミ
リィ(Z80 系の周辺用LSIチップ)のSIO LSI
等を使用する。SIO6は通信部2で受信したシリアル
データをパラレルデータに変換してバス上に送出し、バ
ス上のパラレルデータをシリアルデータに変換して通信
部2に送出するためのもので、PBX側とのデータ授受
用のものであり、SIO7はドライバ/レシーバ9がデ
ータ端末側より受信して出力するシリアルデータをパラ
レルデータに変換してバス上に送出し、バス上のパラレ
ルデータをシリアルデータに変換してドライバ/レシー
バ9に送出するためのもので、データ端末側とのデータ
授受用のものである。SIOs 6 and 7 are serial communication interface LSIs that convert serial data (serial data) into parallel data (parallel data) and take in it, and convert parallel data into serial data and output it. As the SIOs 6 and 7, here, as an example, the SIO LSI of the Z80 family (Z80 series peripheral LSI chip), which is an 8-bit microprocessor family.
And so on. The SIO 6 is for converting the serial data received by the communication unit 2 into parallel data and transmitting the parallel data to the bus, and converting the parallel data on the bus into serial data and transmitting the serial data to the communication unit 2. The SIO 7 is for data transmission / reception, and the SIO 7 converts the serial data received and output by the driver / receiver 9 from the data terminal side into parallel data and sends the parallel data to the bus, and converts the parallel data on the bus into serial data. For transmitting to the driver / receiver 9 and for exchanging data with the data terminal side.
【0007】これらSIO6,7はデイジーチェーン接
続してある。すなわち、Z80 ファミリのチップでは割り
込みの優先順位に合わせた割り込み制御を簡単にできる
ようにするために、デイジーチェーンと呼ばれる接続方
式を可能にしており、これによれば、デイジーチェーン
方式で接続した複数のチップのうち、幾つかのチップに
割り込み要件が発生すると上流側のチップは自己のIEO
(Interrupt Enable Output) 端子を“L”にし、自己よ
り下流側のチップから割り込み要求を出来ないようにす
ると共に、自己は割り込み信号であるINT を発生してC
PUに与え、割り込みを行う。These SIOs 6 and 7 are connected in a daisy chain. In other words, the Z80 family of chips enables a connection method called a daisy chain in order to easily control interrupts according to the priority order of interrupts. If some of these chips have interrupt requirements, the upstream chip will have its own IEO
Set the (Interrupt Enable Output) terminal to “L” to disable the interrupt request from the chip on the downstream side, and generate the interrupt signal INT and C
It is given to PU and interrupted.
【0008】Z80 ファミリのチップではIEI (Interrupt
Enable Input)端子とIEO 端子とを持ち、上流側のチッ
プのIEO 端子と下流側のチップのIEI 端子を接続するか
たちをデイジーチェーンと呼ぶ。IEI 端子が“H”であ
れば割り込み要求を可能にし、“L”であれば割り込み
要求を出せない。これにより、割り込みの優先順位をそ
の結線順序だけで決定することができる。自己の割り込
みがCPUに受け付けられてその処理が行われている最
中に、自己より上位の優先順位の割り込み要求がCPU
にあった場合には、Z80 系のCPUはデイジーチェーン
接続のチップのIEI を“L”にするのでZ80 系の周辺用
LSI側ではこれを知ることができる。IEI (Interrupt
It has an Enable Input) terminal and an IEO terminal and connects the IEO terminal of the upstream chip and the IEI terminal of the downstream chip is called a daisy chain. If the IEI pin is "H", the interrupt request is enabled, and if it is "L", the interrupt request cannot be issued. As a result, the priority of interrupts can be determined only by the wiring order. While its own interrupt is accepted by the CPU and its processing is being performed, an interrupt request of a higher priority than itself is issued by the CPU.
If so, the CPU of the Z80 system sets the IEI of the chip in the daisy chain connection to "L", so that the peripheral LSI side of the Z80 system can know this.
【0009】CPUに対する割り込み要求はマスカブル
としてある。CPU3の割り込み信号入力端子INT には
SIOの割り込み信号(/INT;但し/は負論理アクティブ
を示す)が入力されるようにしてあり、SIO6,7が
データを受信したり、送出したりする場合、SIOから
CPU3に対し、INT割り込みをかけ、割り込みベク
タを送出する。The interrupt request to the CPU is maskable. When the SIO interrupt signal (/ INT; / indicates negative logic active) is input to the interrupt signal input terminal INT of the CPU3, and the SIO 6 and 7 receive or send data , SIO issues an INT interrupt to the CPU 3 and sends an interrupt vector.
【0010】そのため、データの転送を行えるようにす
るには図7に示すように、SIOの割り込み信号(/INT;
但し/ は負論理アクティブを示す)がCPU3の割り込
み信号入力端子INT に入力されるようにしておく。そし
て、SIO6,7がデータを受信したり、送出したりす
る場合、SIOからCPU3に対し、マスク可能な割り
込みであるINT割り込みが行われるようにする。CP
U3はこのベクタにより割り込みの種類を判断し、DM
A8に対し、データ転送を開始させるべく、次のフレー
ムアドレスを読んだり、フレームを設定したりして条件
設定する。Therefore, in order to enable the data transfer, as shown in FIG. 7, the SIO interrupt signal (/ INT;
However, / indicates negative logic active) is input to the interrupt signal input terminal INT of the CPU3. Then, when the SIOs 6 and 7 receive and send data, the SIO is made to perform an INT interrupt which is a maskable interrupt to the CPU 3. CP
U3 determines the type of interrupt based on this vector, and DM
In order to start data transfer to A8, the next frame address is read and a frame is set to set conditions.
【0011】このような構成において、PBXからデー
タ機器への送信データはCPU3の制御のもとに、通信
部2により受信制御されてSIO6へと入力される。S
IO6に受信データが与えられると、SIO6はCPU
3に対して割り込み信号INTを発生し、これによりC
PU3は現在実行中の処理を終了した時点でこのSIO
6による割り込みを受け付ける。そして、この割り込み
に対し、割り込み受付けしたことをすべてのSIOに対
して知らせる。In such a configuration, the transmission data from the PBX to the data equipment is received and controlled by the communication section 2 under the control of the CPU 3 and input to the SIO 6. S
When the received data is given to IO6, SIO6 becomes CPU
An interrupt signal INT is generated for 3 and C
When PU3 finishes the processing currently being executed, this SIO
Accept interrupt by 6. In response to this interrupt, all the SIOs are notified that the interrupt has been accepted.
【0012】すると割り込み要求したSIO6からは割
り込みのレベルに対応して予め定めたベクタ(割り込み
処理プログラムの先頭アドレス)が発生されるので、C
PU3はこのベクタに対応するアドレスを実行すること
になる。このベクタにより定まるアドレスは例えば、R
OM4上のアドレスであり、ROM4上の当該アドレス
領域には、例えば、ダイレクトメモリアクセスによるS
IO6出力のRAM5への格納を指示するための処理ル
ーチン(転送指示)がプログラムされているとすれば、
SIO6出力はDMA8によりRAM5に記憶されて行
くことになる。Then, since a predetermined vector (the start address of the interrupt processing program) corresponding to the interrupt level is generated from the SIO 6 which requested the interrupt, C
PU3 will execute the address corresponding to this vector. The address determined by this vector is, for example, R
The address on the OM4, and the address area on the ROM4 is, for example, S by direct memory access.
If a processing routine (transfer instruction) for instructing the storage of the IO6 output in the RAM 5 is programmed,
The SIO6 output will be stored in the RAM5 by the DMA8.
【0013】そして、SIO6は通信部2により得られ
る受信データをパラレルデータに変換してバス上に出力
するから、このパラレルデータは、RAM5における所
定の領域に記憶されることになる。通信部2の受信が終
り、SIO6のパラレルデータ出力が終了すると割り込
み原因がなくなるので、SIO6からの割り込み信号I
NTはなくなる。Since the SIO 6 converts the received data obtained by the communication unit 2 into parallel data and outputs it on the bus, this parallel data is stored in a predetermined area of the RAM 5. When the reception of the communication unit 2 ends and the parallel data output of the SIO 6 ends, the cause of the interrupt disappears. Therefore, the interrupt signal I from the SIO 6
NT will disappear.
【0014】CPU3は次にこの記憶したデータの転送
をダイレクトメモリアクセスで行うべく、DMA8に当
該転送すべきデータの格納されている先頭アドレスと、
領域のデータをセットし、DMA8を起動させて、RA
M5における当該転送すべきデータの直接読出しとSI
O7への送出を指令する(転送指示)。Next, the CPU 3 transfers the stored data by direct memory access so that the DMA 8 stores the start address of the data to be transferred,
The area data is set, the DMA8 is activated, and RA
Direct reading of the data to be transferred and SI in M5
Instruct to send to O7 (transfer instruction).
【0015】これにより、SIO7は転送されてきたデ
ータをシリアルデータに変換してドライバ/レシーバ9
に送り、ドライバ/レシーバ9はこのデータをデータ機
器の受信速度に合わせて送出する。As a result, the SIO 7 converts the transferred data into serial data, and the driver / receiver 9
Then, the driver / receiver 9 sends this data according to the receiving speed of the data equipment.
【0016】DMA8による転送はCPU3の動作の合
間を縫って行われるので、DMA8に対する転送指示を
終了すると、CPU3は再び割り込み前の実施ルーチン
の次のルーチンに対する処理を再開する。Since the transfer by the DMA 8 is performed in the interval between the operations of the CPU 3, when the transfer instruction to the DMA 8 is completed, the CPU 3 restarts the process for the routine next to the execution routine before the interruption.
【0017】データ機器からの送信データはドライバ/
レシーバ9に送られ、ここで受信制御されて、SIO7
に送られる。SIO7に受信データが与えられると、S
IO7はCPU3に対して割り込み要求信号INTを発
生し、これによりCPU3は現在実行中の処理を終了し
た時点でこのSIO7による割り込みを受け付ける。そ
して、この割り込みに対し、割り込み受付けしたことを
すべてのSIOに対して知らせる。The data transmitted from the data device is the driver /
SIO7 is sent to the receiver 9 and the reception is controlled there.
Sent to. When the received data is given to SIO7, S
The IO7 generates an interrupt request signal INT to the CPU3, whereby the CPU3 accepts the interrupt by the SIO7 at the time when the currently executed process is completed. In response to this interrupt, all the SIOs are notified that the interrupt has been accepted.
【0018】すると割り込み要求したSIO7からは割
り込みのレベルに対応して予め定めたベクタが発生され
るので、CPU3はこのベクタにより定まるアドレスを
実行することになる。Then, a predetermined vector corresponding to the interrupt level is generated from the SIO 7 which requested the interrupt, so that the CPU 3 executes the address determined by this vector.
【0019】このベクタによる定まるアドレスは上述同
様に、ROM4上のアドレスであり、ROM4上の当該
アドレス領域には、例えば、ダイレクト・メモリ・アク
セスによるSIO7出力のRAM5への転送指示を行う
処理ルーチンがプログラムされているとすれば、この指
示によりDMA8が動作してSIO7出力はダイレクト
・メモリ・アクセスによりRAM5に記憶されて行くこ
とになる。The address determined by this vector is the address on the ROM 4 as described above, and in the address area on the ROM 4, for example, a processing routine for instructing the transfer of the SIO 7 output to the RAM 5 by direct memory access is provided. If it is programmed, the DMA8 operates according to this instruction and the SIO7 output is stored in the RAM5 by direct memory access.
【0020】SIO7は受信データをパラレルデータに
変換してバス上に出力する。ドライバ/レシーバ9の受
信が終り、SIO7のパラレルデータ出力が終了する
と、CPU3は次にこの記憶したデータの転送をダイレ
クトメモリアクセスで行うべく転送指示を出し、DMA
8に当該転送すべきデータの格納されている先頭アドレ
スと、領域のデータをセットして、DMA8を起動させ
る。これにより、DMA8はRAM5における当該転送
すべきデータの直接読出しとSIO6への送出を行う。
SIO6はこれにより転送されてきたデータをシリアル
データに変換して通信部2に送り、通信部2はこのデー
タをデータ機器の受信速度に合わせて送出する。The SIO 7 converts the received data into parallel data and outputs it on the bus. When the reception of the driver / receiver 9 is completed and the parallel data output of the SIO 7 is completed, the CPU 3 next issues a transfer instruction to transfer the stored data by direct memory access, and DMA
The start address in which the data to be transferred is stored and the data in the area are set in 8, and the DMA 8 is activated. As a result, the DMA 8 directly reads the data to be transferred from the RAM 5 and sends it to the SIO 6.
The SIO 6 converts the transferred data into serial data and sends the serial data to the communication unit 2. The communication unit 2 sends this data according to the reception speed of the data device.
【0021】DMA8に対する転送指示そのものが終了
した時点では、CPU3は割り込みに対する終了(割り
込みからの復帰)のための処理を行った後、再び割り込
みにより中断していた前の実施ルーチンの続きを再開す
る。At the time when the transfer instruction itself to the DMA 8 is completed, the CPU 3 performs processing for ending the interrupt (returning from the interrupt), and then restarts the continuation of the previous execution routine which was interrupted by the interrupt again. .
【0022】このようにして、バッファリングし、PB
Xとデータ機器との間でデータの授受を行うが、HDL
C(High Level Data Link Control; ハイレベル・デー
タリンク・コントロール)等の通信規則に基づいてデー
タ伝送を行う場合、図8に示すように、伝送すべきフレ
ームが連続して送られると、フレーム間がフラグ1個分
(1バイト分)と云う短い時間しかないが、その間に次
の受信データの転送指示を終了する必要がある。In this way, buffering and PB
Data is exchanged between X and the data device, but HDL
When data transmission is performed based on a communication rule such as C (High Level Data Link Control), as shown in FIG. There is only one flag (one byte) for a short time, but during that time, it is necessary to finish the transfer instruction of the next received data.
【0023】余裕時間がフラグ1個分程度の非常に短い
時間であっても、次のフレームのデータ受信に先駆けて
ただちに割り込みにより転送指示を行えば問題はない
が、この転送指示が下位の割り込みであるマスカブルな
割り込み(INT による割り込み)であるとすると、その
転送指示終了前に最上位の割込み要求が入った場合、こ
れを最優先にして処理を行い、その後に当該最優先割込
み前に実施していた下位の割り込み処理プログラムであ
る転送指示プログラムを再開するので、転送指示が終わ
る時点では上記フラグ送信の期間を過ぎてしまう。そし
て、このような事態が発生すると、受信転送が間に合わ
ないので、データの欠落と云う事態を招く。Even if the margin time is very short, such as about one flag, there is no problem if the transfer instruction is immediately issued by the interrupt prior to the data reception of the next frame. Is a maskable interrupt (INT interrupt), if the highest interrupt request is received before the end of the transfer instruction, this is given the highest priority for processing, and then executed before the highest priority interrupt. Since the transfer instruction program, which is the lower-order interrupt processing program, is restarted, the flag transmission period ends when the transfer instruction ends. Then, if such a situation occurs, the reception and transfer cannot be performed in time, which causes a situation of data loss.
【0024】[0024]
【発明が解決しようとする課題】上述の如く、PBXと
データ機器との間のデータ授受のインターフェースをと
る装置では、PBXおよびデータ機器とはシリアルデー
タでデータ授受する。そのため、インターフェース内部
ではシリアルデータをSIOによりパラレル変換し、パ
ラレルデータのかたちでメモリに蓄え、この蓄えたデー
タはDMAにより読出して、転送すべき相手側にSIO
を介してシリアルデータ化して送り出す。割り込みの優
先制御(プライオリティ)を簡単にするため、SIOと
してはZ80ファミリを使用してデイジーチェーン接続
し、割り込み要件の発生したSIOからマスカブル割り
込み要求(INT) を発生させ、転送指示をCPUに実行さ
せるようにしているので、CPUに最上位の割り込み要
求であるNMI が発生すると、シリアルデータのフレーム
間が短い場合には次の転送指示を行う前に次のフレーム
のデータが到来してしまい、受信データの欠落が生じて
しまう。As described above, in an apparatus that provides an interface for exchanging data between the PBX and the data equipment, the PBX and the data equipment exchange data as serial data. Therefore, inside the interface, serial data is converted to parallel by SIO and stored in the memory in the form of parallel data, and the stored data is read by DMA and transmitted to the other party to be transferred to SIO.
It is converted into serial data via and sent out. To simplify the priority control (priority) of interrupts, use the Z80 family as SIO to connect in a daisy chain, generate a maskable interrupt request (INT) from the SIO that generated the interrupt requirement, and execute the transfer instruction to the CPU. Therefore, if NMI, which is the highest interrupt request, occurs in the CPU, if the interval between serial data frames is short, the next frame data will arrive before the next transfer instruction is issued. Received data will be lost.
【0025】そこで、この発明の目的とするところは、
HDLCモードでのフレーム伝送等のように、短い余裕
時間しか確保できない場合において、この間に実施しな
ければならない処理の要求を確実に行えるようにしてデ
ータの欠落等の問題を解消できるようにしたプロセッサ
応用装置を提供することにある。Therefore, the object of the present invention is to
A processor that can reliably perform a request for processing that must be executed during a short margin time such as frame transmission in the HDLC mode to solve problems such as data loss To provide an application device.
【0026】[0026]
【課題を解決するための手段】上記目的を達成するた
め、本発明は次のように構成する。すなわち、割り込み
原因の発生期間にわたり割り込み信号を発生する複数の
回路を有し、これら回路はデイジーチェーン接続されて
上流側程、割り込み優先順位が高くなるように構成され
たものであって、これら回路は割り込み原因が発生する
と割り込み発生のステータスを発生し、割り込み信号を
発生すると共に、上位の割り込みがあるときは下位の割
り込みは保留として、割り込み信号の発生を抑制される
構成とし、発生した割込み信号をマイクロプロセッサに
対し、与えることにより、割り込み処理を行わせるよう
にしたマイクロプロセッサ応用装置において、前記マイ
クロプロセッサには最上位の割り込みを受け付けたと
き、この最上位の割り込みをマスクするためのマスク信
号発生を指令する手段と、この最上位の割り込みを受け
ると前記各回路の前記ステータスを優先順位上位のもの
から順にチェックし、割り込み発生ステータスがある回
路に対しては、その回路に対して予め定めた所定の処理
ルーチンを優先順位に従って実施する手段と、割り込み
発生ステータスがある回路すべてに対するそれぞれ所定
の処理ルーチンを終了するとマスク信号解除指令を行う
と共に割り込み解除のための処理を行う手段とを設け、
また、前記マスク信号発生指令を受けると解除指令を受
けるまでの間、マスク信号を発生する発生手段と、この
発生されたマスク信号を少なくとも前記マイクロプロセ
ッサが前記割り込み解除のための処理を行うに要する時
間、遅延させる遅延手段と、この遅延手段を介して得ら
れる前記マスク信号と前記各回路の割り込み信号とを通
すゲート手段とを有する多重割込み規制手段を設けて構
成する。In order to achieve the above object, the present invention is configured as follows. That is, it has a plurality of circuits that generate an interrupt signal over the period of generation of an interrupt cause, and these circuits are daisy-chained so that the interrupt priority becomes higher toward the upstream side. Generates an interrupt status when an interrupt cause occurs, generates an interrupt signal, and holds a lower interrupt when there is an upper interrupt, and suppresses the generation of the interrupt signal. In the microprocessor application device, which is configured to cause the microprocessor to perform interrupt processing, when the microprocessor receives the highest interrupt, a mask signal for masking the highest interrupt. The means of commanding the generation and the reception of this highest-level interrupt And a means for checking the status of each circuit in order from the highest priority, and for a circuit having an interrupt generation status, a means for carrying out a predetermined processing routine predetermined for the circuit according to the priority, When a predetermined processing routine for all circuits having an interrupt generation status is completed, a mask signal release command is provided and means for performing processing for interrupt release is provided.
Further, until the mask signal generation command is received and until the cancellation command is received, the generation means for generating the mask signal and the generated mask signal are required for at least the microprocessor to perform the processing for canceling the interrupt. Multiple interrupt regulating means having delay means for delaying by time and gate means for passing the mask signal obtained through the delay means and the interrupt signal of each circuit is provided.
【0027】[0027]
【作用】このような構成において、割り込みを発生する
デイジーチェーン接続された回路から割り込み信号が発
生されると、この信号は多重割込み規制手段のゲート手
段を介して前記マイクロプロセッサに最上位の割り込み
要求として入力される。マイクロプロセッサは最上位の
割り込みを受け付けると、この最上位の割り込みをマス
クするためのマスク信号発生指令を出し、また、この最
上位の割り込みを受けると前記各回路の前記ステータス
を優先順位上位のものから順にチェックし、割り込み発
生ステータスがある回路に対しては、その回路に対して
予め定めた所定の処理ルーチンを優先順位に従って実施
する。In such a structure, when an interrupt signal is generated from a circuit that is daisy-chained to generate an interrupt, this signal is sent to the microprocessor through the gate means of the multiple interrupt control means to request the highest interrupt. Is entered as. When the microprocessor receives the highest interrupt, it issues a mask signal generation command for masking the highest interrupt, and when the highest interrupt is received, the status of each of the above circuits is set to a higher priority. The check is sequentially performed from the order, and for a circuit having an interrupt generation status, a predetermined processing routine predetermined for the circuit is executed according to the priority order.
【0028】一方、多重割込み規制手段は前記マスク信
号発生指令を受け、マスク信号を発生し、多重割込み規
制手段における遅延手段によってこのマスク信号を少な
くとも前記プロセッサが前記割り込み解除のための処理
を行うに要する時間、遅延させ、ゲート手段に与える。
そのため、ゲート手段に入力されていた割り込み信号は
このマスク信号によりマスクされ、新たに発生する割り
込み信号があってもマスクされてプロセッサには入力さ
れなくなる。プロセッサは最上位の割り込み要求によ
り、割り込み発生ステータスがある回路すべてに対する
それぞれ所定の処理ルーチンを優先順に実施し、それら
がすべて終了するとマスク信号の解除を行うと共に割り
込み解除のための処理(割り込みからの復帰のための処
理)を行う。On the other hand, the multiple interrupt control means receives the mask signal generation command, generates a mask signal, and causes the delay means in the multiple interrupt control means to perform at least the processing of the mask signal by the processor for releasing the interrupt. The time required is delayed and given to the gate means.
Therefore, the interrupt signal input to the gate means is masked by this mask signal, and even if there is a newly generated interrupt signal, it is masked and is not input to the processor. In response to the highest interrupt request, the processor executes the predetermined processing routines for all the circuits with interrupt generation status in order of priority, and when they are all completed, the mask signal is released and the processing for interrupt release (from the interrupt Perform processing for restoration).
【0029】多重割込み規制手段ではマスク信号解除と
なっても、前記プロセッサが前記割り込み解除のための
処理を行うに要する時間、遅延させるので、この間は、
最上位の割り込みを受け付けなくできる。割り込み要求
を発生するデイジーチェーン接続可能な回路、例えば、
Z80 周辺用チップ(SIOやPIO、CTC等)の役割
は決まっており、割り込み原因が発生するとこれらのチ
ップはステータス情報を出力するので、このステータス
をチェックすれば、どの割り込み要求であるかがわかる
ことから、その結果わかった割り込み要求に応じ、飛び
先と、処理ルーチンを決めておけば、各割り込みに対し
て、それぞれ必要な処理を行うことができ、しかも、割
り込み終了のための処理前にステータスチェックでチッ
プの下位の割り込みをチェックして割り込み処理を実施
し、デイジーチェーン接続されたチップに生じたすべて
の割り込みの処理が終了した後に、プロセッサに割り込
み終了のための処理を実施させるので、保留された割り
込みの処理に対する遅れを最小限に抑えることができる
ようになる。Even if the mask signal is released by the multiple interrupt control means, it is delayed by the time required for the processor to perform the processing for releasing the interrupt.
You can stop accepting the highest interrupt. A daisy chainable circuit that generates an interrupt request, for example,
The roles of the Z80 peripheral chips (SIO, PIO, CTC, etc.) are fixed, and when an interrupt cause occurs, these chips output status information, so you can check which interrupt request it is by checking this status. Therefore, by determining the jump destination and the processing routine according to the interrupt request found as a result, it is possible to perform the necessary processing for each interrupt, and also before the processing for ending the interrupt. The status check checks the lower interrupts of the chip to perform interrupt processing, and after the processing of all interrupts that have occurred in the daisy chained chips is completed, the processor is made to perform processing for interrupt completion, It is possible to minimize the delay for processing the pending interrupt.
【0030】従って、この発明によれば、HDLCモー
ドでのフレーム伝送等のように、短い余裕時間しか確保
できない場合において、この間に実施しなければならな
いDMAよる転送指示等の割り込み処理であれば、これ
を確実に行えるようになり、データの欠落等の問題を解
消できるようになる。Therefore, according to the present invention, in the case where only a short margin time can be secured such as frame transmission in the HDLC mode, if the interrupt processing such as the transfer instruction by the DMA must be executed during this period, This can be surely done, and problems such as data loss can be solved.
【0031】[0031]
【実施例】以下、本発明の一実施例について、図面を参
照して説明する。図1は本発明の一実施例を示すブロッ
ク図であって、図に示すように、データ端末接続装置1a
は通信部2、中央処理装置(CPU)3、ROM4、デ
ータバッファであるRAM5、シリアル通信用の入出力
インターフェース(以下、SIOと称する)6および
7、シリアル転送を効率良く行うための支援を行うダイ
レクト・メモリ・アクセス・コントローラ(以下、DM
Aと称する)8、端末とのインターフェースのためのド
ライバ/レシーバ9等で構成されている。そして、これ
らは共通バス上で互いに接続されている。ドライバ/レ
シーバ9はSIO7の出力するシリアルデータをデータ
端末側に伝送し、データ端末側からのデータを受信して
SIO7に入力するものである。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention. As shown in FIG.
Is a communication unit 2, a central processing unit (CPU) 3, a ROM 4, a RAM 5 which is a data buffer, an input / output interface (hereinafter referred to as SIO) 6 and 7 for serial communication, and supports for efficiently performing serial transfer. Direct memory access controller (hereinafter DM
8), a driver / receiver 9 for interfacing with a terminal, and the like. And these are mutually connected on the common bus. The driver / receiver 9 transmits the serial data output from the SIO 7 to the data terminal side, receives the data from the data terminal side, and inputs the data to the SIO 7.
【0032】CPU3は全体の制御を司るものであり、
ROM4に記憶されたプログラムを実行して制御を行
う。通信部2はPBXとのデータ授受を行うためのもの
である。The CPU 3 is responsible for overall control,
The program stored in the ROM 4 is executed for control. The communication unit 2 is for exchanging data with the PBX.
【0033】SIO6,7はシリアル通信インターフェ
ースLSIであり、直列データ(シリアルデータ)を並
列データ(パラレルデータ)に、また、並列データを直
列データに変換して出力するものである。SIO6,7
としては、ここでは一例として8ビットマイクロプロセ
ッサであるZ80 におけるファミリィのSIO LSI等
を使用する。RAM5はデータを一時蓄積するためのメ
モリであり、このRAM5はDMA8により、指定範囲
のアドレスがアクセスされてCPUの介在なしに直接デ
ータ転送が行われる。SIOs 6 and 7 are serial communication interface LSIs, which convert serial data (serial data) into parallel data (parallel data) and convert parallel data into serial data for output. SIO 6,7
As an example, a family SIO LSI in the Z80 which is an 8-bit microprocessor is used here. The RAM 5 is a memory for temporarily storing data, and the RAM 5 directly accesses the RAM 5 by accessing an address in a designated range by the DMA 8.
【0034】DMA8はアクセス開始アドレスと範囲等
の情報をCPUから受け、且つ、アクセス開始の指令を
受けるとこれら情報に基づいてRAM5をダイレクトメ
モリアクセス制御する。SIO6は通信部2で受信した
シリアルデータをパラレルデータに変換してバス上に送
出し、バス上のパラレルデータをシリアルデータに変換
して通信部2に送出するためのもので、PBX側とのデ
ータ授受用のものであり、SIO7はドライバ/レシー
バ9がデータ端末側より受信して出力するシリアルデー
タをパラレルデータに変換してバス上に送出し、バス上
のパラレルデータをシリアルデータに変換してドライバ
/レシーバ9に送出するためのもので、データ端末側と
のデータ授受用のものである。The DMA 8 receives information such as an access start address and a range from the CPU, and upon receiving an access start instruction, controls the RAM 5 for direct memory access based on the information. The SIO 6 is for converting the serial data received by the communication unit 2 into parallel data and transmitting the parallel data to the bus, and converting the parallel data on the bus into serial data and transmitting the serial data to the communication unit 2. The SIO 7 is for data transmission / reception, and the SIO 7 converts the serial data received and output by the driver / receiver 9 from the data terminal side into parallel data and sends the parallel data to the bus, and converts the parallel data on the bus into serial data. For transmitting to the driver / receiver 9 and for exchanging data with the data terminal side.
【0035】CPU3における最上位の割込であるノン
マスカブル割り込み信号入力端子NMI にはNMI割込の
制御のための多重割込規制回路10を介してSIOの割り
込み信号(/INT;但し/ は負論理アクティブを示す)が入
力されるようにしてあり、SIO6,7がデータを受信
したり、送出したりする場合、SIOからCPU3に対
し、NMI 割り込みをかける構成としてある。The non-maskable interrupt signal input terminal NMI, which is the highest interrupt in the CPU 3, receives an SIO interrupt signal (/ INT; where / is a negative logic) via the multiple interrupt control circuit 10 for controlling the NMI interrupt. (Indicating active) is input, and when the SIOs 6 and 7 receive and send data, the SIO issues an NMI interrupt to the CPU 3.
【0036】本装置は基本的には図6に示した従来回路
と同じであるが、この従来回路に対し、NMI割り込み
を行うため、多重割り込みの規制制御を行う多重割込規
制回路10を設けた点、およびCPU3側にNMI割り込
みによる各SIO6,7のステータスのチェックとその
ステータスに基づきどの割り込みであるかを特定する機
能、およびNMI割り込み受付けによるマスク信号発生
制御機能を追加した点が異なる。Although this apparatus is basically the same as the conventional circuit shown in FIG. 6, a multiple interrupt control circuit 10 for controlling the control of multiple interrupts is provided to this conventional circuit in order to perform an NMI interrupt. The difference is that the CPU 3 side has a function of checking the status of each SIO 6, 7 by an NMI interrupt and specifying which interrupt based on the status, and a mask signal generation control function by receiving an NMI interrupt.
【0037】前記多重割込規制回路10は図2に示すよう
に割込マスク制御信号を遅延するディレイ回路10a と、
このディレイ回路10a の出力とSIO6,7の出力する
割込要求信号INT との論理和をとり、ノンマスカブルイ
ンタラプト信号(NMI信号)としてCPU3に出力す
るORゲート10b 、更にはCPU3からのマスク信号発
生制御出力により割込マスク制御信号を発生制御するマ
スク信号出力回路10cよりなる。The multiple interrupt control circuit 10 includes a delay circuit 10a for delaying the interrupt mask control signal, as shown in FIG.
An OR gate 10b for logically adding the output of the delay circuit 10a and the interrupt request signal INT output by the SIO 6, 7 to the CPU 3 as a non-maskable interrupt signal (NMI signal), and further mask signal generation control from the CPU 3. It is composed of a mask signal output circuit 10c which controls generation of an interrupt mask control signal by output.
【0038】割込マスク制御信号は、CPU3が自己の
ノンマスカブルインタラプト端子INT に割り込み信号
(NMI信号)が入力されると、ソフトウェア処理によ
ってその割り込み信号が無くなるまで発生される信号
で、この実施例の場合、NMI信号が“L”であるの
で、割込マスク制御信号は“H”とする。The interrupt mask control signal is a signal generated when the CPU 3 inputs an interrupt signal (NMI signal) to its own non-maskable interrupt terminal INT until the interrupt signal disappears by software processing. In this case, since the NMI signal is "L", the interrupt mask control signal is "H".
【0039】NMI信号は本実施例の場合、SIO6,
7の割り込み信号をそのまま使用しており、割込マスク
制御信号はNMI割り込みの要求があったときから、そ
のNMI割り込みの処理が終了するまでの期間、CPU
3からソフトウェア処理により指令されてマスク信号出
力回路10c より発生され、これがディレイ回路10a で遅
延されてORゲート10b に与えられるので、SIO6,
7の割り込み信号INTよりやや遅れることになる。In this embodiment, the NMI signal is SIO6.
The interrupt signal of No. 7 is used as it is, and the interrupt mask control signal is used for the CPU from the time the NMI interrupt is requested until the processing of the NMI interrupt is completed.
3 is generated by the mask signal output circuit 10c in response to software processing, and this is delayed by the delay circuit 10a and given to the OR gate 10b.
It will be slightly behind the interrupt signal INT of 7.
【0040】デイジーチェーン接続されたZ80 ファミリ
のSIOからの割り込み要求でNMI割り込みを行う場
合、上流側の割り込みは上位の割り込みとなるので、下
位の割り込みを処理中に上位の割り込みが発生すると、
NMIの多重割り込みとなってしまう。NMI割り込み
は、最上位の割り込みであるため、NMIの多重割り込
みが生じると、この割り込みにより中断されたNMI割
り込み処理に復帰することは不可能であるから、NMI
の多重割り込みの規制制御を行う必要があり、そのため
の回路が多重割込規制回路10である。When an NMI interrupt is performed by an interrupt request from a Z80 family SIO connected in a daisy chain, the upstream interrupt becomes an upper interrupt, so if an upper interrupt occurs while processing a lower interrupt,
It becomes a multiple interrupt of NMI. Since the NMI interrupt is the highest interrupt, if multiple NMI interrupts occur, it is impossible to return to the NMI interrupt processing interrupted by this interrupt.
It is necessary to perform restriction control of multiple interrupts, and the circuit for that purpose is the multiple interrupt restriction circuit 10.
【0041】例えば、CPUが通常のINT割り込み処
理中にNMI割り込み要求を受けると、強制的にNMI
割り込み処理に入ってしまう。このNMI割り込み処理
中に更にNMI割り込みが入って来た場合(NMIの多
重割り込み)、CPUはこのNMI割り込みによる処理
から、処理途中であった前のNMI割り込み処理に戻れ
ない。このため、一度NMI割り込みが入った場合に、
次のNMI割り込み要求が入ってこないよう、マスクす
る必要がある。このマスクを行う回路が図2の多重割込
規制回路10におけるORゲート10b である。For example, when the CPU receives an NMI interrupt request during the normal INT interrupt processing, the NMI is forcibly forced.
It will start interrupt processing. If an NMI interrupt further enters during this NMI interrupt processing (NMI multiple interrupt), the CPU cannot return from the processing by this NMI interrupt to the previous NMI interrupt processing that was in the process of processing. Therefore, if an NMI interrupt occurs once,
It is necessary to mask so that the next NMI interrupt request does not come in. The circuit for performing this mask is the OR gate 10b in the multiple interrupt control circuit 10 of FIG.
【0042】更にこの多重割込規制回路10において、デ
ィレイ回路10a を設けている理由は次の通りである。す
なわち、MNIマスクする対象がソフトウェアによる設
定によるものであり、そのため、マスク解除後、割り込
み処理解除に伴い元のルーチンを再開させるにあたり、
Z80 CPU に実行させる必要のあるPOP ( スタックからレ
ジスタへの情報取り出し) 、PUSH (レジスタ情報のスタ
ックへの退避) 、RETURN (リターン;割り込み処理ルー
チンから割り込み前の実行ルーチンへの移行)等の命令
を実行する必要が生じる。The reason why the delay circuit 10a is provided in the multiple interrupt control circuit 10 is as follows. That is, the MNI mask target is set by software. Therefore, when the interrupt processing is canceled and the original routine is restarted after mask cancellation,
Z80 CPU instructions such as POP (extract information from stack to register), PUSH (save register information to stack), RETURN (return; transition from interrupt processing routine to execution routine before interrupt) Will need to be performed.
【0043】従って、これらの実行の間に、NMI割り
込みが入った場合に、その制御が出来ないためで、これ
を防止するため、割り込み処理期間中、CPU3よりマ
スク発生制御指示を出し、マスク信号出力回路10c に与
えて割込マスク制御信号を発生させるべく制御する。こ
れをマスク解除後、割り込み処理解除に伴い元のルーチ
ンを再開させるにあたり、Z80 CPU に実行させる必要の
ある命令を実行するに必要な時間分、ディレイをかけて
ORゲート10b に与えることにより、次の割り込みをこ
の期間まで延長してマスクし、CPU3の動作に支障の
ないようにする。Therefore, if an NMI interrupt occurs during these executions, it cannot be controlled. To prevent this, a mask generation control instruction is issued from the CPU 3 during the interrupt processing period, and a mask signal is issued. It is given to the output circuit 10c and controlled to generate an interrupt mask control signal. After unmasking this, when restarting the original routine when interrupt processing is cancelled, by delaying by the amount of time required to execute the instructions that need to be executed by the Z80 CPU, it is given to the OR gate 10b. The interrupt of is masked by being extended to this period so that the operation of the CPU 3 is not hindered.
【0044】すなわち、通常のINT割り込みにおいて
RETI (Return from interrupt ; 割り込み解除;Z80 フ
ァミリチップ(Z80 の周辺用LSI)ではこの命令コー
ドを検出して割り込み処理ルーチンが終了したことを知
ることができるようにしてあり、これによって割り込み
応答時間を短くしている) を実行する時間(1命令分)
は割り込みが入らないようにマスクしているのと同様の
働きとなる。次に実際の動作について図3および図4を
参照して説明する。基本的な動作は従来技術で説明した
ので、本発明での特徴部分を説明する。That is, in a normal INT interrupt
RETI (Return from interrupt; Interrupt release; Z80 family chip (Z80 peripheral LSI) is designed to detect this instruction code and to know that the interrupt processing routine has ended. Time to execute (shortened) (1 instruction)
Has the same function as masking so that interrupts cannot be entered. Next, the actual operation will be described with reference to FIGS. 3 and 4. Since the basic operation has been described in the related art, the characteristic part of the present invention will be described.
【0045】SIO6,7の割り込みは、一般的にはC
PU3の割り込み入力端子INT に接続するのが普通であ
る。この場合、CPU3からは割り込みアクノリッジサ
イクル(割り込み許可サイクル;Z80 CPU のIORQ、M1が
共にL;IORQはアドレスバスに正しいI/O アドレスが出
力されていることを示す信号で、M1(マシンサイクルが
オペレーションコードのフェッチサイクルであることを
示す信号)と共に出力されると割り込み応答サイクルで
あることを示す)が返され、割り込みの種類毎に決めた
ベクタを出力し、INT 信号は“L”から“H”に変化す
る。Interrupts of SIO 6 and 7 are generally C
It is usually connected to the interrupt input terminal INT of PU3. In this case, the CPU3 issues an interrupt acknowledge cycle (interrupt enable cycle; both IORQ and M1 of the Z80 CPU are L; IORQ is a signal indicating that the correct I / O address is output to the address bus, and M1 (machine cycle When it is output together with the signal indicating that it is the fetch cycle of the operation code), it indicates that it is the interrupt response cycle), the vector determined for each interrupt type is output, and the INT signal changes from “L” to “L”. Change to H ".
【0046】しかし、本装置のように、SIO6,7の
割り込みをCPU3のノンマスカブルインタラプト入力
端子NMI に与える構成とした場合、CPU3からは割り
込みアクノリッジサイクルが返らないため、SIO6,
7は割り込みのベクタを送出しない。また、INT信号
についても割り込み原因が無くなるまで“L”から
“H”にならない。 従って、本装置ではNMI割り込
みが入った場合、CPU3はSIO6,7のステータス
を監視し、割り込みを判断するように処理ルーチンを組
んでおく。そのための処理ルーチン例を図5に示してお
く。However, when the interrupts of SIO6, 7 are applied to the non-maskable interrupt input terminal NMI of the CPU 3 as in the present device, the interrupt acknowledge cycle is not returned from the CPU 3, so the SIO 6,
7 does not send an interrupt vector. Also, the INT signal does not change from "L" to "H" until the cause of the interruption is eliminated. Therefore, in the present apparatus, when an NMI interrupt is input, the CPU 3 monitors the status of the SIOs 6 and 7 and sets up a processing routine so as to judge the interrupt. An example of a processing routine for that purpose is shown in FIG.
【0047】図5にフローチャートは次の通りである。
すなわち、SIOからNMI割り込みが入ると、CPU
3はMNIマスクを設定し(S1)、次に各SIO6,7の
割り込みステータスをチェックする(S2)。そして割り込
みAであるかをチェックし(S3)、割り込みAであれば、
Aの割り込みに対するNMI割り込み処理を実施する(S
4)。The flowchart in FIG. 5 is as follows.
That is, when an NMI interrupt is input from SIO, the CPU
3 sets the MNI mask (S1), and then checks the interrupt status of each SIO 6,7 (S2). Then, it is checked whether it is the interrupt A (S3), and if it is the interrupt A,
Perform NMI interrupt processing for A interrupt (S
Four).
【0048】次に他の割り込みがあるか否かをチェック
し(S5)、なければマスクを解除し(S6)、割り込みによる
処理ルーチンを抜けてメインルーチンに戻る(S7)。S5に
おいて、他の割り込みがあればS2に戻り、割り込みステ
ータスをチェックする(S2)。そして割り込みAであるか
をチェックし(S3)、あれば、Aの割り込みに対するNM
I割り込み処理を実施する(S4)。Next, it is checked whether or not there is another interrupt (S5), if not, the mask is released (S6), the processing routine by the interrupt is exited, and the process returns to the main routine (S7). If there is another interrupt in S5, the process returns to S2 to check the interrupt status (S2). Then, it is checked whether it is an interrupt A (S3).
I interrupt processing is executed (S4).
【0049】割り込みAで無ければ割り込みBであるか
をチェックし(S3b) 、割り込みBであれば、Bの割り込
みに対するNMI割り込み処理を実施する。割り込みB
で無ければ割り込みCであるかをチェックし(S3c) 、割
り込みCであれば、Cの割り込みに対するNMI割り込
み処理を実施する。If it is not the interrupt A, it is checked whether it is the interrupt B (S3b), and if it is the interrupt B, the NMI interrupt processing for the interrupt of B is executed. Interrupt B
If it is not, it is checked whether it is the interrupt C (S3c). If it is the interrupt C, the NMI interrupt processing for the interrupt of C is executed.
【0050】その後、S5のチェックを行い、後は上述の
S5以降の動作を行う。SIO6,7の役割は決まってい
るので、ステータスチェックの結果、わかるどの割り込
みであるかにより、飛び先と、処理ルーチンを決めてお
けば、各割り込みに対して、それぞれ必要な処理を行う
ことができ、しかも、割り込み終了のための処理前にス
テータスチェックでSIO6,7の下位の割り込みをチ
ェックして割り込み処理を実施してゆくので、保留され
た割り込みの処理に対する遅れを最小限に抑えることが
できるようになる。図3は重複しないで一つだけ割り込
み要求が生じた場合の例である。After that, S5 is checked, and the above steps are performed thereafter.
Performs operations after S5. Since the roles of the SIOs 6 and 7 are determined, if the jump destination and the processing routine are determined depending on which interrupt is known as a result of the status check, the required processing can be performed for each interrupt. Moreover, since the lower level interrupts of SIO 6 and 7 are checked by the status check before the processing for ending the interrupt and the interrupt processing is executed, the delay with respect to the processing of the pending interrupt can be minimized. become able to. FIG. 3 shows an example in which only one interrupt request occurs without duplication.
【0051】多重割込規制回路10は、SIOからINT
信号が発生したことにより、このINT信号をORゲー
ト10b よりNMIの割り込み要求としてCPU3のNMI
端子に入力する。The multiple interrupt control circuit 10 changes from SIO to INT.
Since the signal is generated, the INT signal is used as an NMI interrupt request from the OR gate 10b and the NMI of the CPU 3 is requested.
Input to the terminal.
【0052】これによりCPU3はNMIの割り込み要
求を受付け、メモリ領域の所定の番地(Z80 系では38h
番地;h は16進表記を示す)に飛んで、この番地のプロ
グラム(図5のような処理ルーチン)を実行する。故
に、この割り込み対して必要な転送指示プログラムを実
行させることができ、最優先で転送指示が行えるように
なる。As a result, the CPU 3 accepts the NMI interrupt request, and the predetermined address in the memory area (38h in the Z80 system).
Address; h indicates hexadecimal notation), and the program at this address (processing routine as shown in FIG. 5) is executed. Therefore, the necessary transfer instruction program can be executed for this interrupt, and the transfer instruction can be given the highest priority.
【0053】さらにこの場合、多重割込規制回路10では
割込マスク制御信号を“L”から“H”に変化させ、こ
れをNMI割り込みの処理解除に必要な時間分、遅延さ
せてINTをマスクし、これにより、次のNMI割り込
みがかからないようにしてある。すなわち、マスクの期
間、次のNMI割り込み要求を禁止する。Further, in this case, the multiple interrupt control circuit 10 changes the interrupt mask control signal from "L" to "H", delays this for the time required for canceling the processing of the NMI interrupt, and masks INT. However, this prevents the next NMI interrupt. That is, the next NMI interrupt request is prohibited during the masking period.
【0054】このように、CPU3に実行させるNMI
割り込みの処理ルーチンは図5に示す如きものであり、
現在、処理中の割り込みについての処理期間中にSIO
より新しい割り込みがあった場合は、当該処理中の割り
込み処理終了後に、CPU3はステータスを見にゆくた
め、新たな割り込みの有無が判断できる。Thus, the NMI to be executed by the CPU 3
The interrupt processing routine is as shown in FIG.
SIO during the processing period for the interrupt currently being processed
If there is a newer interrupt, the CPU 3 goes to the status after the completion of the interrupt process during the process, so that the presence or absence of a new interrupt can be determined.
【0055】上記期間中にSIOより新たな割り込みが
生じなかった場合はSIOのINT信号は“L”から
“H”になっているため、マスクを解除した後でも、す
なわち、制御信号が“H”から“L”に変わった後でも
NMI信号は“H”である。If no new interrupt is generated by the SIO during the above period, the INT signal of the SIO is changed from "L" to "H". Therefore, even after the mask is released, that is, the control signal is "H". The NMI signal is "H" even after changing from "L" to "L".
【0056】次に図4に示すように新しい割り込みの有
無を判断した後、マスクを解除し、RETURNを行うところ
でSIO6,7から割り込み要求が入ったとする。この
場合、そのままでは普通にはソフトウェアで割り込み要
求を見つけることは出来ない。Next, as shown in FIG. 4, it is assumed that an interrupt request is input from the SIO 6, 7 where the mask is released and RETURN is performed after the presence or absence of a new interrupt is determined. In this case, the software cannot normally find the interrupt request as it is.
【0057】しかし、本発明の多重割込規制回路10で
は、NMIマスク解除に伴い割込マスク制御信号が
“H”から“L”になるので、ORゲート10b の出力は
“H”から“L”に変化し、これによってCPU3には
ハード的にNMI割り込み要求が入る。そして、これに
よりCPU3は上述のような処理に入るので必要な割り
込み処理を実施できる。However, in the multiple interrupt control circuit 10 of the present invention, since the interrupt mask control signal changes from "H" to "L" as the NMI mask is released, the output of the OR gate 10b changes from "H" to "L". ", So that an NMI interrupt request is input to the CPU 3 by hardware. Then, as a result of this, the CPU 3 enters the above-described processing, so that the necessary interrupt processing can be performed.
【0058】以上のようにデイジーチェーン接続したS
IOからの割り込み要求をCPUに対してはNMI割り
込みとして使用し、また、NMI割り込みをマスクする
回路を設けてNMI割り込みを受けるとその処理が終わ
るまでNMI割り込みをマスクするようにし、CPUに
はNMI割り込みを受けるとSIOの割り込み要求ステ
ータスをチェックしてどれとどれが割り込み要求を出し
ているかを知る。そして、ステータスを出しているSI
Oがどれであるかにより、処理すべき割り込みを判断で
きることにより、MNIの割り込みで必要な割り込み処
理に入ることができる。そして、割り込み要求のあるS
IOのうち、上位のものからそのSIOで定まる所定の
割り込み処理を順に実施し、すべての割り込み要求に応
じた後に、NMI割り込みを解除すると云った動作を行
うことになる。故に各SIOに対するDMA転送指示程
度の処理を順次行うと云ったことであれば、HDLC等
のデータ伝送時の短い余裕時間内にこれらの処理すべて
の実施を十分、間に合わせることができる。S connected in the daisy chain as described above
The interrupt request from the IO is used as an NMI interrupt to the CPU, and a circuit for masking the NMI interrupt is provided so that when the NMI interrupt is received, the NMI interrupt is masked until the processing is completed. When an interrupt is received, the interrupt request status of the SIO is checked to see which one is issuing the interrupt request. And SI that is giving status
Since it is possible to determine the interrupt to be processed depending on which is O, it is possible to enter the necessary interrupt processing by the MNI interrupt. Then, the S with the interrupt request
Of the IOs, a predetermined interrupt process determined by the SIO is sequentially executed from the higher order IO, and after all the interrupt requests are satisfied, the NMI interrupt is released. Therefore, if it is said that the processes of the order of DMA transfer for each SIO are sequentially performed, it is possible to sufficiently implement all of these processes within a short margin time during data transmission such as HDLC.
【0059】このように本装置ではSIOの割り込み
を、最優先の割り込みであるNMIで処理するように
し、NMIにNMIが多重割り込みをしないようにマス
ク制御を行うと共に、NMIによる割り込みは上位のS
IOから順にそのステータスをチェックしてどのような
割り込みであるかを知り、その結果必要な処理を上位の
ものから順に実施して、各SIOから発生したすべての
割り込みの処理が終了した後、割り込みの終了の手続き
をプロセッサに行わせるようにしたので、短い割り込み
処理時間であってもCPUはデータ転送のためのDMA
指示等には十分対処することができる。As described above, in this apparatus, the SIO interrupt is processed by the NMI which is the highest priority interrupt, the mask control is performed so that the NMI does not make multiple interrupts, and the interrupt by the NMI is the upper S.
Check the status in order from IO to know what kind of interrupt it is, execute the necessary processing in order from the higher order, and after all the interrupts generated from each SIO have been processed, Since the processor is made to perform the procedure for ending the process, the CPU can execute the DMA for data transfer even if the interrupt processing time is short.
I can deal with the instructions enough.
【0060】従って、HDLCモードでのフレーム伝送
等のように、短い余裕時間しか確保できない場合におい
て、この間に実施しなければならない転送指示等の割り
込み処理を割り込み要求に従って確実に行えるようにな
り、データの欠落等の問題を解消できるようになる。Therefore, in the case where only a short margin time can be secured such as frame transmission in the HDLC mode, it becomes possible to reliably carry out interrupt processing such as a transfer instruction which must be executed during this time in accordance with the interrupt request. It becomes possible to solve problems such as missing.
【0061】尚、本発明は上記し、且つ、図面に示す実
施例に限定することなくその要旨を変更しない範囲内で
適宜変形して実施できるものである。このNMI割り込
みについてはSIO以外にもZ80 マイクロプロセッサ周
辺チップであるCTC(Counter Timer Circuit) やDM
A(Direct Memory Access)やPIO(Parallel I/O Cont
roller) 等の割り込みについて、同様に利用できる。The present invention is not limited to the embodiments described above and shown in the drawings, but can be appropriately modified and implemented without departing from the scope of the invention. For this NMI interrupt, in addition to SIO, the Z80 microprocessor peripheral chip CTC (Counter Timer Circuit) and DM
A (Direct Memory Access) and PIO (Parallel I / O Cont)
You can use the same for interrupts such as roller).
【0062】[0062]
【発明の効果】以上、詳述したようにこの発明によれ
ば、HDLCモードでのフレーム伝送等のように、短い
余裕時間しか確保できない場合において、この間に実施
しなければならない割り込み処理を割り込み要求に従っ
て確実に行えるようになり、データの欠落等の問題を解
消できるようになるプロセッサ応用装置を提供できる。As described above in detail, according to the present invention, when a short margin time can be secured, such as in frame transmission in the HDLC mode, an interrupt request that must be executed during this time is issued as an interrupt request. According to the above, it is possible to provide a processor application device that can be surely performed and can solve problems such as data loss.
【図1】本発明の一実施例を示すブロック図。FIG. 1 is a block diagram showing an embodiment of the present invention.
【図2】図1における多重割込規制回路の構成例を示す
ブロック図。FIG. 2 is a block diagram showing a configuration example of a multiple interrupt control circuit in FIG.
【図3】本発明装置の動作例を説明するためのタイミン
グチャート。FIG. 3 is a timing chart for explaining an operation example of the device of the present invention.
【図4】本発明装置の動作例を説明するためのタイミン
グチャート。FIG. 4 is a timing chart for explaining an operation example of the device of the present invention.
【図5】本発明装置の動作例を説明するためのフローチ
ャート。FIG. 5 is a flowchart for explaining an operation example of the device of the present invention.
【図6】従来例を示すブロック図。FIG. 6 is a block diagram showing a conventional example.
【図7】従来例を示すブロック図。FIG. 7 is a block diagram showing a conventional example.
【図8】HDLCによるデータ伝送の伝送フレーム例を
示す図。FIG. 8 is a diagram showing an example of a transmission frame of data transmission by HDLC.
2…通信部 3…CPU 4…ROM 5…RAM 6,7…SIO 9…ドライバ/
レシーバ 10…多重割込規制回路 10a …ディレイ
回路 10b …ORゲート 10c …マスク信
号出力回路。2 ... Communication unit 3 ... CPU 4 ... ROM 5 ... RAM 6, 7 ... SIO 9 ... Driver /
Receiver 10 ... Multiple interrupt control circuit 10a ... Delay circuit 10b ... OR gate 10c ... Mask signal output circuit.
Claims (1)
み信号を発生する複数の回路を有し、これら回路はデイ
ジーチェーン接続されて上流側程、割り込み優先順位が
高くなるように構成されたものであって、これら回路は
割り込み原因が発生すると割り込み発生のステータスを
発生し、割り込み信号を発生すると共に、上位の割り込
みがあるときは下位の割り込みは保留として、割り込み
信号の発生を抑制される構成とし、発生した割込み信号
をマイクロプロセッサに対し、与えることにより、割り
込み処理を行わせるようにしたマイクロプロセッサ応用
装置において、 前記マイクロプロセッサには最上位の割り込みを受け付
けたとき、この最上位の割り込みをマスクするためのマ
スク信号発生を指令する手段と、この最上位の割り込み
を受けると前記各回路の前記ステータスを優先順位上位
のものから順にチェックし、割り込み発生ステータスが
ある回路に対しては、その回路に対して予め定めた所定
の処理ルーチンを優先順位に従って実施する手段と、割
り込み発生ステータスがある回路すべてに対するそれぞ
れ所定の処理ルーチンを終了するとマスク信号解除指令
を行うと共に割り込み解除のための処理を行う手段とを
設け、 また、前記マスク信号発生指令を受けると解除指令を受
けるまでの間、マスク信号を発生する発生手段と、この
発生されたマスク信号を少なくとも前記マイクロプロセ
ッサが前記割り込み解除のための処理を行うに要する時
間、遅延させる遅延手段と、この遅延手段を介して得ら
れる前記マスク信号と前記各回路の割り込み信号とを通
すゲート手段とを有する多重割込み規制手段を設けて構
成したことを特徴とするマイクロプロセッサ応用装置。1. A circuit having a plurality of circuits for generating an interrupt signal during a period of generation of an interrupt cause, the circuits being daisy-chained so that the interrupt priority becomes higher toward the upstream side. , These circuits generate an interrupt generation status when the cause of an interrupt occurs, generate an interrupt signal, and hold a lower interrupt when there is an upper interrupt and suppress the generation of the interrupt signal. In the microprocessor application device that is made to perform interrupt processing by giving the interrupt signal to the microprocessor, when the microprocessor receives the highest interrupt, the highest interrupt is masked. And the means for instructing the mask signal generation of Then, the status of each circuit is checked in order from the highest priority, and for a circuit having an interrupt generation status, a predetermined processing routine for the circuit is executed in accordance with the priority. , A means for performing a mask signal cancel command and a process for canceling an interrupt when each predetermined processing routine for all circuits having an interrupt occurrence status is completed, and when the mask signal generation command is received, a cancel command is issued. Until receiving, a generating means for generating a mask signal, a delay means for delaying the generated mask signal for at least a time required for the microprocessor to perform processing for releasing the interrupt, and a delay means via the delay means. Means for passing the mask signal obtained as a result and the interrupt signal of each circuit Microprocessor application device, characterized in that which is configured by providing multiple interrupts regulating means having a.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP32806092A JPH06175860A (en) | 1992-12-08 | 1992-12-08 | Microprocessor application device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP32806092A JPH06175860A (en) | 1992-12-08 | 1992-12-08 | Microprocessor application device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH06175860A true JPH06175860A (en) | 1994-06-24 |
Family
ID=18206070
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP32806092A Pending JPH06175860A (en) | 1992-12-08 | 1992-12-08 | Microprocessor application device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH06175860A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008217821A (en) * | 2008-04-25 | 2008-09-18 | Fujitsu Ltd | A computer that dynamically determines interrupt delay. |
| JP2017527902A (en) * | 2014-09-26 | 2017-09-21 | インテル・コーポレーション | Avoid early enablement of non-maskable interrupts when returning from exceptions |
-
1992
- 1992-12-08 JP JP32806092A patent/JPH06175860A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008217821A (en) * | 2008-04-25 | 2008-09-18 | Fujitsu Ltd | A computer that dynamically determines interrupt delay. |
| JP2017527902A (en) * | 2014-09-26 | 2017-09-21 | インテル・コーポレーション | Avoid early enablement of non-maskable interrupts when returning from exceptions |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5659759A (en) | Data processing device having improved interrupt controller to process interrupts of different priority levels | |
| US20030065856A1 (en) | Network adapter with multiple event queues | |
| US5790813A (en) | Pre-arbitration system allowing look-around and bypass for significant operations | |
| US5469577A (en) | Providing alternate bus master with multiple cycles of bursting access to local bus in a dual bus system including a processor local bus and a device communications bus | |
| JP3201786B2 (en) | Control method of digital signal processing system | |
| US5974479A (en) | System for executing, canceling, or suspending a DMA transfer based upon internal priority comparison between a DMA transfer and an interrupt request | |
| JPH06175860A (en) | Microprocessor application device | |
| CN114968863A (en) | Data transmission method based on DMA controller | |
| JPH0537593A (en) | Microprocessor application device | |
| EP0614148B1 (en) | Data processing apparatus | |
| JP2667285B2 (en) | Interrupt control device | |
| JPS6126706B2 (en) | ||
| JP2961542B2 (en) | Data processing system | |
| JPH05183603A (en) | Reception data processing method and communication control device | |
| JP2001014266A (en) | Dma transfer circuit and dma transfer method | |
| JPH01166226A (en) | Operating system interrupt handling method | |
| JPH10222395A (en) | Microcomputer | |
| JP2747154B2 (en) | Input/Output Processor | |
| JP2872042B2 (en) | Shared memory access method | |
| JPH02195471A (en) | Interruption control system | |
| KR100261731B1 (en) | Method of requesting and processing interrupt in a multi-processor interrupt controller for multi-processor system | |
| JPH1141297A (en) | DMA controller using programmable sequencer | |
| JPH03233742A (en) | Data check system | |
| JPH0367350A (en) | Network interface device | |
| JPS59226541A (en) | Transmission method |