JPH01123357A - Interruption control system - Google Patents
Interruption control systemInfo
- Publication number
- JPH01123357A JPH01123357A JP62281303A JP28130387A JPH01123357A JP H01123357 A JPH01123357 A JP H01123357A JP 62281303 A JP62281303 A JP 62281303A JP 28130387 A JP28130387 A JP 28130387A JP H01123357 A JPH01123357 A JP H01123357A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- cpu
- signal
- main
- controller
- 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
- 238000012545 processing Methods 0.000 claims abstract description 53
- 238000000034 method Methods 0.000 claims description 33
- 230000009977 dual effect Effects 0.000 claims description 13
- 238000012546 transfer Methods 0.000 claims description 10
- 230000010365 information processing Effects 0.000 claims 1
- 239000013256 coordination polymer Substances 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 238000012790 confirmation Methods 0.000 description 5
- 101100366918 Dictyostelium discoideum StlB gene Proteins 0.000 description 4
- 230000002093 peripheral effect Effects 0.000 description 4
- 101100006960 Caenorhabditis elegans let-2 gene Proteins 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Landscapes
- Hardware Redundancy (AREA)
- Multi Processors (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、デュアルCPU構成のシステムにおける割り
込み処理の方式に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an interrupt processing method in a system having a dual CPU configuration.
従来、メインのCPUとサブのCPUが同時には動作せ
ず、CPUの切り換えはどちらのCPUからも可能なデ
ュアルCPU構成のシステムにおいて、どちらか一方の
CPUの動作中に、他方のCPUが処理すべき割り込み
が発生した場合、次のような方法により、割り込みを受
け付けたCPUは割り込みを処理する:もう一方のCP
Uに割り込みが発生したことを伝え、割り込み処理を実
行していた。ここで、メインCPUとサブCPUが同時
に動作しないのはメモリ・Ilo・周辺コントローラな
どを共有するためである。Conventionally, in dual-CPU systems where the main CPU and sub-CPU did not operate at the same time and CPU switching was possible from either CPU, it was possible to switch between CPUs while one CPU was operating. When an interrupt occurs, the CPU that accepted the interrupt processes the interrupt in the following way:
It informed U that an interrupt had occurred and executed the interrupt processing. Here, the main CPU and sub CPU do not operate at the same time because they share memory, Ilo, peripheral controllers, etc.
第4図はこの方式のブロック図である。FIG. 4 is a block diagram of this system.
第4図において、
401はメインCPU (以下、CPU(MAIN)と
略す。)
402はサブCPU (以下、CP U (SUB)と
略す。)
403は割り込みコントローラ
404はメインメモリ
405はシステムバス(以下、5BUSと略す。)
406は割り込みコントローラが外部から割り込みを受
け付ける信号
407は割り込みが発生したことをCPU(MAIN)
401に知らせる信号(以下、INTRIと略す。)
408は割り込みが発生したことをCPU(SUB)
402に知らせる信号(以下、lNTR11と略す。)
409はCPU(MAIN) 401が割り込みを受け
付けたことを割り込みコントローラ403に知らせる信
号(以下、INTAIと略す。)410はCPU(SU
B) 402が割り込みを受け付けたことを割り込みコ
ントローラ403に知らせる信号(以下、INTAnと
略す。)である。In FIG. 4, 401 is a main CPU (hereinafter abbreviated as CPU (MAIN)), 402 is a sub CPU (hereinafter abbreviated as CPU (SUB)), 403 is an interrupt controller 404, main memory 405 is a system bus (hereinafter abbreviated as CPU (SUB)), (abbreviated as 5BUS) 406 is a signal in which the interrupt controller accepts an interrupt from the outside. 407 is a signal to the CPU (MAIN) indicating that an interrupt has occurred.
401 is a signal to notify the CPU (SUB) that an interrupt has occurred (hereinafter abbreviated as INTRI).
A signal to inform the interrupt controller 403 that 401 has accepted an interrupt (hereinafter abbreviated as INTAI) 410 is the CPU (MAIN)
B) A signal (hereinafter abbreviated as INTAn) that notifies the interrupt controller 403 that the interrupt controller 402 has accepted an interrupt.
第4図において、割り込みコントローラ403によって
制御される割り込みはCPU
(MAIN) 401が処理する割り込みとCPU(S
OB) 402が処理する割り込みに分類することでき
るので、割り込み形態としては、■ CPU(MAIN
)401の動作中にCPU(MAIN) 401が処理
する割り込み要求が発生■ CPU(SUB) 402
の動作中にCP U (SOB)402が処理する割り
込み要求が発生
■ CPU(SOB) 402の動作中にCPU(MA
IN) 401が処理する割り込み要求が発生■ CP
U(MAIN) 401の動作中にCPU(SUB)
402が処理する割り込み要求が発生の45通りがある
。In FIG. 4, interrupts controlled by an interrupt controller 403 are handled by a CPU (MAIN) 401 and interrupts handled by a CPU (S
OB) 402, so the interrupt types are: ■ CPU (MAIN
) 401 is operating, an interrupt request that is processed by the CPU (MAIN) 401 occurs ■ CPU (SUB) 402
An interrupt request to be processed by the CPU (SOB) 402 occurs while the CPU (SOB) 402 is operating.
IN) An interrupt request handled by 401 occurs ■ CP
CPU (SUB) while U (MAIN) 401 is operating
There are 45 ways in which interrupt requests can be generated to be processed by 402.
動作しているCPUが処理する割り込み要求が ゛発
生する■や■の場合は、動作しているCPUが ′割
り込みを受け付け、速やかに割り込み処理をお ・こ
なう。If an interrupt request to be processed by the running CPU occurs (■ or ■), the running CPU will accept the interrupt and promptly process the interrupt.
これに対して、動作中で割り込みを受け付けるCPUと
、発生した割り込みを処理するCPUが異なる■や■の
場合は、次のような方法で割り込み処理をおこなう。■
と■では、処理方法は同一なのでここでは■についての
み説明する。CPU(MAIN) 401をCPU(S
OB) 402に、CPU(SOB) 402をCPU
(MAIN) 401に置き換えることによって、■の
処理となる。On the other hand, in the case of (1) or (2) where the CPU that accepts interrupts during operation and the CPU that processes the generated interrupts are different, the interrupt processing is performed in the following manner. ■
Since the processing methods for and ■ are the same, only ■ will be explained here. CPU (MAIN) 401
OB) 402, CPU (SOB) 402 to CPU
(MAIN) By replacing it with 401, the process of ■ becomes possible.
CPU(SOB)402の動作中に割り込みが発生する
と割り込みコントローラ403はlNTRI407およ
びlNTRI407の信号を送る。When an interrupt occurs during the operation of the CPU (SOB) 402, the interrupt controller 403 sends lNTRI407 and lNTRI407 signals.
CP U(SOB) 402が動作しているので、CP
U(SUB) 402は信号lNTR11408を受け
取り、実行中の処理を中断する。CPU (SOB) 402 is operating, so CP
U(SUB) 402 receives signal lNTR11408 and interrupts the process being executed.
CPU(SUB)402は割り込みを受け付けると、I
NTAII 410により割り込みを受け付けたことを
割り込みコントローラ403に知らせる。When the CPU (SUB) 402 accepts an interrupt, it
The NTA II 410 notifies the interrupt controller 403 that the interrupt has been accepted.
別り込みコントローラ403はアドレスバス・データバ
ス・コントルールバスの総称であるシステムバス405
を通して割り込み番号をCPUに送る。The separation controller 403 is a system bus 405 which is a general term for address bus, data bus, and control bus.
The interrupt number is sent to the CPU through.
割り込みを受け付けたCPU(SOB) 402は5B
US 405を通して割り込み番号を得、割り込みハン
ドラに制御を移し、割り込みに関する情報をメインメモ
リ404に格納する。そして、実際にその割り込みを処
理すべきCPU(MAIN)401に制御を移す。この
とき、CP U (SOB)402は、割り込みハンド
ラの最中である。CPU (SOB) that accepted the interrupt 402 is 5B
It obtains the interrupt number through US 405, transfers control to the interrupt handler, and stores information regarding the interrupt in main memory 404. Then, control is transferred to the CPU (MAIN) 401, which should actually process the interrupt. At this time, the CPU (SOB) 402 is in the middle of an interrupt handler.
制御を移されたCPU(MAIN) 401は、メイン
メモリ404から割り込みに関する情報を読み出し、ソ
フトウェアにより内部割り込ゐをかける。The CPU (MAIN) 401 to which control has been transferred reads information regarding the interrupt from the main memory 404 and issues an internal interrupt using software.
CPU(MAIN)401による割り込み処理が終了し
たなら、CPU(MAIN) 401は割り込み処理が
終了したことをメインメモリ404に書き込み、制御を
CPU(SOB) 402に戻す。When the interrupt processing by the CPU (MAIN) 401 is completed, the CPU (MAIN) 401 writes in the main memory 404 that the interrupt processing has been completed, and returns control to the CPU (SOB) 402.
制御の戻ったCPU(SOB)402は、割り込へハン
ドラから割り込まれたプログラムに戻り、中断したプロ
グラムの実行を再開する。The CPU (SOB) 402 that has returned control returns to the program that was interrupted by the interrupt handler and resumes execution of the interrupted program.
第5図は、このときの動作の様子を示したものである。FIG. 5 shows the operation at this time.
この図から、割り込みを受け付けてから、実際の割り込
み処理の終了までの実行パスが長く、また割り込みに関
する情報の受け渡しをソフトウェアでおこなっているた
め最大限の実行速度を得ていないことがわかる。This figure shows that the execution path from accepting an interrupt to the end of the actual interrupt processing is long, and that the maximum execution speed is not achieved because information about the interrupt is passed through software.
上述の方法では、次の欠点が考えられる。 The above method has the following drawbacks.
割り込み受け付けから実際の割り込み処理終了までのバ
スが長いうえに、割り込み情報の格納・読み出しや割り
込みの発生などの処理をソフトウェアでおこなうため、
実行時間が長くなってしまう。In addition to the long bus from interrupt acceptance to the actual completion of interrupt processing, processing such as storing and reading interrupt information and generating interrupts is performed by software.
Execution time becomes longer.
また、割り込みに関する情報をメインCPUとサブCP
Uで共有しているメモリ上に格納するため、そのメモリ
部分の保護なども必要になってくる。In addition, information regarding interrupts can be sent to the main CPU and sub CPU.
Since it is stored in memory shared by U, it is also necessary to protect that memory part.
従来、メモリ・Iloおよび周辺コントローラを共有す
るデュアルCPU構成のシステムにおける割り込み処理
は、割り込みを受け付けたCPUと割り込み処理を実行
するCPUが異なった場合、割り込みを受け付けたCP
Uが割り込み情報を共有メモリを介して割り込みを実行
するCPUに伝達し、割り込み処理を実行するCPUで
内部割り込みを発生させ、割り込み処理を実行していた
。Conventionally, in a system with a dual CPU configuration that shares memory, Ilo, and peripheral controllers, when the CPU that accepted the interrupt and the CPU that executed the interrupt processing were different, the CPU that accepted the interrupt
The U transmits interrupt information via shared memory to the CPU that executes the interrupt, and the CPU that executes the interrupt process generates an internal interrupt and executes the interrupt process.
本発明では、割り込み発生時に動作中のCPU5割り込
み処理を実行するCPUと異なった場合、メインCPU
が処理する割り込みのときは、動作中のサブCPUが割
り込みを受け付け、割り込み制御回路によってメインC
PUを起こすとともに、再度割り込み信号を発生させ、
割り込みコント1=−ラを介して、割り込み処理を実行
するメインCPUに再度割り込みをかけ、サブCPUが
処理する割り込みのときは、割り込み制御回路によって
、サブCPUが動作するまで割り込みを待避させた後や
、割り込み制御回路によってサブCPUを立ち上げた後
に、割り込み信号を発生させ、割り込みコントローラを
介して、割り込み処理を実行するサブCPUに再度割り
込みをかける、 という点が従来とは異なる。In the present invention, if the CPU5 in operation when an interrupt occurs is different from the CPU that executes the interrupt processing, the main CPU
If the interrupt is handled by
Wakes up the PU and generates an interrupt signal again,
An interrupt is issued again to the main CPU that executes the interrupt processing via the interrupt controller 1=-, and if the interrupt is handled by the sub CPU, the interrupt is evacuated by the interrupt control circuit until the sub CPU starts operating. Another difference from the conventional method is that after the sub CPU is started up by the interrupt control circuit, an interrupt signal is generated, and the sub CPU that executes the interrupt processing is again interrupted via the interrupt controller.
ふたつのCPUが同時に動作することのないデュアルC
PU構成のシステムにおいて、外部要因からの割り込み
信号を入力とし、割り込みコントローラに対しての割り
込み信号を出力とする割り込みを制御する回路を備えて
いる。Dual C, where two CPUs do not work at the same time
A system having a PU configuration includes a circuit that controls an interrupt by inputting an interrupt signal from an external factor and outputting an interrupt signal to an interrupt controller.
このとき、割り込み発生時に動作中のCPUと割り込み
処理を実行するCPUが異なる場合、それぞれ次のよう
な処理をおこなうことを特徴としている。At this time, if the CPU that is operating when the interrupt occurs and the CPU that executes the interrupt processing are different, the following processing is performed respectively.
サブCPUが動作中で、割り込み処理を実行するCPU
がメインCPUの場合は、割り込み制御回路は割り込み
コントローラに対して割り込み信号を送る。動作中のサ
ブCPUは割り込みコントローラを介して割り込みを受
け付け、割り込みを受け付けたことおよび割り込み番号
を割り込み制御回路に伝え、割り込み処理を終える。割
り込み制御回路は、割り込み番号を得て、割り込みコン
トローラに対して、再度同じ割り込み信号を送るととも
に、割り込みを実行するメインCPUを起こす。そして
、割り込みを実行するメインCPUが割り込み発生回路
によって発生された割り込みを割り込みコントローラを
介して受け取り、割り込み処理をおこなう。CPU that executes interrupt processing while the sub CPU is running
If it is the main CPU, the interrupt control circuit sends an interrupt signal to the interrupt controller. The operating sub-CPU accepts the interrupt via the interrupt controller, notifies the interrupt control circuit of the acceptance of the interrupt and the interrupt number, and ends the interrupt processing. The interrupt control circuit obtains the interrupt number, sends the same interrupt signal again to the interrupt controller, and wakes up the main CPU that executes the interrupt. The main CPU, which executes the interrupt, receives the interrupt generated by the interrupt generation circuit via the interrupt controller, and processes the interrupt.
メインCPUが動作中で、割り込み処理を実行するCP
UがサブCPUの場合は、割り込み制御回路は割り込み
番号を内部の記憶域に待避させる。CPU that executes interrupt processing while the main CPU is running
If U is a sub CPU, the interrupt control circuit saves the interrupt number in an internal storage area.
その後、サブCPUが動作したなら、割り込み制御回路
は、内部の記憶域に待避させておいた割り込み番号を得
て、割り込みコントローラに対して、再度同じ割り込み
信号を送る。サブCPUはメインCPUの動作中に発生
した割り込みを、割り込みコントローラを介して受け取
り、割り込み処理をおこなう。After that, when the sub CPU starts operating, the interrupt control circuit obtains the interrupt number saved in the internal storage area and sends the same interrupt signal to the interrupt controller again. The sub CPU receives interrupts generated during the operation of the main CPU via an interrupt controller, and processes the interrupts.
本発明について、図面を用いて説明する。 The present invention will be explained using the drawings.
第1図は、本発明の実施例におけるデュアルCPU構成
のシステムを示すブロック図である。FIG. 1 is a block diagram showing a system with a dual CPU configuration in an embodiment of the present invention.
第1図において、
101はメインCPU (以下、CPU(MAIN)と
略す。)
102はサブCPU (以下、CP U (SOB)と
略す。)
103は割り込みコントローラ
104はシステムバス(以下、5BUSと略す。)
105は割り込みが発生したことをCPU(MAIN)
101に知らせる信号(以下、INTRIと略す。)
106は割り込みが発生したことをCPU(SOB)
I 02に知らせる信号(以下、INTRnと略す、)
107はCPU(MAIN) l 01が割り込みを受
け付けとことを割り込みコントローラ103に知らせる
信号(以下、INTAIと略す。)108はCPU(S
OB) 102が割り込みを受け付けたことを割り込み
コントローラ103に知らせる信号(以下、INTAI
Iと略す。)109はCPU(MAIN) 101のス
テータスをINTHWI 11に知らせる信号(以下、
STIと略す。)
110はCPU(SUB) 102のステータスを工N
THWI l 1に知らせる信号(以下、ST■と略す
。)
111は入力として外部要因からの割り込み信号114
・CPU(MAIIlF) 101とCPU(SUB)
102のステータスを示す信号5T1109とSTI
[110・CPU(MAIN)101が処理する割り込
みをCPU(SOB)102が受け付けたことを示すC
P U (SUB)102からの信号116およびその
割り込みの割り込み番号を知らせるためのCPU(SO
B) 102からのバス117、出力として割り込みコ
ントローラに対して割り込み発生させる信号115・C
PU(MAIN) 101を起こすための信号118を
もつ割り込みを制御するためのハードウェア(以下、I
NTHWと略す。)
112は割り込み処理を実行するCPUがCPU(MA
IN) 101であるかCP U (SUB)102で
あるかを示すフラグを割り込み番号の数だけまとめたI
NTHWI 11内のフラグ
113は割り込みの番号を格納しておく INTHW内
部の記憶域(以下、INTNOと略す。)
114はINTHWIIが外部割り込み要因から割り込
みを受け付ける信号
115はINTHWI 11が発生させた割り込みを割
り込みコントローラに伝える信号116はCPU(SU
B) 102が割り込みコントローラ103からCP
U(MAIN) 101が処理すべき割り込みを受け付
けたことをINTHWLIIに知らせる信号(以下、R
INTと略す。)
117はCPU(SOB) 102が受け付けたCP
U(MAYN) 101が処理すべき割り込みの割り込
み番号をINTHWI 11に知らせるバス
118はINTHWI 11から、CPU(MAIN)
101を起こすための信号である。In FIG. 1, 101 is a main CPU (hereinafter abbreviated as CPU (MAIN)), 102 is a sub CPU (hereinafter abbreviated as CPU (SOB)), and 103 is an interrupt controller 104 that is a system bus (hereinafter abbreviated as 5BUS). ) 105 indicates that an interrupt has occurred to the CPU (MAIN).
101 is a signal that informs the CPU (SOB) that an interrupt has occurred (hereinafter abbreviated as INTRI).
A signal that informs the interrupt controller 103 that I01 has accepted an interrupt (hereinafter abbreviated as INTRn) 107 is a signal that informs the interrupt controller 103 that l01 has accepted an interrupt (hereinafter abbreviated as INTAI);
A signal (hereinafter referred to as INTAI) that informs the interrupt controller 103 that OB) 102 has accepted an interrupt.
Abbreviated as I. ) 109 is a signal that informs INTHWI 11 of the status of CPU (MAIN) 101 (hereinafter referred to as
It is abbreviated as STI. ) 110 is the CPU (SUB).
THWI l 1 (hereinafter abbreviated as ST■) 111 is an interrupt signal 114 from an external factor as an input.
・CPU (MAIIIF) 101 and CPU (SUB)
Signal 5T1109 indicating the status of 102 and STI
[110・C indicating that the CPU (SOB) 102 has accepted the interrupt processed by the CPU (MAIN) 101
A signal 116 from the P U (SUB) 102 and the CPU (SO
B) bus 117 from 102, as output a signal 115.C which causes an interrupt to be generated to the interrupt controller.
Hardware (hereinafter referred to as I
It is abbreviated as NTHW. ) 112 indicates that the CPU that executes interrupt processing is CPU (MA
IN) 101 or CPU (SUB) 102, as many flags as there are interrupt numbers.
A flag 113 in NTHWI 11 stores the interrupt number. A storage area inside INTHW (hereinafter abbreviated as INTNO). A signal 114 indicates that INTHWII accepts an interrupt from an external interrupt source. A signal 115 indicates an interrupt generated by INTHWI 11. The signal 116 conveyed to the interrupt controller is
B) 102 is the interrupt controller 103 to CP
U (MAIN) A signal that informs INTHWLII that 101 has accepted an interrupt to be processed (hereinafter referred to as R
It is abbreviated as INT. ) 117 is the CPU (SOB) CP accepted by 102
U (MAYN) 101 informs INTHWI 11 of the interrupt number of the interrupt to be processed. Bus 118 is connected from INTHWI 11 to CPU (MAIN)
This is a signal to wake up 101.
最初に、第1図を用いて本実施例におけるシステムの構
成を示す。本実施例ではメモリ・Iloおよび周辺コン
トローラを共有するデュアルCPU構成を採用しており
、CPU(MAIN) 101とCPU(SOB) 1
02は同時に動作することはない。また、CPU(MA
IN) 101とCP U (SOB)102の切り換
えは外部信号によりどちらのCPUからも可能である。First, the configuration of the system in this embodiment will be shown using FIG. This embodiment employs a dual CPU configuration that shares memory, Ilo, and peripheral controllers, with CPU (MAIN) 101 and CPU (SOB) 1.
02 never operate at the same time. In addition, CPU (MA
IN) 101 and CPU (SOB) 102 can be switched from either CPU using an external signal.
外部要因からの割り込み信号114により発生する割り
込みは、CPU(MAIN) 101が処理する割り込
みとCPU(SUB) 102が処理する割り込みに分
類することができる。したがって、割り込み形態として
は、次の4通りがある。Interrupts generated by the interrupt signal 114 from an external factor can be classified into interrupts processed by the CPU (MAIN) 101 and interrupts processed by the CPU (SUB) 102. Therefore, there are the following four types of interrupts.
■ CPU(MAIN) 101の動作中にCPU’(
MAIN) 101の処理する割り込み要求が発生■
CPU(SOB) 102ノ動作中E CP U (S
OB)102の処理する割り込み要求が発生
■ CPU(SUB) 102 ノ動作中にcPU(M
AIN) l O1の処理する割り込み要求が発生■
CP U(MAIN) 101の動作中にCPU(SO
B) 102の処理する割り込み要求が発生灰に第1図
を用いて、割り込み処理の過程を説明する。■ CPU (MAIN) During operation of 101, CPU' (
MAIN) An interrupt request to be processed by 101 occurs.■
CPU (SOB) 102 in operation E CPU (S
An interrupt request to be processed by the CPU (SUB) 102 occurs.
AIN) l An interrupt request is generated to be handled by O1■
While the CPU (MAIN) 101 is operating, the CPU (SO
B) When an interrupt request is processed by 102, the process of interrupt processing will be explained using FIG.
動作しているCPUが処理する割り込み要求が発生する
■や■の場合は、外部要因からの割り込み信号114が
INTHWI 11に入力されると、INTHWI 1
1はCPU(MAIN) 101とCPU(SOB)
102のステータスを信号109と信号110から得
、フラグ112を参照し、動作中のCPUと割り込みを
処理するCPUが同一であると判断する。その後、割り
込み信号114と同じ割り込与を示す信号を信号115
を通して、割り込みコントローラに入力する。その後は
、通常のバスで割り込み処理がおこなわれる。In the case of ■ or ■ where an interrupt request to be processed by the operating CPU occurs, when the interrupt signal 114 from an external factor is input to INTHWI 11, INTHWI 1
1 is CPU (MAIN) 101 and CPU (SOB)
It obtains the status of 102 from signals 109 and 110, refers to flag 112, and determines that the operating CPU and the CPU processing the interrupt are the same. After that, a signal indicating the same interrupt provision as the interrupt signal 114 is sent to the signal 115.
to the interrupt controller. After that, interrupt processing is performed using the normal bus.
■や■のように動作中のCPUと発生した割り込みを処
理するCPUが異なる場合、本実施例は従来例と異なる
。This embodiment differs from the conventional example when the operating CPU and the CPU that processes the generated interrupt are different, as in (1) and (2).
まず、■の場合の処理の過程を説明する。First, the processing process in case (2) will be explained.
CPU(SUB) 102の動作中に外部要因による
割り込みが発生したと仮定する。割り込み信号はINT
HWI 11に入力される。INTHWlllはCPU
(MAIN) 101とCP U (SOB)102の
ステータスを信号109と信号110から得、フラグ1
12を参照し、動作中のCPUはCPU(SOB)
102であり、割り込みを処理するCPUはCPU(M
AIN) 101であると判断する。Assume that an interrupt due to an external factor occurs while the CPU (SUB) 102 is operating. Interrupt signal is INT
It is input to HWI 11. INTHWllll is CPU
Obtain the status of (MAIN) 101 and CPU (SOB) 102 from signal 109 and signal 110, and set flag 1.
12, the operating CPU is CPU (SOB)
102, and the CPU that processes the interrupt is the CPU (M
AIN) is determined to be 101.
INTHWI 11は信号115を通して、割り込み信
号114と同じ割り込みを示し信号を割り込みコントロ
ーラに入力する。INTHWI 11 inputs a signal through signal 115 indicating the same interrupt as interrupt signal 114 to the interrupt controller.
割り込みコントローラ103はlNTR1105とIN
TRn 106を通して割り込みが発生したことをCP
U(MAIN) 101とCP U C3lJB)10
2に知らせる。Interrupt controller 103 connects lNTR1105 and IN
CP indicates that an interrupt has occurred through TRn106.
U (MAIN) 101 and CPU C3lJB) 10
Let 2 know.
CPU(SOB)102が動作中なのでCPU(SOB
) 102が割り込みを受け付ける。割り込み受け付け
たCPU(SUB) 102は割り込みを受け付けたこ
とを、確認信号INTAI[108を通して割り込みコ
ントローラ103に知らせる。Since the CPU (SOB) 102 is in operation, the CPU (SOB)
) 102 accepts the interrupt. The CPU (SUB) 102 that accepted the interrupt notifies the interrupt controller 103 of the acceptance of the interrupt through the confirmation signal INTAI[108.
INTA■108を受けた割り込みコントローラ103
は、アドレスバス・データバス・コントロールバスの総
称である5BUS 104を通して割り込み番号なCP
U(SOB) 102に伝える。Interrupt controller 103 receives INTA■108
is a generic name for address bus, data bus, and control bus.
Inform U (SOB) 102.
CPU(SOB) 102はその割り込み番号に対応
する割り込みハンドラに制御を移す。The CPU (SOB) 102 transfers control to the interrupt handler corresponding to the interrupt number.
割り込みハンドラはCPU(SOB) 102が割り込
みを受け付けたことをRINT116を通して、またそ
の割り込み番号をバス117を通してINTHWIII
に知らせ、割り込み処理を終える。The interrupt handler notifies CPU (SOB) 102 that it has accepted the interrupt through RINT 116, and also sends the interrupt number through bus 117 to INTHWIII.
and finishes interrupt processing.
INTHWI 11はCPU(SOB) 102からの
割り込みを受け付けたことを示す信号116およびバス
117からの割り込み番号を受け取り、割り込み番号を
INTNO113に格納する。その後、1付TNO11
3に格納された割り込み番号と同じ割り込みを示す信号
115を割り込みコントローラ103に送るとともに、
CPU(MAIN)101を起こす信号118をCPU
(MAIN)101に送る。INTHWI 11 receives a signal 116 indicating acceptance of an interrupt from CPU (SOB) 102 and an interrupt number from bus 117, and stores the interrupt number in INTNO 113. After that, TNO11 with 1
A signal 115 indicating the same interrupt as the interrupt number stored in 3 is sent to the interrupt controller 103, and
A signal 118 that causes CPU (MAIN) 101 is sent to the CPU.
Send to (MAIN) 101.
CPU(MAIN) 101に制御が移ると、INTH
Wが信号115を通して送った割り込みが発生し、CP
U(MAIN) 101はその割り込みを受け取り、割
り込みコントローラに確認信号INTHW107を送る
。コントローラ103は、その信号を受け、割り込み番
号を5BUS 104を通してCPU(MAIN) 1
01に伝える。CPU(MAIN)101は、その割り
込み番号に対応する割り込みハンドラに制御を移し、割
り込み処理をおこなう。When control is transferred to CPU (MAIN) 101, INTH
An interrupt sent by W through signal 115 occurs and CP
U(MAIN) 101 receives the interrupt and sends a confirmation signal INTHW 107 to the interrupt controller. The controller 103 receives the signal and transmits the interrupt number to the CPU (MAIN) 1 through the 5BUS 104.
Tell 01. The CPU (MAIN) 101 transfers control to the interrupt handler corresponding to the interrupt number and performs interrupt processing.
割り込み処理を終えたCPU(MAIN) 101は、
割り込みハンドラから戻り、必要ならば制御をCP U
(StlB) 102に移す。After completing the interrupt processing, the CPU (MAIN) 101
Return from the interrupt handler and transfer control to the CPU if necessary.
(StlB) Move to 102.
次に、■の場合の処理の過程を説明する。Next, the process for case (2) will be explained.
CPU(MAIN) 101の動作中に外部要因による
割り込みが発生した仮定する。割り込み信号はINTH
WI 11に入力される。INTHWlllはCPU(
MAIN) 101とCP U (SOB)102のス
テータスを信号109と信号110から得、フラグ11
2を参照し、動作中のCPUはCPU(MAIN) 1
01であり、割り込みを処理するCPUはCPU(SO
B) 102であると判断する。これらの割り込みは
、CPU(SOB) 102の制御にのみ必要なもので
あり、CPU(MAIN)101の制御には影響を与え
ないので、CPU(SUB) 102が動作するまで、
処理しない。It is assumed that an interrupt due to an external factor occurs during the operation of the CPU (MAIN) 101. Interrupt signal is INTH
Input to WI 11. INTHWllll is CPU (
The status of MAIN) 101 and CPU (SOB) 102 is obtained from signal 109 and signal 110, and flag 11 is
2, the operating CPU is CPU (MAIN) 1
01, and the CPU that handles the interrupt is the CPU (SO
B) It is determined that it is 102. These interrupts are necessary only for controlling the CPU (SOB) 102 and do not affect the control of the CPU (MAIN) 101, so until the CPU (SUB) 102 starts operating,
does not process.
INTHWI 11は信号114に対応する割り込み番
号を内部の記憶域INTNOI 13に待避する。そし
て、CPU(SOB) 102のステータスを示す信号
110がCPU(SUB) 102が動作中であること
を示したならば、内部の記憶域に待避させた割り込みを
示す信号115を割り込みコントローラに入力する。INTHWI 11 saves the interrupt number corresponding to signal 114 in internal storage area INTNOI 13. Then, if the signal 110 indicating the status of the CPU (SOB) 102 indicates that the CPU (SUB) 102 is in operation, a signal 115 indicating the interrupt saved in the internal storage area is input to the interrupt controller. .
割り込みコントローラ103はlNTR1105とlN
TR1105因して割り込みが発生したことをCPU(
MAIN) 101とCPU(SUB) 102に知ら
せる。The interrupt controller 103 has lNTR1105 and lN
TR1105 The CPU (
MAIN) 101 and CPU (SUB) 102 are notified.
CP U(SUB) 102が動作中なのでCPU(S
OB) l O2が割り込みを受け付ける。割り込みを
受け付けたCPU(SOB)102は割り込以を受け付
けたことをINTAII 108を通して割り込みコン
トルーラ103に知らせる。Since CPU (SUB) 102 is in operation, CPU (SUB)
OB) l O2 accepts the interrupt. The CPU (SOB) 102 that has accepted the interrupt notifies the interrupt controller 103 through the INTA II 108 that the interrupt has been accepted.
INTAI[108を受けた割り込みコントローラ10
3は、アドレスバス・データバス・コントロールバスQ
総称である5BUS 104を通して割り込み番号をC
PU(SOB) 102に伝える。Interrupt controller 10 receives INTAI[108
3 is address bus, data bus, control bus Q
The interrupt number is transmitted through the generic name 5BUS 104.
Inform PU (SOB) 102.
CPU(SUB) 102はその割り込み番号に対応す
る割り込みハンドラに制御を移し、割り込み処理をおこ
なう。The CPU (SUB) 102 transfers control to the interrupt handler corresponding to the interrupt number and performs interrupt processing.
割り込み処理を終えたCPU(SOB) 102は、割
り込みハンドラから戻る。After completing the interrupt processing, the CPU (SOB) 102 returns from the interrupt handler.
以上述べたような過程で、割り込み処理はおこなわれる
。このときのシステムの動作の様子を示したのが第2図
(、A)と第2(B)である。第2図(A)は、CP
U(StlB) 102の動作中にCPU(MAIN)
101の処理する割り込み要求が発生した■の場合、第
2図BはCPU(MAIN) 101の動作中にCPU
(SUB) 102の処理する割り込み要求が発生した
■の場合の動作の様子をそれぞれ示している。これらの
図からもわかるように、本実施例は、割り込み発生時の
動作CPUとその割り込み処理を実行するCPUが異な
る場合、
メインCPUが処理する割り込みのときは、動作中のサ
ブCPUが割り込みを受け付け、割り込みを制御するハ
ードウェアによってメインCPUを起こすとともに、再
度割り込み信号を発生させ、割り込みコントローラを介
して、割り込み処理を実行するメインCPUに再度割り
込みをがけ、サブCPUが処理する割り込みのときは、
割り込みを制御するハードウェアが、サブCPUが動作
するまで割り込み番号を内部の記憶域に待避させ、サブ
CPUが動作したなら、割り込み信号を発生させ、割り
込みコントローラを介して、割り込み処理を実行するサ
ブCPUに再度割り込みをかける
という方法を取ることによって、割り込み処理の実行に
かかる時間を短縮することができる。Interrupt processing is performed through the process described above. Figures 2 (A) and 2 (B) show how the system operates at this time. Figure 2 (A) shows the CP
CPU (MAIN) during operation of U (StlB) 102
In the case of ■ when an interrupt request to be processed by the CPU 101 occurs, FIG.
(SUB) The operation in the case (2) in which an interrupt request to be processed by 102 occurs is shown. As can be seen from these figures, in this embodiment, when the operating CPU when an interrupt occurs and the CPU that executes the interrupt processing are different, when the interrupt is handled by the main CPU, the sub CPU that is operating handles the interrupt. The hardware that accepts and controls interrupts wakes up the main CPU, generates an interrupt signal again, sends an interrupt to the main CPU that executes the interrupt processing again via the interrupt controller, and when the interrupt is handled by the sub CPU, ,
The hardware that controls the interrupt saves the interrupt number in an internal storage area until the sub CPU starts operating. Once the sub CPU starts operating, the hardware that controls the interrupt generates an interrupt signal and sends it to the sub CPU that executes the interrupt processing via the interrupt controller. By using a method of interrupting the CPU again, the time required to execute interrupt processing can be shortened.
〔実施例2〕 次に、本発明の第二の実施例について説明する。[Example 2] Next, a second embodiment of the present invention will be described.
前述の第一の実施例では、ふたつのCPUが同時に動作
することのないデュアル構成のシステムにおいて、割り
込み発生時に動作洛中のCPUと割り込みを処理するC
PUが異なる場合の割り込み制御の一方法について説明
した。In the first embodiment described above, in a dual-configuration system in which two CPUs do not operate at the same time, when an interrupt occurs, the CPU that is currently operating and the CPU that processes the interrupt are connected to each other.
One method of interrupt control when PUs are different has been described.
本発明はまた、ふたつのCPUが同時に動作することの
ないデュアルCPU構成のシステムにおいて、割り込み
発生時に動作中のCPUと割り込みを処理するCPUが
異なる場合の、割り込み制御の次のような方法について
も適用できる。The present invention also relates to the following method of interrupt control in a system with a dual CPU configuration in which two CPUs do not operate at the same time, when the CPU that is operating when an interrupt occurs and the CPU that processes the interrupt are different. Applicable.
第二の実施例について、図面を用いて説明する。A second embodiment will be described using the drawings.
第3図は、本発明の実施例におけるデュアルCPU構成
のシステムを示すブロック図である。FIG. 3 is a block diagram showing a system with a dual CPU configuration in an embodiment of the present invention.
第3図において、
301はメインCPU (以下、CPU(MAIN)と
略す。)
302はサブCPU (以下、CP U (SOB)と
略す。)
303は割り込みコントローラ
304はシステムバス(以下、5BUSと略す。)
305は割り込みが発生したことをCPU(MAjN)
301に知らせる信号(以下、lNTR1と略す。)
316は割り込みが発生したことをCPU(SOB)
302に知らせる信号(以下、INTRIIと略す。)
307はCPU(MAIN) 301が割り込みを受け
付けたことを割り込みコントローラ303に知らせる信
号(以下、INTAIと略す。)308はCP U(S
UB) 302が割り込みを受け付けとことを割り込み
コントローラ303に知らせる信号(以下、INTAI
Iと略す。)309はCPUQfAIN) 301のス
テータスをINTHW311に知らせる信号(以下、S
TIと略す。)
310はCPU(SUB) 302のステータスをIN
THW311に知らせる信号(以下、ST■と略す。)
311は入力として外部要因からの割り込ゐ信号314
・CPU(MAIN) 301とCPU(SOB) 3
02のステータスを示す信号5TI309とSTI[3
10・CPU(MAIN)301が処理する割り込みを
CPU(SOB)302が受け付けとことを示すCP
U (SOB)302からの信号316およびその割り
込みの割り込み番号を知らせるためのCPU(SOB)
302からのバス317、出力として割り込みコント
ローラに対して割り込みを発生させる信号315・CP
U(MAIN) 301を起こすための信号318・C
PU(SOB)302を起こすための信号309をもつ
割り込みを制御するためのハードウェア(以下、INT
HWと略す。)
312は割り込み処理を実行するC P U !J’−
CPU(MAIN) 301であるかCP U (SO
B)302であるかを示すフラグを割り込み番号を数だ
けまとめたINTHW311内のフラグ
313は割り込みの番号を格納しておくINTHW31
1内部の記憶域(以下、INTNOと略す。)
314はINTHW311が外部割り込み要因から割り
込みを受け付ける信号
315はINT、HW311が発生させた割り込みを割
り込みコントローラに伝える信号316)tcPU(S
UB)302が割り込みコントロー5303からCP
U(MAIN) 301が処理すべ゛き割り込みを受け
付けたことおよびCPU(SOB) 302がCPU(
MAIN) 301 (7)動作中に発生した割り込み
の割り込み処理を終えたことをINTHW311に知ら
せる信号(以下、RINTと略す。)
317はCPU(SOB) 302が受け付けたCPU
(MAIN) 301が処理すべき割り込みの割り込み
番号をINTHW311に知らせるバス
318はINTHW311から、CPU(MAIN)3
01を起こすための信号
319はINTHW311から、CP U (SOB)
302を起こすための信号である。In Fig. 3, 301 is the main CPU (hereinafter abbreviated as CPU (MAIN)), 302 is a sub CPU (hereinafter abbreviated as CPU (SOB)), 303 is an interrupt controller 304 is a system bus (hereinafter abbreviated as 5BUS). ) 305 indicates that an interrupt has occurred to the CPU (MAjN).
316 is a signal that informs the CPU (SOB) that an interrupt has occurred.
302 is a signal to inform the interrupt controller 303 (hereinafter abbreviated as INTRII) 307 is a CPU (MAIN) signal that informs the interrupt controller 303 that 301 has accepted an interrupt (hereinafter abbreviated as INTAI) 308 is a CPU (S
A signal (hereinafter referred to as INTAI) that informs the interrupt controller 303 that the interrupt controller 302 has accepted the interrupt.
Abbreviated as I. )309 is a signal that informs INTHW311 of the status of CPUQfAIN)301 (hereinafter referred to as S
It is abbreviated as TI. ) 310 is the CPU (SUB) 302 status is IN
A signal that informs the THW 311 (hereinafter abbreviated as ST■) 311 receives an interrupt signal 314 from an external factor as an input.
・CPU (MAIN) 301 and CPU (SOB) 3
Signal 5TI309 indicating the status of 02 and STI[3
10・CP indicating that the CPU (SOB) 302 accepts the interrupt processed by the CPU (MAIN) 301
CPU (SOB) for notifying the signal 316 from U (SOB) 302 and the interrupt number of the interrupt.
Bus 317 from 302, as output a signal 315.CP which generates an interrupt to the interrupt controller.
U (MAIN) Signal 318・C to wake up 301
Hardware (hereinafter referred to as INT
It is abbreviated as HW. ) 312 is a CPU that executes interrupt processing. J'-
CPU (MAIN) Is it 301?
B) The flag 313 in INTHW311, which is a flag indicating whether the interrupt number is 302, is the flag 313 in INTHW311 that stores the interrupt number.
1 internal storage area (hereinafter abbreviated as INTNO) 314 is a signal in which INTHW 311 accepts an interrupt from an external interrupt source 315 is INT, signal 316) which transmits an interrupt generated by HW 311 to the interrupt controller
UB) 302 from interrupt controller 5303 to CP
U (MAIN) 301 has accepted an interrupt that should be handled and CPU (SOB) 302 has received an interrupt that should be handled by CPU (SOB).
MAIN) 301 (7) A signal that informs the INTHW 311 that the interrupt processing for an interrupt that occurred during operation has been completed (hereinafter abbreviated as RINT) 317 is the CPU (SOB) 302 receives the signal
A bus 318 that informs the INTHW 311 of the interrupt number of the interrupt to be processed by the (MAIN) 301 is connected to the CPU (MAIN) 3 from the INTHW 311.
The signal 319 to wake up 01 is sent from the INTHW 311 to the CPU (SOB)
This is a signal to wake up 302.
最初に、第3図を用いて本実施例におけるシステムの構
成を示す。本実施例ではメモリ・I10および周辺コン
トローラを共有するデュアルCPU構成を採用しており
、CPU(MAIN)とCPU(SUB) 302は
同時に動作することはない。また、CPU(MAIN)
301とCPU(SOB) 302の切り換えは外部
信号によりどちらのCPUからも可能である。First, the configuration of the system in this embodiment will be shown using FIG. This embodiment employs a dual CPU configuration that shares the memory I10 and peripheral controller, and the CPU (MAIN) and CPU (SUB) 302 do not operate at the same time. Also, CPU (MAIN)
301 and CPU (SOB) 302 can be switched from either CPU using an external signal.
外部要因からの割り込み信号314により発生する割り
込みは、CPU(MAIN) 301が処理する割り込
みとCPU(SOB) 302が処理する割り込みに分
類することができる。したがって、割り込み形態として
は、次の4通りがある。Interrupts generated by interrupt signals 314 from external factors can be classified into interrupts processed by the CPU (MAIN) 301 and interrupts processed by the CPU (SOB) 302. Therefore, there are the following four types of interrupts.
■ CPU(MAIN) 301の動作中にCPU(M
AIN) 301の処理する割り込み要求が発生■ C
PU(SOB) 302の動作中にCP U (SOB
)302の処理する割り込み要求が発生
■ CPU(SOB) 302の動作中にCPU(MA
IN) 301の処理する割り込み要求が発生■ CP
U(MAIN) 301の動作中にCPU(SOB)
302の処理する割り込み要求が発生法に第3図を用い
て、割り込み処理の過程を説明する。■ CPU (MAIN) While the 301 is operating, the CPU (MAIN)
AIN) An interrupt request to be processed by 301 occurs ■ C
While the CPU (SOB) 302 is operating, the CPU (SOB)
) 302 occurs. ■ CPU (SOB) While the CPU (SOB) 302 is operating, the CPU (MA
IN) An interrupt request to be processed by 301 occurs ■ CP
CPU (SOB) while U (MAIN) 301 is operating
The process of interrupt processing will be explained using FIG. 3 for how the interrupt request processed by 302 is generated.
動作しているCPUが処理する割り込み要求が発生する
■や■の場合は、外部要因からの割り込み信号314が
INTHW311に入力されると、INTHW311は
CPU(MAIN) 301とCPU(SOB) 30
2のステータスを信号309と信号310から得、フラ
グ312を参照し、動作中のCPUと割り込みを処理す
るCPUが同一であると判断する。その後、割り込み信
号314と同じ割り込みを示す信号を信号315を通し
て、割り込みコントローラに入力する。その後は、通常
のバスで割り込み処理がおこなわれる。In the case of ■ or ■ where an interrupt request to be processed by the operating CPU occurs, when an interrupt signal 314 from an external factor is input to the INTHW 311, the INTHW 311 interrupts the CPU (MAIN) 301 and the CPU (SOB) 30.
It obtains the status of 2 from the signals 309 and 310, refers to the flag 312, and determines that the operating CPU and the CPU processing the interrupt are the same. Thereafter, a signal indicating the same interrupt as the interrupt signal 314 is input to the interrupt controller through a signal 315. After that, interrupt processing is performed using the normal bus.
■や■のように動作中のCPUと発生した割り込みを処
理するCPUが異なる場合、本実施例は従来例と異なる
。This embodiment differs from the conventional example when the operating CPU and the CPU that processes the generated interrupt are different, as in (1) and (2).
まず、■の場合の処理の過程を説明する。First, the processing process in case (2) will be explained.
CPU(SUB) 302の動作中に外部要因による割
り込みが発生したと仮定する。割り込み信号はINTH
W311に入力される。INTHW311はCPU(M
AIN) 301とCP’U (SUB)302のステ
ータスを信号309と信号310から得、フラグ312
を参照し、動作中のCPUはCPU(SOB) 302
であり、割り込みを処理するCP’UはCPU(MAI
N) 301であると判断する。Assume that an interrupt due to an external factor occurs while the CPU (SUB) 302 is operating. Interrupt signal is INTH
It is input to W311. INTHW311 is CPU (M
The status of AIN) 301 and CP'U (SUB) 302 is obtained from the signal 309 and signal 310, and the flag 312 is
Refer to , the operating CPU is CPU (SOB) 302
, and the CPU that handles the interrupt is the CPU (MAI
N) It is determined that it is 301.
INTHW311は信号315を通して、割り込み信号
314と同じ割り込みを示す信号を割り込みコントロー
ラに入力する。INTHW 311 inputs a signal indicating the same interrupt as interrupt signal 314 to the interrupt controller through signal 315.
割り込みコントローラ303はI NTRl305とI
NTRII 306を通して割り込みが発生したことを
CPU(MAIN) 301とCPU(SOB) 30
2に知らせる。Interrupt controller 303 is connected to I NTRl 305 and I
The CPU (MAIN) 301 and CPU (SOB) 30 indicate that an interrupt has occurred through the NTRII 306.
Let 2 know.
CPU(SOB) 302が動作中なのでCPU(SO
B) 302が割り込みを受け付ける。割り込みを受け
付けたCPU(SOB) 302は割り込みを受け付け
たことを、確認信号INTAII 308を通して割り
込みコントローラ303に知らせる。Since CPU (SOB) 302 is in operation, CPU (SOB)
B) 302 accepts the interrupt. The CPU (SOB) 302 that has accepted the interrupt notifies the interrupt controller 303 through a confirmation signal INTA II 308 that it has accepted the interrupt.
INTΔ■308を受け付けた割り込みコントローラ3
03は、アドレスバス・データバス・コントロールバス
の総称である5BUS304を通して割り込み番号をC
PU(SOB) 302に伝える。Interrupt controller 3 that accepted INTΔ■308
03 transmits interrupt numbers to C through 5BUS304, which is a generic name for address bus, data bus, and control bus.
Inform PU (SOB) 302.
CPU(SOB) 302はその割り込み番号に対応す
る割り込みハンドラに制御を移す。The CPU (SOB) 302 transfers control to the interrupt handler corresponding to that interrupt number.
割り込みハンドラはCPU(SOB) 302が割り込
みを受け付けたことをRINT316を通して、またそ
の割り込み番号をバス317を通してINTHW311
に知らせ、割り込み処理を終える。The interrupt handler notifies the CPU (SOB) 302 that the interrupt has been accepted through the RINT 316, and also sends the interrupt number to the INTHW 311 through the bus 317.
and finishes interrupt processing.
INTHW311はCPU(SOB) 302からの割
り込みを受け付けたことを示す信号316およびバス3
17からの割り込み番号を受け取り、割り込み番号をI
NTNO313に格納する。その後、INTN○313
に格納された割り込み番号と同じ割り込みを示す信号3
15を割り込みコントローラ303に送るとともに、C
PU(MAIN)301を起こす信号318をCPU(
MAIN)301に送る。INTHW 311 receives a signal 316 indicating that it has accepted an interrupt from CPU (SOB) 302 and bus 3.
Receive the interrupt number from 17 and enter the interrupt number as I.
Store in NTNO313. After that, INTN○313
Signal 3 indicating the same interrupt as the interrupt number stored in
15 to the interrupt controller 303, and also sends C
The signal 318 that wakes up the PU (MAIN) 301 is sent to the CPU (
MAIN) 301.
CPU(MAIN) 301に制御が移ると、INTH
W311が信号315を通して送った割り込みが発生し
、CPU(MAIN) 301はその割り込みを受け取
り、割り込みコントローラに確認信号工NTAI 30
7を送る。割り込みコントローラ303は、その信号を
受け、割り込み番号を5BUS304を通してCPU(
MAIN) 301に伝える。CPU(MAIN) 3
01は、その割り込み番号に対応する割り込みハンドラ
に制御を移し、割り込み処理をおこなう。When control is transferred to CPU (MAIN) 301, INTH
An interrupt sent by W311 through signal 315 occurs, CPU (MAIN) 301 receives the interrupt, and sends a confirmation signal to the interrupt controller.
Send 7. The interrupt controller 303 receives the signal and sends the interrupt number to the CPU (
MAIN) Tell 301. CPU (MAIN) 3
01 transfers control to the interrupt handler corresponding to that interrupt number and performs interrupt processing.
割り込み処理を終えたCPU(MAIN) 301は、
割り込みハンドラから戻り、必要ならば制御をCPU(
SUB) 302に移す。After completing the interrupt processing, the CPU (MAIN) 301
Return from the interrupt handler and transfer control to the CPU (
SUB) Move to 302.
次に、■の場合の処理の過程を説明する。Next, the process for case (2) will be explained.
CPU(MAIN) 301の動作中に外部要因による
割り込みが発生したと仮定する。割り込み信号はINT
HW311に入力される。INTHW311はCPU(
MAIN) 301とCP U (SUB)302のス
テータスを信号309と信号310から得、フラグ31
2を参照し、動作中のCPUはCPU(MAIN) 3
01であり、割り込みを処理するCPUはCPU(SU
B) 302であると判断する。これらの割り込みは、
CPU(SOB) 302の制御にのみ必要なものであ
り、CPU(MAIN)301の制御には影響を与えな
い。Assume that an interrupt due to an external factor occurs while the CPU (MAIN) 301 is operating. Interrupt signal is INT
It is input to HW311. INTHW311 is CPU (
The status of MAIN) 301 and CPU (SUB) 302 is obtained from the signal 309 and signal 310, and the flag 31 is
2, the operating CPU is CPU (MAIN) 3
01, and the CPU that handles the interrupt is CPU (SU
B) It is determined that it is 302. These interrupts are
It is necessary only for controlling the CPU (SOB) 302 and does not affect the control of the CPU (MAIN) 301.
INTHW311は信号314に対応する割り込み番号
を内部の記憶域工NTNO313に待避する。その後、
INTNO313に格納された割り込み番号と同じ割り
込みを示す信号315を割り込みコントローラ303に
送るとともに、CPU(SOB) 302を起こす信号
319をCPU(SOB) 302に送る。CPU(S
UB) 302が動作すると、CPU(MAIN) 3
01は実行中の処理を中断する。INTHW 311 saves the interrupt number corresponding to signal 314 in internal storage area NTNO 313. after that,
A signal 315 indicating the same interrupt as the interrupt number stored in the INTNO 313 is sent to the interrupt controller 303, and a signal 319 to wake up the CPU (SOB) 302 is sent to the CPU (SOB) 302. CPU (S
When UB) 302 operates, CPU (MAIN) 3
01 interrupts the process being executed.
CPU(SOB) 302に制御が移ると、I NTE
IW311が信号315を通して送った割り込みが発生
し、CPU(StlB) 302はその割り込みを受け
取り、割り込みコントローラに確認信号INTA113
08を送る。割り込みコントローラ303は、その信号
を受け、割り込み番号を5BUS304を通してCPU
(SUB) 302に伝える。CPU(SOB) 30
2は、その割り込み番号に対応する割り込みハンドラに
制御を移し、割り込み処理をおこなう。When control is transferred to the CPU (SOB) 302, I NTE
An interrupt sent by IW311 through signal 315 occurs, CPU (StlB) 302 receives the interrupt, and sends a confirmation signal INTA113 to the interrupt controller.
Send 08. The interrupt controller 303 receives the signal and sends the interrupt number to the CPU through the 5BUS 304.
(SUB) Tell 302. CPU (SOB) 30
2 transfers control to the interrupt handler corresponding to the interrupt number and performs interrupt processing.
割り込み処理を終えたCPU(StlB) 302は、
割り込みハンドラから戻るとともに、信号316により
CPU(MAIN) 301の動作中に発生したCPU
(SOB) 302が処理する割り込みの割り込み処
理を終えたことをINTHW311に知らせる。After completing the interrupt processing, the CPU (StlB) 302
Upon returning from the interrupt handler, a signal 316 indicates that the CPU (MAIN) that occurred during the operation of the CPU (MAIN) 301
(SOB) Notifies the INTHW 311 that the interrupt processing for the interrupt handled by the 302 has finished.
信号316を受け取ったINTHW311は、CPU(
MAIN) 3 o 1を起こす信号318をCPU(
MAIN) 301に送る。CPU(MAIN) 30
1は信号301を受け、中断していた処理を再開する。Upon receiving the signal 316, the INTHW 311 executes the CPU (
The signal 318 that causes MAIN) 3 o 1 is sent to the CPU (
MAIN) Send to 301. CPU (MAIN) 30
1 receives the signal 301 and resumes the interrupted process.
以上述べたような過程で、割り込み処理はおこなわれる
。本実施例は、割り込み発生時の動作CPUとそ割り込
み処理を実行するCPUが異なる場合、
メインCPUが処理する割り込みのときは、動作中のサ
ブCPUが割り込みを受け付け、割り込みを制御するハ
ードウェアによってメインCPUを起こすとともに、再
度割り込み信号を発生させ、割り込みコントローラを介
して、割り込み処理を実行するメインCPUに再度割り
込みをかけ、サブCPUが処理する割り込みのときは、
割り込みを制御するハードウェアによって、サブCPU
を立ち上げるとともに(メインCPUの動作は中断)、
割り込み信号を発生させ、割り込みコントローラを介し
て、割り込み処理を実行するサブCPUに再度割り込み
をかける
という方法を取ることによって、割り込み処理の実行に
かかる時間を短縮することができる。Interrupt processing is performed through the process described above. In this embodiment, if the operating CPU when an interrupt occurs and the CPU that executes the interrupt processing are different, when the interrupt is handled by the main CPU, the sub CPU in operation accepts the interrupt, and the interrupt is processed by the hardware that controls the interrupt. Wake up the main CPU, generate an interrupt signal again, and issue another interrupt to the main CPU that executes the interrupt processing via the interrupt controller.If the interrupt is handled by the sub CPU,
Depending on the hardware that controls interrupts, the sub-CPU
At the same time as starting up (main CPU operation is suspended),
By generating an interrupt signal and re-interrupting the sub-CPU that executes the interrupt process via the interrupt controller, the time required to execute the interrupt process can be reduced.
以上説明したように、本発明は、ふたつのCPUが同時
に動作することのないデュアルCP U 構成のシステ
ムにおいて、割り込み発生時に動作しているCPUと割
り込み処理を実行するCPUが異なるとき、第2図(A
)、第2図(B)のシステムの動作を示す図からもわか
らように、割り込みの受け渡しをソフトウェアによって
、割り込み発生直後におこなうのではなく、メインCP
Uが処理すべき割り込みの場合は、割り込み制御回路に
よって再度割り込みを発生することによっておこない、
サブCPUに対する割り込みの場合は、割り込み制御回
路によってサブCPUが動作するまで割り込みを待避さ
せた後や、割り込み制御回路によってサブCPUを立ち
上げた後に、割り込みを発生することによって割り込み
処理にかかる時間を短縮することができる。As explained above, in a system with a dual CPU configuration in which two CPUs do not operate at the same time, when the CPU operating at the time of an interrupt and the CPU executing interrupt processing are different, (A
), as can be seen from the system operation diagram shown in Figure 2(B), interrupts are not passed by software immediately after the interrupt occurs, but are transferred to the main CPU.
If U is an interrupt that should be handled, the interrupt control circuit will generate an interrupt again,
In the case of an interrupt to the sub CPU, the time required for interrupt processing can be reduced by generating an interrupt after the interrupt control circuit has evacuated the interrupt until the sub CPU is activated, or after the interrupt control circuit has started up the sub CPU. Can be shortened.
第1図は、本発明の実施例におけるデュアルCPU構成
のシステムを示すブロック図である。
第2図は、本発明の実施例におけるシステムの動作の様
子を示した図である。第2図(A)は、サブCPUの動
作中にメインCPUの処理する割り込み要求が発生した
場合、第2図(B)はCPU(MAIN) l O1の
動作中にCPU(SUB) 102の処理する割り込み
要求が発生した場合の動作の様子をそれぞれ示している
。
第3図は、本発明の第二の実施例におけるデュアルCP
U構成のシステムを示すブロック図である。
第4図は、従来例におけるデュアルCPU構成のシステ
ムを示すブロック図である。
第5図は、従来例の実施例におけるシステムの動作の様
子を示した図である。
代理人 弁理士 内 原 晋
$ 3 図
茅 41!IFIG. 1 is a block diagram showing a system with a dual CPU configuration in an embodiment of the present invention. FIG. 2 is a diagram showing the operation of the system in the embodiment of the present invention. Figure 2 (A) shows that when an interrupt request to be processed by the main CPU occurs while the sub CPU is operating, Figure 2 (B) shows that the interrupt request to be processed by the main CPU occurs while the sub CPU is operating. The diagram shows the operation when an interrupt request occurs. FIG. 3 shows a dual CP in a second embodiment of the present invention.
FIG. 1 is a block diagram showing a system with a U configuration. FIG. 4 is a block diagram showing a conventional system with a dual CPU configuration. FIG. 5 is a diagram showing the operation of the system in the conventional example. Agent Patent Attorney Susumu Uchihara $3 41! I
Claims (1)
可能で同時には動作しない第一のプロセッサおよび第二
のプロセッサのふたつのプロセッサと、外部からの割り
込みを制御する割り込みコントローラと、外部から発生
した割り込みが前記第一のプロセッサおよび前記第二の
プロセッサのどちらのプロセッサで処理される割り込み
かを示すフラグと割り込み番号を記憶する記憶域を内部
に持つ割り込み制御回路を備え、前記第二のプロセッサ
の動作中に前記第一のプロセッサの処理する割り込みが
発生した場合は、前記割り込み制御回路は前記内部のフ
ラグを参照し、割り込みコントローラに対して割り込み
信号を送り、割り込みコントローラからの割り込み信号
を受け取った前記第二のプロセッサは、前記割り込み制
御回路に割り込みを受け付けたことを示す信号と割り込
み番号を伝え、前記割り込み制御回路はそれらを受け取
ると前記第二のプロセッサが外部から受け付けた割り込
みと同じ割り込みを示す割り込み信号を前記割り込みコ
ントローラに送るとともに前記第一のプロセッサに制御
を移し、前記割り込みコントローラは前記割り込みをお
こなう第一のプロセッサに対して前記第二のプロセッサ
が受け付けた割り込みと同じ割り込みを発生させ、前記
割り込みをおこなう第一のプロセッサに割り込み処理を
処理をおこなわせ、前記第一のプロセッサの動作中に前
記第二のプロセッサの処理する割り込みが発生した場合
は、前記割り込み制御回路は前記内部のフラグを参照し
、前記サブCPUが動作さするまで割り込みを待避させ
た後や、前記サブCPUを立ち上げた後に、割り込み信
号を前記割り込みコントローラに対して送り、前記割り
込みコントローラからの割り込み信号を受け取った前記
第二のプロセッサに割り込み処理をおこなわせることを
特徴とする割り込み制御方式。In an information processing device with a dual CPU configuration, there are two processors, a first processor and a second processor, which are switchable and do not operate simultaneously, an interrupt controller that controls interrupts from the outside, and an interrupt controller that controls interrupts generated from the outside. an interrupt control circuit having an internal storage area for storing a flag and an interrupt number indicating which of the first processor and the second processor handles the interrupt; When an interrupt handled by the first processor occurs, the interrupt control circuit refers to the internal flag and sends an interrupt signal to the interrupt controller, and the second processor receives the interrupt signal from the interrupt controller. The processor transmits a signal indicating that the interrupt has been accepted and an interrupt number to the interrupt control circuit, and upon receiving them, the interrupt control circuit transmits an interrupt signal indicating the same interrupt as the interrupt accepted from the outside by the second processor. The interrupt controller sends the interrupt to the interrupt controller and transfers control to the first processor, and the interrupt controller generates the same interrupt as the interrupt accepted by the second processor to the first processor that issues the interrupt, and If an interrupt to be processed by the second processor occurs while the first processor is operating, the interrupt control circuit refers to the internal flag. , after the interrupt is evacuated until the sub-CPU is activated or after the sub-CPU is started up, the second CPU sends an interrupt signal to the interrupt controller, and receives the interrupt signal from the interrupt controller. An interrupt control method characterized by having a processor handle interrupt processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62281303A JPH01123357A (en) | 1987-11-06 | 1987-11-06 | Interruption control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62281303A JPH01123357A (en) | 1987-11-06 | 1987-11-06 | Interruption control system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH01123357A true JPH01123357A (en) | 1989-05-16 |
Family
ID=17637195
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP62281303A Pending JPH01123357A (en) | 1987-11-06 | 1987-11-06 | Interruption control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH01123357A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5264686A (en) * | 1990-11-30 | 1993-11-23 | Olympus Optical Co., Ltd. | Information recording/reproducing apparatus for an information recording card |
-
1987
- 1987-11-06 JP JP62281303A patent/JPH01123357A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5264686A (en) * | 1990-11-30 | 1993-11-23 | Olympus Optical Co., Ltd. | Information recording/reproducing apparatus for an information recording card |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5659759A (en) | Data processing device having improved interrupt controller to process interrupts of different priority levels | |
US7293119B2 (en) | DMA data transfer between low-overhead processor and connected external circuitry using transactions log | |
JPH01123357A (en) | Interruption control system | |
JPS6115260A (en) | Data processor | |
EP0614148B1 (en) | Data processing apparatus | |
JP3348177B2 (en) | Programmable controller | |
JP2961542B2 (en) | Data processing system | |
KR910005757Y1 (en) | Handshaking Circuits in Multiprocessors | |
JPH05241986A (en) | Input/output instruction retrying system | |
JPS6252900B2 (en) | ||
JPH04280345A (en) | Data transfer controller | |
JPH05233525A (en) | Input/otuput processor | |
JPS62204354A (en) | I/O command control method | |
JPH01217534A (en) | Multi-processor system | |
JP2000067008A (en) | Multiprocessor system | |
JPH05342021A (en) | Multitask computer | |
JPH0973399A (en) | Semiconductor device | |
JPS62296236A (en) | Interruption processor for microprocessor | |
JPH01184569A (en) | Data transmission equipment | |
JPH02282855A (en) | DMA transfer control method | |
JPS6361357A (en) | Data processor | |
JPH0468458A (en) | Data communication processing unit | |
JPH0962611A (en) | Data transfer controller | |
KR20010058316A (en) | Multi-tasking method of semiconductor apparatus with semaphore | |
JPH02299048A (en) | Transfer control system |