JPH077954B2 - Control device - Google Patents

Control device

Info

Publication number
JPH077954B2
JPH077954B2 JP1029703A JP2970389A JPH077954B2 JP H077954 B2 JPH077954 B2 JP H077954B2 JP 1029703 A JP1029703 A JP 1029703A JP 2970389 A JP2970389 A JP 2970389A JP H077954 B2 JPH077954 B2 JP H077954B2
Authority
JP
Japan
Prior art keywords
processing
interrupt
level
interrupt processing
low
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1029703A
Other languages
Japanese (ja)
Other versions
JPH02210932A (en
Inventor
武明 山本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP1029703A priority Critical patent/JPH077954B2/en
Publication of JPH02210932A publication Critical patent/JPH02210932A/en
Publication of JPH077954B2 publication Critical patent/JPH077954B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、制御装置、特に複数の入出力装置を制御する
制御装置に関する。
The present invention relates to a control device, and more particularly to a control device for controlling a plurality of input / output devices.

(従来の技術) 従来、マイクロプロセッサを用いた制御装置において
は、各種の入出力装置を中央処理装置(以下、CPUとい
う。)に接続し、入出力装置の状態をCPUが調べ、CPUは
入出力装置の状態に応じて、入出力装置のデータを読取
って、主記憶装置(以下、MEMと略す。)に格納したり
(これを入力動作という。)、逆にMEMのデータを入出
力装置に書込んだり(これを出力動作という。)してデ
ータの入出力を行なっている。
(Prior Art) Conventionally, in a control device using a microprocessor, various input / output devices are connected to a central processing unit (hereinafter referred to as CPU), the CPU checks the state of the input / output device, and the CPU turns on. Depending on the state of the output device, the data of the input / output device is read and stored in the main memory device (hereinafter abbreviated as MEM) (this is called input operation), or conversely, the data of the MEM is input / output device. The data is input / output by writing to (this is called an output operation).

近年は、LSI化と制御技術の進歩により、割込方式、ダ
イレクトメモリアクセスコントローラ(以下、DAMCとい
う。)等が一般的に使用されるようになり、入出力装置
制御のために、CPUが関与する割合が著しく減少してい
る。
In recent years, with the progress of LSI and control technology, interrupt system, direct memory access controller (hereinafter referred to as DAMC), etc. have been generally used, and CPU is involved in controlling input / output devices. The percentage of people doing it has decreased significantly.

このような割込方式とDMACを用いて多くの入出力装置を
制御している従来例を第2図に示す。
FIG. 2 shows a conventional example in which many interrupt devices and a DMAC are used to control many input / output devices.

第2図は、従来の制御装置の一例を示し、特に4つの回
線A〜Dからのシリアル入力データをMEM上に電文とし
て編集格納する場合を示している。
FIG. 2 shows an example of a conventional control device, and particularly shows a case where the serial input data from the four lines A to D are edited and stored as a telegram on the MEM.

同図において、1はCPU、2はMEM、3はDMAC、4〜7は
シリアルデータを受信してパラレルデータに変換する、
LSIを用いた送受信部(以下、TRCという。)、12はオア
ゲートである。
In the figure, 1 is a CPU, 2 is a MEM, 3 is a DMAC, 4 to 7 are serial data, and are converted into parallel data.
A transmitter / receiver (hereinafter referred to as TRC) using an LSI, 12 is an OR gate.

第3図は第2図のCPUの処理プログラム例を示す図であ
る。
FIG. 3 is a diagram showing an example of a processing program of the CPU of FIG.

以下に、第2図における受信の場合の制御動作について
第3図を併用して説明する。
Below, the control operation in the case of reception in FIG. 2 will be explained together with FIG.

先ず、受信要求が発生すると、CPU1のスケジューラが受
信起動処理を行なう。
First, when a reception request is generated, the scheduler of the CPU 1 performs reception start processing.

受信起動の中で、CPU1は、MEM2の受信電文エリアをクリ
アした上で、各回線A〜Dに対応して受信エリアma〜md
を割り当て、DMAC3にその先頭アドレスを指示し、動作
可能とした上で、TRC4〜7に起動をかける。この状態
で、A回線より受信電文フレームが入力された場合、TR
C4は1バイト分のデータを受信する毎に、ダイレクトメ
モリアクセス要求(以下、DAM要求という。)信号線21
を通してDMAC3に転送を依頼する。DMAC3は、このDMA要
求を認識すると、内部バス27とシステムバス20を接続し
てTRC4とMEM2のパスを形成し、TRC4から読出した受信デ
ータの1バイト分データをA回線用受信エリアmaの先頭
アドレスに転送し、DMAC内のアドレスを+1する。この
ように電文を順次MEM2の受信エリアmaに格納していく
が、TRC4が電文の終結を判断する(第4図(a)のフラ
グFを受信すること)を、受信終結したことを割込信号
線22をオンすることにより、割込信号により通知する。
この場合割込信号はオアゲート12を介して割込信号線23
を通りCPU1に通知される。そして、CPU1では、第3図に
おける割込処理ルーチンが起動される。CPU1は割込みの
発生元がTRC4であり、割込みの原因が正常受信終了によ
るものであることを、システムバス20,内部バス27を経
由してTRC4〜7のアクセスして知る。
During the reception start, the CPU1 clears the reception message area of MEM2, and then the reception areas ma to md corresponding to the respective lines A to D.
Is assigned, the start address is instructed to the DMAC3 to enable the operation, and then the TRC4 to 7 are activated. If a received message frame is input from the A line in this state, TR
C4 is a direct memory access request (hereinafter referred to as DAM request) signal line 21 each time it receives 1-byte data.
Request transfer to DMAC3 through. When the DMAC3 recognizes this DMA request, it connects the internal bus 27 and the system bus 20 to form a path between TRC4 and MEM2, and the 1-byte data of the received data read from TRC4 is transferred to the head of the A-line receiving area ma. Transfer to address and increment address in DMAC by +1. In this way, the telegrams are sequentially stored in the reception area ma of MEM2, but the TRC4 judges that the telegram is terminated (reception of the flag F in FIG. 4 (a)) and interrupts that the reception is terminated. When the signal line 22 is turned on, notification is given by an interrupt signal.
In this case, the interrupt signal is sent to the interrupt signal line 23 through the OR gate 12.
To be notified to CPU1. Then, the CPU 1 starts the interrupt processing routine shown in FIG. The CPU 1 knows that the source of the interrupt is TRC4 and that the cause of the interrupt is due to the normal reception end, by accessing the TRCs 4 to 7 via the system bus 20 and the internal bus 27.

この後、CPU1は次の電文受信に備えてバッファ切替を行
なう。具体的にはDMAC3をTRC4に対しては動作禁止と
し、MEM2内のA回線用受信エリアmaを、新しいエリアna
とし、その先頭アドレスをDAMC3に指示してDMAC3をTRC4
に対して再度動作可能とする。TRC4は受信停止を指示し
ていないので、次の電文が来ると、CPU1の動作に関係な
く自動的受信を行ない、前述した手順でMEM2の新しいエ
リアnaに転送される。
After this, the CPU 1 switches the buffer in preparation for the next message reception. Specifically, operation of DMAC3 is prohibited for TRC4, and the reception area ma for A line in MEM2 is changed to new area na.
Then, direct the start address to DAMC3 and set DMAC3 to TRC4.
To be able to operate again. Since TRC4 has not instructed to stop receiving, when the next message comes, it automatically receives regardless of the operation of CPU1 and transfers it to the new area na of MEM2 by the procedure described above.

一方、CPU1は、バッファ切替を完了すると、受信エリア
ma内の受信済電文について、送信順番番号や受信順序番
号等をチェックする低レベルプロトコルの処理を行な
い、問題がなければ、高レベルプロトコル処理を行なう
ためのタスクを生成して、割込処理ルーチンを抜ける。
その後CPU1のスケジューラでは、このタスクを引き継い
で後の処理を行なう。ここで、高レベルプロトコル処理
とは、パケット順序制御ようなより上位レベルの処理の
ことをいう。
On the other hand, when the CPU1 completes the buffer switching,
The received message in ma is processed by the low-level protocol that checks the transmission order number and the reception order number, and if there is no problem, the task for performing the high-level protocol processing is generated and the interrupt processing routine is executed. Exit through.
After that, the scheduler of the CPU 1 takes over this task and performs the subsequent processing. Here, the high level protocol processing means higher level processing such as packet order control.

以上、回線Aについて、その動作を説明したが、実際に
は多回線分の動作が平行して非同期に行なわれている。
The operation of the line A has been described above, but in reality, the operations of multiple lines are performed in parallel and asynchronously.

(発明が解決しようとする課題) しかしながら、上述した従来の制御装置による処理にお
いては、次のような問題がある。以下、第4図を用いて
説明する。
(Problems to be Solved by the Invention) However, the processing by the above-described conventional control device has the following problems. This will be described below with reference to FIG.

第4図は、第2図における処理時間タイムチャートであ
る。第4図(a)は、同期方式がフレーム同期方式で、
フラグ“F"を共用したフレーム1とフレーム2を連続し
て受信した場合を示している。同図(b)は、第2図の
DMA要求線21上のDMA要求信号が図示のように3バイト分
遅れて発生していることを示しており、またフレームの
受信終了割込み(INT)がフレーム1の終結フラグ“F"
を受信した後に発生し、第3図の割込処理ルーチンが起
動されることを示している。また、第4図(c)〜
(e)は夫々同図(a)のタイプの電文受信(フレーム
の連続受信)がA回線のみ発生した時,A〜Cの3回線同
時に発生した時,A〜Dの4回線同時に発生した時のタイ
ムチャートである。
FIG. 4 is a processing time chart in FIG. In FIG. 4 (a), the synchronization method is the frame synchronization method,
The case where frame 1 and frame 2 sharing the flag “F” are continuously received is shown. The same figure (b) is shown in FIG.
This shows that the DMA request signal on the DMA request line 21 is generated with a delay of 3 bytes as shown in the figure, and the frame reception end interrupt (INT) is the end flag “F” of frame 1.
Is generated after the reception of the message, and the interrupt processing routine of FIG. 3 is started. Also, FIG. 4 (c)-
(E) shows the case where the message reception (continuous frame reception) of the type shown in (a) of the figure occurs only on line A, when three lines A to C occur simultaneously, and when four lines A to D occur simultaneously. Is a time chart of.

CPU1の処理プログラムは第3図で示されるが、ここで、
バッファ切替完了までの時間をT、バッファ切替完了後
割込処理ルーチンを抜けるまでの時間をtとする。そし
て、Tの時間は、前の電文の受信終了から次の電文を正
常に受信するための準備の期間(以下、バッファ切替時
間という。)であり(ステップS1,S2)、このバッファ
切替処理が完了する以前に次の電文が受信されると、次
の電文は正常に受信ができないため急いで処理する必要
がある。もし、バッファ切替処理が遅れた場合、前の電
文と次の電文が受信電文領域に連続して格納され、電文
の区切りが判からないため、受信完了した前の電文にま
でも影響を与えてしまう(処理対象電文長を間違えてし
まう)ことになる。
The processing program of CPU1 is shown in FIG.
Let T be the time until the buffer switching is completed, and t be the time until the interrupt processing routine is exited after the buffer switching is completed. Then, the time T is a preparation period (hereinafter referred to as a buffer switching time) for normally receiving the next message from the end of reception of the previous message (steps S1 and S2), and this buffer switching process is performed. If the next message is received before the completion, the next message cannot be received normally, so it must be processed promptly. If the buffer switching process is delayed, the previous message and the next message are stored consecutively in the received message area, and the message delimiter is not known. It ends up (wrong message length to be processed).

一方、tの時間は次の電文がいつ来ても受信できる時間
であり、プロトコルの基本的な所に必要な時間(以下、
基本処理時間という。)である(ステップS3〜S6)。
On the other hand, the time of t is the time when the next message can be received anytime, and it is the time required for the basic part of the protocol (hereinafter,
Basic processing time. ) (Steps S3 to S6).

Tの時間に行なわれるバッファ切替は、TRCの正常受信
終了割込で起動されるが(ステップS1,S2)、次のフレ
ームの“A"の転送要求が発生するまでのτの時間(処理
許容時間)内に終了する必要がある[第4図(b)]。
これは、前述したようにバッファ切替処理が完了する以
前に次の電文が受信されると次の電文が正常に受信がで
きないからである。なおτは受信速度に反比例して短く
なる。
The buffer switching performed at time T is activated at the normal reception end interrupt of TRC (steps S1 and S2), but the time τ until the transfer request of "A" of the next frame is generated (processing allowance). It is necessary to finish within (time) [Fig. 4 (b)].
This is because, as described above, if the next message is received before the buffer switching process is completed, the next message cannot be received normally. Note that τ becomes shorter in inverse proportion to the reception speed.

このような条件の下に、第4図(a)の電文の受信がTR
C4にてA回線のみに発生したときには、前述したバッフ
ァ切替時間Taと基本処理時間taの関係は同図(c)に示
すようになる。従ってこれらのバッファ切替時間Taと基
本処理時間taは処理許容時間τよりも十分小さくなって
おり、問題はない。
Under such a condition, the reception of the message in Fig. 4 (a) becomes TR.
When the error occurs only in the A line at C4, the relationship between the buffer switching time Ta and the basic processing time ta is as shown in FIG. Therefore, the buffer switching time Ta and the basic processing time ta are sufficiently smaller than the processing allowable time τ, and there is no problem.

次に同図(a)の電文の受信がTRC4,5,6にてA,B,Cの3
回線同時に発生したときには、第3図に示す如く各回線
の割込処理は、割込みが同一レベルに設定してあるた
め、先ず優先順位(電文の受信をTRC4〜7にてA〜Dの
4回線同時に発生した場合、割込みの優先順位は回線A,
B,C,Dの順に予め設定してあるとする。)の高いA回線
の処理(バッファ切替とプロトコルの基本的処理)が連
続して行なわれ、この間他のB回線,C回線は割込要求が
保留される。A回線の処理が終わった時点(バッファ切
替時間Taと基本処理時間taの終了時点)で保留されてい
る割込みのうちより優先順位の高いB回線の処理が始ま
る。C回線の処理はB回線の処理の後に行なわれる。従
って第4図(d)に示すようなタイミングで処理され
る。同図(d)において、Tb,tbは夫々B回線について
のバッファ切替時間,基本処理時間であり、Tc,tcは夫
々C回線についてのバッファ切替時間,基本処理時間で
ある。同図(d)から判かるようにC回線についての基
本処理時間tcが所許容時間τ(ここでは3バイト分の時
間)内に終了していないが、前述したように基本処理時
間であるから問題はない。
Next, the reception of the message in FIG.
When the lines are generated simultaneously, the interrupt processing of each line is set to the same level as shown in FIG. 3, so that the priority is first set (the reception of the message is 4 lines of A to D by TRC4 to 7). If they occur at the same time, the priority of the interrupt is line A,
It is assumed that B, C, and D are set in this order in advance. ) High A line processing (buffer switching and basic protocol processing) is continuously performed, and interrupt requests are held for the other B and C lines. At the time when the processing of the A line is completed (at the end of the buffer switching time Ta and the basic processing time ta), the processing of the B line having a higher priority is started. The processing of the C line is performed after the processing of the B line. Therefore, the processing is performed at the timing shown in FIG. In FIG. 5D, Tb and tb are the buffer switching time and the basic processing time for the B line, respectively, and Tc and tc are the buffer switching time and the basic processing time for the C line, respectively. As can be seen from FIG. 6D, the basic processing time tc for the C line is not completed within the allowable time τ (here, 3 bytes), but it is the basic processing time as described above. No problem.

次に同図(a)の電文の受信がTRC4〜7にてA〜D回線
同時に行なわれ、TRC4〜7から同時に割込信号が発生し
た場合、同図(e)に示すようにD回線についてのバッ
ファ切替時間Tdが処理許容時間τの中で処理できていな
い。これは、A,B,Cの3回線までは、処理が可能である
が、4回線は処理が間に合わないことを示している。
Next, when the TRCs 4 to 7 simultaneously receive the telegram shown in FIG. 7A and the interrupt signals are simultaneously generated from TRCs 4 to 7, when the TRCs 4 to 7 are used, the D lines are connected as shown in FIG. The buffer switching time Td of is not processed within the processing allowable time τ. This indicates that processing can be performed up to 3 lines A, B, and C, but processing cannot be performed in time for 4 lines.

以上から判かるように、入出力装置としてのTRCの一つ
の割込要因についての一つの割込レベルを割り当て、非
同期処理を順次行なう従来の割込処理では、複数のTRC
から同時に割込要求が発生した場合にはわずかの回線
(上記例では3回線)までしか処理ができず、処理能力
が低いという欠点があった。
As can be seen from the above, in the conventional interrupt processing that assigns one interrupt level for one interrupt factor of the TRC as an input / output device and sequentially performs asynchronous processing, multiple TRCs are used.
However, when interrupt requests are simultaneously generated, only a few lines (three lines in the above example) can be processed, and the processing capacity is low.

そこで本発明の目的は、処理能力の高い優れた制御装置
を提供することにある。
Therefore, an object of the present invention is to provide an excellent control device having high processing capability.

(課題を解決するための手段) 複数の入出力装置に対応して設けられたトランシーバか
らの割込信号により複数の割込処理を処理装置で実行す
る制御装置において、前記トランシーバからの割込信号
を高レベルの割込処理要求信号として前記処理装置に直
接伝達する高レベル割込処理要求信号伝達手段と、前記
トランシーバからの割込信号を記憶した後低レベルの割
込処理要求信号として前記処理装置に伝達する低レベル
割込処理要求信号伝達手段と、割込信号を出力したトラ
ンシーバを前記処理装置に通知する通知手段とを設け、
前記処理装置における前記複数の割込処理は、前記高レ
ベルの割込処理求信号に対応する高レベル割込処理ルー
チンと前記低レベルの割込処理要求信号に対応する低レ
ベル割込処理ルーチンに分けて実行され、高レベル割込
処理ルーチンでは前記複数の割込処理のうち緊急度の高
い割込処理を実行し、低レベル割込処理ルーチンでは前
記割込処理のうちのその他の割込処理を実行し、高レベ
ル割込処理ルーチンに対する起動要求がある限り高レベ
ル割込処理を実行し、高レベル割込処理が終了した後に
これまで保留されてきた低レベル割込処理ルーチンを起
動実行することを特徴とする制御装置を備えてなるもの
である。
(Means for Solving the Problems) In a control device for executing a plurality of interrupt processes in a processing device by an interrupt signal from a transceiver provided corresponding to a plurality of input / output devices, an interrupt signal from the transceiver Is transmitted as a high level interrupt processing request signal directly to the processing device, and an interrupt signal from the transceiver is stored, and then the low level interrupt processing request signal is processed as the low level interrupt processing request signal. Low-level interrupt processing request signal transmitting means for transmitting to the device, and notifying means for notifying the processing device of the transceiver that has output the interrupt signal,
The plurality of interrupt processes in the processing device include a high level interrupt process routine corresponding to the high level interrupt process request signal and a low level interrupt process routine corresponding to the low level interrupt process request signal. The high-level interrupt processing routine executes the interrupt processing with a high degree of urgency among the plurality of interrupt processing, and the low-level interrupt processing routine executes other interrupt processing of the interrupt processing. To execute the high-level interrupt processing routine as long as there is a request to start the high-level interrupt processing routine, and to start and execute the low-level interrupt processing routine that has been suspended until after the high-level interrupt processing ends. It is provided with a control device characterized by the above.

(作用) 上記構成を有する本発明によれば、入出力装置の同一の
割込要求に対して、高レベル割込処理要求信号伝達手段
で高レベルの割込処理要求信号を出力し、低レベル割込
処理要求信号伝達手段で低レベルの割込処理要求信号を
出力する。処理装置はこれらの割込処理要求信号に基づ
いて、高レベルの割込処理および低レベルの割込処理を
それぞれ実行する。そして処理装置は、高レベルの割込
処理ルーチンに対する起動要求がある限り優先して高レ
ベルの割込処理を実行するので、高レベルの割込処理ル
ーチンで緊急度の高い割込処理を実行させることによ
り、効率良く高速に処理することができる。
(Operation) According to the present invention having the above configuration, in response to the same interrupt request of the input / output device, the high level interrupt processing request signal transmitting means outputs the high level interrupt processing request signal, and the low level interrupt processing request signal is output. The interrupt processing request signal transmitting means outputs a low level interrupt processing request signal. The processing device executes high-level interrupt processing and low-level interrupt processing based on these interrupt processing request signals. Then, the processing device preferentially executes the high-level interrupt processing as long as there is a start request to the high-level interrupt processing routine, so that the high-level interrupt processing routine executes the interrupt processing with a high degree of urgency. This enables efficient and high-speed processing.

(実施例) 次に本発明について図面を参照して説明する。(Example) Next, this invention is demonstrated with reference to drawings.

第1図は本発明による制御装置の一実施例を示し、第2
図と同一又は相当部分には同符号を用いている。第1図
において、TRC4〜7からの割込信号はオアゲート12に入
力されると同時にフリップフロップ8〜11のセット入力
端子に供給されるようになっている。また、フリップフ
ロップ8〜11の出力はオアゲート13に入力されると共
に、リードバッファ14に供給されるようになっている。
また、オアゲート13の出力は低レベルの割込処理要求信
号(以下、割込信号ともいう。)INTLを形成し、一方オ
アゲート12の出力は高レベルの割込処理要求信号(以
下、割込信号ともいう。)INTHを形成し、夫々本発明の
処理装置としてのCPU1に割込信号線23,24を介して割込
処理を要求する。
FIG. 1 shows an embodiment of a control device according to the present invention, and FIG.
The same reference numerals are used for the same or corresponding parts in the figure. In FIG. 1, the interrupt signals from the TRCs 4 to 7 are input to the OR gate 12 and at the same time supplied to the set input terminals of the flip-flops 8 to 11. The outputs of the flip-flops 8 to 11 are input to the OR gate 13 and also supplied to the read buffer 14.
The output of the OR gate 13 forms a low level interrupt processing request signal (hereinafter also referred to as an interrupt signal) INTL, while the output of the OR gate 12 outputs a high level interrupt processing request signal (hereinafter, interrupt signal). (Also referred to as INTH) and requests interrupt processing to the CPU 1 as the processing device of the present invention via the interrupt signal lines 23 and 24, respectively.

次に第1図の動作について第4図(f),第5図を用い
て以下説明する。なお、第4図(f)は本発明に係る処
理時間タイムチャート、第5図は第1図のCPU1の処理プ
ログラム例を示す図である。
Next, the operation of FIG. 1 will be described below with reference to FIGS. 4 (f) and 5. Note that FIG. 4 (f) is a processing time chart according to the present invention, and FIG. 5 is a diagram showing an example of a processing program of the CPU 1 in FIG.

第5図のCPU1の処理プログラムにおいては第3図に比べ
ると、割込処理ルーチンが二つに分割されており、高レ
ベルの割込(INTH)処理ではTRCの正常受信終了後バッ
ファ切替のみを行なって引継情報を作成しており(ステ
ップS1〜S3)、一方低レベルの割込(INTL)処理では、
その引継情報にもとづいて受信済電文の低レベルプロト
コル処理を行なった後、高レベルプロトコル処理のため
のタスクを生成している(ステップS1〜S3)。
In the processing program of CPU1 in FIG. 5, compared with FIG. 3, the interrupt processing routine is divided into two, and in high-level interrupt (INTH) processing, only buffer switching is performed after the normal reception of TRC is completed. We are going to create the takeover information (steps S1 to S3), while in the low-level interrupt (INTL) processing,
After performing the low-level protocol processing of the received message based on the takeover information, the task for the high-level protocol processing is generated (steps S1 to S3).

このような処理プログラムのもとで、第1図の4つの回
線A〜Dで全く同時に受信終了割込みが発生した場合、
次のように各回線は処理される。
Under the above processing program, if the reception end interrupts are generated at the same time on the four lines A to D in FIG.
Each line is processed as follows.

4つの回線A〜Dの入力電文で第41(a)に示す終結フ
ラグ“F"を検出すると、TRC4〜TRC7は同時に割込信号線
22をオンとする。これにより割込信号がオアゲート12に
入力され、オアゲート12の出力は、高レベルの割込処理
要求信号INTHとなり、略同時に当該フリップフロップ8
〜11をセットする。そしてフリップフロップ8〜11の出
力はオアゲート13を介して低レベルの割込処理要求信号
INTLを割込信号線24よりCPU1へ通知する。
When the termination flag "F" shown in 41 (a) is detected in the input message of the four lines A to D, TRC4 to TRC7 simultaneously detect the interrupt signal lines.
Turn on 22. As a result, the interrupt signal is input to the OR gate 12, and the output of the OR gate 12 becomes the high-level interrupt processing request signal INTH, which is almost at the same time.
Set ~ 11. The outputs of the flip-flops 8 to 11 are low-level interrupt processing request signals via the OR gate 13.
Notify INTL to CPU1 via interrupt signal line 24.

CPU1は上述の高レベルの割込処理要求信号INTHと低レベ
ルの割込処理要求信号INTLを略同時に受けるが、割込優
先順位は、INTH>INTLとなっているので、必ず最初にIN
THに対する割込処理ルーチンが起動される。CPU1はINTH
処理ルーチンの中では、先ずCPU1がリードバッファ14に
アクセスしてどのTRCであるかを知り、そのTRCがTRC4で
あったと知ると、次にTRC4をアクセスしてTRC4のステー
タスレジスタ(図示していない)を呼んで割込原因を知
る。続いてTRC4が正常に受信が完了したことを判断した
後バッファ切替処理を行なう。
CPU1 receives the above-mentioned high-level interrupt processing request signal INTH and low-level interrupt processing request signal INTL at approximately the same time, but since the interrupt priority is INTH> INTL, be sure to first
The interrupt processing routine for TH is started. CPU1 is INTH
In the processing routine, first, the CPU 1 accesses the read buffer 14 to know which TRC is, and when the TRC is TRC4, next, TRC4 is accessed and the TRC4 status register (not shown) is accessed. ) To know the cause of the interrupt. Then, after TRC4 determines that the reception is normally completed, the buffer switching processing is performed.

この後、CPU1はバッファ切替を行なった回線番号等を引
継情報としてMEM2に記憶させ、TRC4の割込要因をリセッ
トして高レベルの割込(INTH)処理ルーチンを抜ける
(INTH処理のS3〜S5)。
After this, CPU1 stores the line number for which the buffer was switched in MEM2 as takeover information, resets the interrupt factor of TRC4, and exits the high-level interrupt (INTH) processing routine (INTH processing S3 to S5. ).

しかし、この時点で他のTRC5〜TRC7も割込処理要求を出
力しているので、再度、高レベルの割込(INTH)処理ル
ーチンが起動され、フリップフロップ8〜11に保持され
ている低レベルの割込み(INTL)は保留されたままとな
る。
However, at this point, the other TRC5 to TRC7 are also outputting interrupt processing requests, so the high level interrupt (INTH) processing routine is started again and the low level signals held in the flip-flops 8 to 11 are restarted. The interrupt (INTL) of is left pending.

このようにして、回線Bの高レベルの割込み(INTH)が
処理されバッファ切替が行なわれる。
In this way, the high level interrupt (INTH) of the line B is processed and the buffer is switched.

同様に回線C,回線Dと順次INTHの処理を完了する。回線
DのINTHの処理が完了した後、ここまで保留されてきた
INTLの処理ルーチンが起動される(第4図(f),第5
図のINTLの処理)。CPU1はINTLがどの回線から発生して
いるのかをリードバッファ14を介して知り、INTLの発生
が同時のときは、優先順位を決めて処理する。優先順位
が回線A,B,C,Dの順である場合に、4つの回線A,B,C,Dが
同時に割込んだ場合、A回線の引継情報に基づいて低レ
ベルのプロトコル処理を行ない、高レベルのプロトコル
処理のためのタスクを生成した後、リセット信号線26を
命令でオンとして、フリップフロップ8をリセットした
後、INTL処理ルーチンを抜ける(INTL処理のステップS1
〜S5)。この時点では他の回線B〜D用のフリップフロ
ップ9〜11がオンとなっているため(セット状態にある
ため)、すぐ続いて回線B用のINTL処理ルーチンが再起
動される。回線C,D用のINTLも同様に処理される。
Similarly, the processing of line C and line D and INTH is completed in sequence. It has been held so far after the processing of INTH on line D is completed.
INTL processing routine is started (Fig. 4 (f), 5th).
Figure INTL processing). The CPU 1 knows from which line the INTL is generated via the read buffer 14, and when the INTLs are generated at the same time, the CPU 1 determines the priority and processes it. When the priority order is line A, B, C, D, and four lines A, B, C, D simultaneously interrupt, low-level protocol processing is performed based on the takeover information of line A. After generating a task for high-level protocol processing, the reset signal line 26 is turned on by an instruction, the flip-flop 8 is reset, and then the INTL processing routine is exited (step S1 of INTL processing
~ S5). At this point, the flip-flops 9 to 11 for the other lines B to D are on (being in the set state), so that the INTL processing routine for the line B is restarted immediately thereafter. INTL for lines C and D are processed in the same manner.

このようにして、全回線分のINTH,INTLの処理を行なう
が、この処理時間をタイムチャートにしたのが第4図
(f)である。この第4図(f)では4回線A〜D同時
に受信終了割込が発生した場合、まずINTHの処理Ta,Tb,
Tc,Tdが順次処理され、続いてINTLの処理ta,tb,tc,tdが
順次処理されることを示している。
In this manner, the processing of INTH and INTL for all lines is performed, and the processing time is shown in a time chart in FIG. 4 (f). In FIG. 4 (f), when a reception end interrupt occurs simultaneously for four lines A to D, INTH processing Ta, Tb,
This indicates that Tc and Td are sequentially processed, and then INTL processes ta, tb, tc, and td are sequentially processed.

従来例第4図(e)ではD回線のバッファ切替が処理許
容時間に間に合わなかったのに対し、本発明では同図
(f)に示すように処理許容時間τ内に全回線のバッフ
ァ切替ができることを示している。要するに緊急度の高
い割込処理、ここでは特に全回線のバッファ切替処理を
優先順位の高いものから先に処理して受信に差し支えな
いようにしていると共に、緊急度の低く受信に影響がな
いものは、処理許容時間τを越えても差し支えないの
で、後回しにしたものである。これにより多回線の受信
所が効率良く、高速に処理できる。
In the prior art example FIG. 4 (e), the buffer switching of the D line was not in time for the processing allowable time, whereas in the present invention, the buffer switching of all lines was performed within the processing allowable time τ as shown in FIG. 4 (f). It shows that you can do it. In short, interrupt processing with a high degree of urgency, especially buffer switching processing for all lines is processed in order from the one with the highest priority so that it does not interfere with reception, and the one with low urgency and does not affect reception Indicates that it is postponed because the allowable processing time τ may be exceeded. As a result, multi-line receiving stations can be processed efficiently and at high speed.

以上の説明から判かるように、入出力装置としてのTRC
の一つの割込要因に対して二つの異なるレベルの割込処
理要求信号を略同時に発生させ、その割込処理のうち高
いレベルの割込処理では緊急度の高い割込処理、ここで
はたとえば前述したバッファ切替処理などを行ない、か
つ低いレベルの割込処理ではより緊急度の低い割込処
理、たとえば送信順序番号の確認とか受信順序番号の確
認などプロトコル上の処理を行なうようにしたので、多
数の入出力装置としてのTRCの処理を効率良く高速に処
理することができる。もって処理能力の高い優れた制御
装置を提供できる。
As can be seen from the above description, TRC as an input / output device
The interrupt processing request signals of two different levels are generated at substantially the same time for one of the interrupt factors, and the interrupt processing with the higher level of the interrupt processing has a high degree of urgency. Buffer switching processing, etc., and at lower level interrupt processing, less urgent interrupt processing, such as confirmation of the transmission sequence number and reception sequence number, is performed on the protocol. The TRC processing as an input / output device can be processed efficiently and at high speed. Therefore, it is possible to provide an excellent control device having high processing capability.

本発明は本実施例に限定されることなく本発明の要旨を
逸脱しな範囲で種々の応用及び変形が考えられる。たと
えば本実施例では、割込処理要求信号としては、二つの
異なるレベルの割込処理要求信号を発生させているが、
本発明は複数の異なるレベルの割込処理要求信号を発生
させてもよい。この場合、複数の異なるレベルの割込処
理では夫々緊急度の度合に応じて段階的に割込処理すべ
きものをあてはめてもよい。また本発明は本実施例での
ダイレクトメモリアクセスコントローラは含まない制御
装置にも適用できる。
The present invention is not limited to the present embodiment, and various applications and modifications are conceivable without departing from the gist of the present invention. For example, in the present embodiment, as the interrupt processing request signal, two different levels of interrupt processing request signal are generated.
The present invention may generate a plurality of different levels of interrupt service request signals. In this case, in a plurality of different levels of interrupt processing, the interrupt processing to be performed may be applied stepwise according to the degree of urgency. The present invention can also be applied to a control device that does not include the direct memory access controller in this embodiment.

また、本発明は本実施例に限定されることなく、複数の
異なるレベルの割込処理要求信号は略同時に発生させな
くても、低レベル側の割込処理は緊急度が低い割込処理
を行なうものであり、低レベル側の割込処理要求信号は
処理に差し支えのない適度なタイミングであればよい。
Further, the present invention is not limited to this embodiment, and even if the interrupt processing request signals of a plurality of different levels are not generated at substantially the same time, the interrupt processing on the low level side is an interrupt processing with low urgency. The interrupt processing request signal on the low level side may have an appropriate timing that does not interfere with the processing.

(発明の効果) 上述したように本発明は、入出力装置の同一の割込要因
に対して複数の異なるレベルの割込処理要求を発生さ
せ、その割込処理のうち、高いレベル側の割込処理では
緊急度の高い割込処理を行ない、かつ低レベル側の割込
処理では緊急度の低い割込処理を行なうようにしたの
で、高速入出力装置、多数の入出力装置の処理を効率よ
く高速に処理することができもって処理能力の高い優れ
た制御装置を提供できるなどその効果は大きい。
(Effects of the Invention) As described above, according to the present invention, a plurality of interrupt processing requests of different levels are generated for the same interrupt factor of the input / output device, and the interrupt processing on the higher level side of the interrupt processing is generated. The interrupt processing is performed with a high degree of urgency, and the low level interrupt processing is performed with a low degree of urgency, so that high-speed I / O devices and multiple I / O devices can be processed efficiently. The effect is great, for example, an excellent control device capable of performing high-speed processing at a high speed and having a high processing capacity can be provided.

【図面の簡単な説明】 第1図は本発明による制御装置の一実施例を示す構成
図、第2図は従来の制御装置の一例を示す構成図、第3
図は第2図のCPUの処理プログラム例を示す図、第4図
は従来及び本発明の処理時間タイムチャート、第5図は
第1図のCPUの処理プログラム例を示す図である。 1……CPU、4〜7……TRC(送受信部)、 8〜11……フリップフロップ、 12,13……オアゲート。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a configuration diagram showing an embodiment of a control device according to the present invention, FIG. 2 is a configuration diagram showing an example of a conventional control device, and FIG.
FIG. 4 is a diagram showing an example of the processing program of the CPU of FIG. 2, FIG. 4 is a processing time time chart of the conventional and the present invention, and FIG. 5 is a diagram showing an example of the processing program of the CPU of FIG. 1 ... CPU, 4-7 ... TRC (transceiver), 8-11 ... flip-flops, 12,13 ... OR gate.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数の入出力装置に対応して設けられたト
ランシーバからの割込信号により複数の割込処理を処理
装置で実行する制御装置において、 前記トランシーバからの割込信号を高レベルの割込処理
要求信号として前記処理装置に直接伝達する高レベル割
込処理要求信号伝達手段と、 前記トランシーバからの割込信号を記憶した後低レベル
の割込処理要求信号として前記処理装置に伝達する低レ
ベル割込処理要求信号伝達手段と、 割込信号を出力したトランシーバを前記所装置に通知す
る通知手段とを設け、 前記処理装置における前記複数の割込処理は、前記高レ
ベルの割込処理要求信号に対応する高レベル割込処理ル
ーチンと前記低レベルの割込処理要求信号に対応する低
レベル割込処理ルーチンに分けて実行され、高レベル割
込処理ルーチンでは前記複数の割込処理のうち緊急度の
高い割込処理を実行し、低レベル割込処理ルーチンでは
前記割込処理のうちのその他の割込処理を実行し、高レ
ベル割込処理ルーチンに対する起動要求がある限り高レ
ベル割込処理を実行し、高レベル割込処理が終了した後
にこれまで保留されてきた低レベル割込処理ルーチンを
起動実行することを特徴とする制御装置。
1. A control device for executing a plurality of interrupt processes in a processing device by an interrupt signal from a transceiver provided corresponding to a plurality of input / output devices, wherein the interrupt signal from the transceiver is at a high level. High level interrupt processing request signal transmitting means for directly transmitting to the processing device as an interrupt processing request signal, and storing the interrupt signal from the transceiver and then transmitting to the processing device as a low level interrupt processing request signal. Low level interrupt processing request signal transmitting means and notification means for notifying the device of the transceiver that has output the interrupt signal are provided, and the plurality of interrupt processing in the processing device are the high level interrupt processing. The high-level interrupt processing routine corresponding to the request signal and the low-level interrupt processing routine corresponding to the low-level interrupt processing request signal are separately executed, and the high-level interrupt processing routine is executed. A high-level interrupt process is executed in the low-level interrupt process routine by executing a high-urgency interrupt process among the plurality of interrupt processes, and a high-level interrupt process in the low-level interrupt process routine. A control device, which executes a high-level interrupt process as long as there is a request to start the routine, and starts and executes a low-level interrupt process routine that has been suspended until after the high-level interrupt process is completed.
JP1029703A 1989-02-10 1989-02-10 Control device Expired - Lifetime JPH077954B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1029703A JPH077954B2 (en) 1989-02-10 1989-02-10 Control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1029703A JPH077954B2 (en) 1989-02-10 1989-02-10 Control device

Publications (2)

Publication Number Publication Date
JPH02210932A JPH02210932A (en) 1990-08-22
JPH077954B2 true JPH077954B2 (en) 1995-01-30

Family

ID=12283471

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1029703A Expired - Lifetime JPH077954B2 (en) 1989-02-10 1989-02-10 Control device

Country Status (1)

Country Link
JP (1) JPH077954B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4710474B2 (en) * 2005-08-02 2011-06-29 日産自動車株式会社 AC motor control device

Also Published As

Publication number Publication date
JPH02210932A (en) 1990-08-22

Similar Documents

Publication Publication Date Title
JP3604398B2 (en) High-speed parallel packetized module arbitration control and data bus
US4570220A (en) High speed parallel bus and data transfer method
EP0141302A2 (en) Data processing system
JPH01147647A (en) Data processor
WO1992015162A1 (en) Method and apparatus for controlling data communication operations within stations of a local area network
JPH02227765A (en) Data transfer apparatus for digital computer
JP3664664B2 (en) Bus system and bus arbitration method thereof
KR100708096B1 (en) Bus system and execution scheduling method for access commands thereof
US4736365A (en) Method and apparatus for controlling access to an asynchronous communication network
JPH077954B2 (en) Control device
JP2520905B2 (en) Serial communication controller
JPH05334213A (en) Data communication system
JP3240863B2 (en) Arbitration circuit
JP4125933B2 (en) Processor system with common memory
JP3489456B2 (en) Real-time communication device and system
JPH11252150A (en) Network connection device and network connection control method
JP2664208B2 (en) Direct memory access control device and direct memory access control method
JPH01192239A (en) Polling system in communication circuit
JP3146864B2 (en) Unidirectional loop transmission circuit
CN117118828A (en) Protocol converter, electronic equipment and configuration method
JPH03262063A (en) Bus control circuit for dma transfer
JPS6373741A (en) Communication control equipment
JPH0575304B2 (en)
JP2001005742A (en) Data transfer system
JPH0119672B2 (en)