JPH05233576A - Duplex system - Google Patents

Duplex system

Info

Publication number
JPH05233576A
JPH05233576A JP4038176A JP3817692A JPH05233576A JP H05233576 A JPH05233576 A JP H05233576A JP 4038176 A JP4038176 A JP 4038176A JP 3817692 A JP3817692 A JP 3817692A JP H05233576 A JPH05233576 A JP H05233576A
Authority
JP
Japan
Prior art keywords
processor
cpu
output
units
level
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.)
Withdrawn
Application number
JP4038176A
Other languages
Japanese (ja)
Inventor
Hiroshi Sakai
宏史 坂井
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP4038176A priority Critical patent/JPH05233576A/en
Publication of JPH05233576A publication Critical patent/JPH05233576A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Hardware Redundancy (AREA)
  • Safety Devices In Control Systems (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To provide a duplex system of a simple constitution that requires separately no device to monitor the processing progress state of programs. CONSTITUTION:The CPU units 1a and 1b carry out the programs of the same contents independently of each other. The bus arbiters 13a and 13b sets the using right of an input/output bus IOB to one of both units 1a and 1b based on the combination state of trouble signals err1 and err2. Then the synchronizing instructions are described to the programs as necessary. The wait condition generating parts 128 and 12b interrupt the processings of the processors 10a and 10b until one of both units 1a and 1b executes the synchronizing instruction when one of both units 1a and 1b executes the instruction eariler then the other unit.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、同一内容のプログラム
を独立して実行するプロセッサをそれぞれ備えた2台の
CPUユニットにより資源を共有し、第1のプロセッサ
により処理を行うとともに第2のプロセッサを待機させ
ておき、各プロセッサにそれぞれ設けた故障検出部によ
り第1のプロセッサの故障が検出されると第2のプロセ
ッサが処理を引き継ぐようにした二重システムに関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention shares resources by two CPU units each having a processor that independently executes programs of the same content, and the first processor performs processing and the second processor performs processing. In a dual system in which the second processor takes over the processing when a failure of the first processor is detected by the failure detection unit provided in each processor.

【0002】[0002]

【従来の技術】従来より、プラント制御等に用いられる
プログラマブルコントローラでは、システムの信頼性を
向上させるために、同一内容のプログラムを独立して実
行する2台のCPUユニットを備えた二重システムが用
いられている。この二重システムでは、図5に示すよう
に、両CPUユニット1a,1bが調停ユニット(バス
アービタ)2を介してプロセッサバスPB(システムバ
スおよび入出力バスを含む)に接続される。プロセッサ
バスPBには外部機器を接続するための入出力ユニット
3が接続される。ところで、調停ユニット2は、各CP
Uユニット1a,1bで故障が生じたときに出力される
故障信号err1,err2 を監視しており、故障信号err1,err
2 が発生していないときには、デフォルトとして設定さ
れているCPUユニット1aに対してプロセッサバスP
Bの使用権を与える。すなわち、CPUユニット1aで
の演算結果により入出力ユニット3に対する出力を決定
するのである。また、入出力ユニット3からの入力デー
タは調停ユニット2を介して両CPUユニット1a,1
bに入力され、各CPUユニット1a,1bでそれぞれ
演算される。ここにおいて、CPUユニット1bは、入
力データに対する演算を行うがプロセッサバスPBの使
用権がないから、入出力ユニット3に対する実際の処理
は行わないのであって、その意味において待機状態にな
っている。
2. Description of the Related Art Conventionally, in a programmable controller used for plant control or the like, in order to improve system reliability, a dual system having two CPU units that independently execute programs of the same content has been proposed. It is used. In this dual system, as shown in FIG. 5, both CPU units 1a and 1b are connected to a processor bus PB (including a system bus and an input / output bus) via an arbitration unit (bus arbiter) 2. An input / output unit 3 for connecting an external device is connected to the processor bus PB. By the way, the arbitration unit 2 is
The failure signals err1 and err2 output when a failure occurs in the U units 1a and 1b are monitored.
When 2 does not occur, the processor bus P is sent to the CPU unit 1a set as the default.
Grant the right to use B. That is, the output to the input / output unit 3 is determined by the calculation result in the CPU unit 1a. Further, the input data from the input / output unit 3 is transmitted via the arbitration unit 2 to both CPU units 1a, 1
It is input to b and is calculated by each CPU unit 1a, 1b. Here, the CPU unit 1b performs an operation on the input data but does not have the right to use the processor bus PB, and therefore does not actually perform the processing on the input / output unit 3, and is in a standby state in that sense.

【0003】このように、故障信号err1,err2 が発生し
ていないときには、CPUユニット1aが優先的に使用
されてCPUユニット1bは待機状態になるのである
が、CPUユニット1aから故障信号err1が発生する
と、調停ユニット2ではプロセッサバスPBの使用権を
CPUユニット1bに引き渡す。すなわち、CPUユニ
ット1bはCPUユニット1aの故障に備えて待機して
おり、CPUユニット1aに故障が発生するとCPUユ
ニット1bを用いるのである。要するにCPUユニット
1bを予備として待機させておき、CPUユニット1a
に故障が発生すると切り換えて使用することにより、動
作の信頼性を高めているのである。
As described above, when the failure signals err1 and err2 are not generated, the CPU unit 1a is preferentially used and the CPU unit 1b is in the standby state. However, the failure signal err1 is generated from the CPU unit 1a. Then, the arbitration unit 2 transfers the right to use the processor bus PB to the CPU unit 1b. That is, the CPU unit 1b stands by in preparation for a failure of the CPU unit 1a, and when a failure occurs in the CPU unit 1a, the CPU unit 1b is used. In short, the CPU unit 1b is made to stand by as a spare, and the CPU unit 1a
When a failure occurs in the device, the reliability of the operation is improved by switching and using it.

【0004】[0004]

【発明が解決しようとする課題】ところで、上述した構
成では、両CPUユニット1a,1bが非同期的に独立
して動作しているものであるから、故障の発生によって
プロセッサバスPBの使用権がCPUユニット1aから
CPUユニット1bに引き渡されたときに、処理をプロ
グラムのどの位置から引き継げばよいのかを明確にする
ことが必要である。すなわち、調停ユニット2には、各
CPUユニット1a,1bによるプログラムの処理がど
こまで進行したかを監視するための構成が必要であっ
て、構成が複雑になるという問題がある。
By the way, in the above-mentioned configuration, since both CPU units 1a and 1b are operated asynchronously and independently, the right to use the processor bus PB is granted to the CPU when the failure occurs. When handed over from the unit 1a to the CPU unit 1b, it is necessary to clarify from which position of the program the processing should be taken over. That is, the arbitration unit 2 needs a configuration for monitoring the progress of the processing of the program by the CPU units 1a and 1b, which causes a problem that the configuration becomes complicated.

【0005】本発明は上記問題点の解決を目的とするも
のであり、プログラムの処理を同期的に進行させること
によって、プログラムの処理の進行状態を監視すること
なく演算を引き継がせることができるようにした比較的
簡単な構成の二重システムを提供しようとするものであ
る。
An object of the present invention is to solve the above-mentioned problems, and by advancing the processing of the program synchronously, it is possible to take over the operation without monitoring the progress of the processing of the program. It is intended to provide a dual system having a relatively simple structure as described above.

【0006】[0006]

【課題を解決するための手段】本発明では、上記目的を
達成するために、同一内容のプログラムを独立して実行
するプロセッサをそれぞれ備えた2台のCPUユニット
により資源を共有し、第1のプロセッサにより処理を行
うとともに第2のプロセッサを待機させておき、各プロ
セッサにそれぞれ設けた故障検出部により第1のプロセ
ッサの故障が検出されると第2のプロセッサが処理を引
き継ぐようにした二重システムにおいて、各CPUユニ
ットは、互いの故障検出部より出力される故障信号の組
み合わせ状態に基づいて自他のCPUユニットの一方に
のみ資源を利用させるように切り換えるバスアービタ
と、各CPUユニットのプロセッサがそれぞれ実行する
プログラムの要所に記述した同期命令をいずれか一方の
プロセッサが他方に先行して実行すると他方のプロセッ
サが同期命令を実行するまで上記一方のプロセッサを待
ち状態とする待ち状態発生部とを具備するのである。
According to the present invention, in order to achieve the above object, resources are shared by two CPU units each provided with a processor for independently executing a program having the same content, and a first resource is provided. A dual process in which the processor performs processing and causes the second processor to wait, and when a failure detection unit provided in each processor detects a failure in the first processor, the second processor takes over the processing. In the system, each CPU unit has a bus arbiter that switches so that only one of the other CPU units uses the resource based on the combination state of the failure signals output from each other's failure detection unit and the processor of each CPU unit. The synchronization instructions described in the key points of the programs to be executed by each processor Is to and a wait state generator for a state waiting for one of the processors described above to the other processors by running on the line to execute a synchronization instruction.

【0007】[0007]

【作用】上記構成によれば、互いのCPUユニットから
出力される故障信号の組み合わせ状態に基づいて資源の
使用権を一方のCPUユニットに設定するバスアービタ
を各CPUユニットに設けるとともに、プログラムの要
所に同期命令を記述しておき、この同期命令の実行タイ
ミングに基づいてCPUユニットの相互間で次処理の実
行タイミングを同期させる待ち状態発生部をCPUユニ
ットに設けているので、従来のように調停ユニットを用
いることなく両CPUユニットでの資源の使用権を調停
することができるのであり、しかも、同じプログラムに
記述した同期命令の実行タイミングに基づいて、先に同
期信号を実行したCPUユニットが後から同期信号を実
行するCPUユニットの処理を待つことによって同期を
取ることにより、プログラムの処理の全体の進行状態を
監視することなく簡単な構成で同期をとることができる
のである。
According to the above configuration, each CPU unit is provided with a bus arbiter for setting the right of use of the resource to one CPU unit based on the combination state of the failure signals output from each CPU unit, and the key points of the program are provided. Since a synchronization instruction is described in the CPU unit, and the CPU unit is provided with a waiting state generation unit for synchronizing the execution timing of the next process between the CPU units based on the execution timing of the synchronization instruction, the arbitration as in the conventional case is performed. It is possible to arbitrate the right to use the resources in both CPU units without using the unit, and moreover, the CPU unit that first executed the synchronization signal is the second one based on the execution timing of the synchronization instruction described in the same program. By synchronizing by waiting for the processing of the CPU unit that executes the synchronization signal from It is possible to synchronize with a simple structure without monitoring overall progress of processing program.

【0008】[0008]

【実施例】図1に示すように、各CPUユニット1a,
1bは、プロセッサ10a,10bの故障を検出する故
障検出部11a,11bと、両プロセッサ10a,10
bにおけるプログラムの処理を同期的に進行させるため
の待ち状態発生部12a,12bとを備える。各CPU
ユニット1a,1bは、それぞれシステムバスSBa,
SBbを介してデュアルポートメモリよりなるメモリ4
を共有し、また、入出力バスIOBに対する使用権をバ
スアービタ13a,13bによって選択するように構成
されている。
EXAMPLE As shown in FIG. 1, each CPU unit 1a,
1b is a failure detection unit 11a, 11b that detects a failure of the processor 10a, 10b, and both processors 10a, 10b.
The waiting state generating units 12a and 12b for synchronously advancing the processing of the program in FIG. Each CPU
The units 1a and 1b are connected to the system buses SBa and SBa, respectively.
Memory 4 consisting of dual port memory via SBb
Is shared, and the right to use the input / output bus IOB is selected by the bus arbiters 13a and 13b.

【0009】故障検出部11a,11bは、たとえばウ
ォッチドッグタイマなどを用いて各プロセッサ10a,
10bの動作を監視するものであって、各プロセッサ1
0a10bで暴走のような異常が発生すると、それぞれ
対応する故障検出部11a,11bから故障信号err1,e
rr2 が出力されるようになっている。故障信号err1,err
2 は対応するプロセッサ10a,10bに故障が発生し
たときにLレベルになる。
The failure detectors 11a and 11b use the watchdog timer or the like, for example, to identify the processors 10a and 11b.
10b for monitoring the operation of each processor 1
When an abnormality such as runaway occurs at 0a10b, the failure signals err1, e from the corresponding failure detection units 11a and 11b, respectively.
rr2 is output. Failure signal err1, err
2 becomes L level when a failure occurs in the corresponding processor 10a, 10b.

【0010】各バスアービタ13a,13bは、電源の
両端間に抵抗Raとともに接続されたスイッチSWaを
備え、抵抗RaとスイッチSWaとの接続点は、対応す
る故障検出部11a,11bの出力が一端に入力された
NAND回路21aにレベルを反転して接続される。故
障検出部11a,11bの出力は、他方の故障検出部1
1a,11bの出力を否定した信号とともにNAND回
路22aに入力され、両NAND回路21a,22aの
出力はAND回路23aに入力される。AND回路23
aの出力は切換信号としてシステムバスSBa,SBb
と入出力バスIOBとの間に接続された切換器24aを
制御する。切換器24aは、AND回路23aから出力
される切換信号がLレベルであるときにシステムバスS
Ba,SBbを入出力バスIOBに接続する。ここに、
一方のCPUユニット1bにおけるバスアービタ13b
は具体的構成を省略しているが、バスアービタ13aと
同じ構成である。
Each bus arbiter 13a, 13b is provided with a switch SWa connected to both ends of a power source together with a resistor Ra, and at the connection point between the resistor Ra and the switch SWa, the outputs of the corresponding failure detection units 11a, 11b are at one end. The input NAND circuit 21a is connected with its level inverted. The outputs of the failure detection units 11a and 11b are the outputs of the other failure detection unit 1
The outputs of the NAND circuits 21a and 22a are input to the AND circuit 23a together with the signals that negate the outputs of 1a and 11b. AND circuit 23
The output of a is used as a switching signal for the system buses SBa and SBb.
And a switch 24a connected between the I / O bus and the input / output bus IOB. The switching device 24a is provided for the system bus S when the switching signal output from the AND circuit 23a is at L level.
Ba and SBb are connected to the input / output bus IOB. here,
Bus arbiter 13b in one CPU unit 1b
Although the specific configuration is omitted, it has the same configuration as the bus arbiter 13a.

【0011】いま、バスアービタ13aにおけるスイッ
チSWaがオン、バスアービタ13bにおけるスイッチ
(図示せず)がオフであって、故障検出部11a,11
bからともに故障信号err1,err2 が発生していなければ
(ともにHレベルであれば)、NAND回路21aの出
力がLレベル、NAND回路22aの出力がHレベルに
なって、AND回路23aの出力である切換器24aの
制御信号がLレベルになる。また、他方のバスアービタ
13bではスイッチがオフであるから両NAND回路の
出力がHレベルであり、切換器(図示せず)の制御信号
がHレベルになる。すなわち、プロセッサ10aのシス
テムバスSBaのみが入出力バスIOBに接続されるこ
とになり、CPUユニット1aが入出力バスIOBの使
用権を得る。また、この状態においてCPUユニット1
bから故障信号err2が発生しても(すなわち、故障信号
err2がLレベルになった場合には)、両NAND回路2
1a,22aの出力は変化しないから、CPUユニット
1aが入出力バスIOBの使用権を有した状態に保たれ
る。
Now, the switch SWa in the bus arbiter 13a is on, the switch (not shown) in the bus arbiter 13b is off, and the failure detecting units 11a, 11 are shown.
If neither of the failure signals err1 and err2 is generated from b (if both are H level), the output of the NAND circuit 21a becomes L level, the output of the NAND circuit 22a becomes H level, and the output of the AND circuit 23a becomes The control signal of a certain switch 24a becomes L level. Further, since the switch is off in the other bus arbiter 13b, the outputs of both NAND circuits are at H level, and the control signal of the switch (not shown) becomes H level. That is, only the system bus SBa of the processor 10a is connected to the input / output bus IOB, and the CPU unit 1a obtains the right to use the input / output bus IOB. In this state, the CPU unit 1
Even if the fault signal err2 is generated from b (that is, the fault signal
If err2 goes to L level), both NAND circuits 2
Since the outputs of 1a and 22a do not change, the CPU unit 1a is kept in a state in which it has the right to use the input / output bus IOB.

【0012】一方、CPUユニット1aにおいて故障が
発生すると、故障検出部1aからの故障信号err1がLレ
ベルになるから、NAND回路21aの出力はLレベル
からHレベルに立ち上がる。このとき、NAND回路2
2aの出力はHレベルに保たれるから、切換器24aへ
の制御信号はHレベルになってシステムバスSBaが入
出力バスIOBから切り離される。また、CPUユニッ
ト1bにおいては、故障信号err1を受けてNAND回路
22aに相当するNAND回路の出力がHレベルからL
レベルに立ち下がるから、AND回路の出力である切換
器への制御信号がLレベルになって、システムバスSB
bが入出力バスIOBに接続されることになる。つま
り、入出力バスIOBの使用権がプロセッサ10bのC
PUユニット1bに引き渡されるのである。
On the other hand, when a failure occurs in the CPU unit 1a, the failure signal err1 from the failure detection unit 1a goes to L level, so that the output of the NAND circuit 21a rises from L level to H level. At this time, the NAND circuit 2
Since the output of 2a is maintained at H level, the control signal to the switch 24a becomes H level, and the system bus SBa is disconnected from the input / output bus IOB. Further, in the CPU unit 1b, when the failure signal err1 is received, the output of the NAND circuit corresponding to the NAND circuit 22a changes from H level to L level.
Since it falls to the level, the control signal to the switch, which is the output of the AND circuit, becomes the L level, and the system bus SB
b will be connected to the input / output bus IOB. That is, the right to use the input / output bus IOB is C of the processor 10b.
It is handed over to the PU unit 1b.

【0013】要するに、両バスアービタ13a,13b
のうちの一方のスイッチSWaをオン、他方をオフに設
定すれば、正常時には、オンであるスイッチSWaを有
するCPUユニット1aが入出力バスIOBの使用権を
持ち、入出力バスIOBの使用権を有するCPUユニッ
ト1aに故障が発生すると、入出力バスIOBの使用権
はスイッチがオフである他方のCPUユニット1bに引
き渡されるのである。プログラマブルコントローラとし
ての処理は、入出力バスIOBの使用権を有するCPU
ユニット1aが行ってメモリ4に入出力の情報を書き込
む。このとき、入出力バスIOBの使用権を持たないC
PUユニット1bもメモリ4に書き込まれた入出力の情
報を参照することができる。故障信号err1,err2 は、後
述する反転回路38a,38bを介して互いに他方のC
PUユニット1a,1bのプロセッサ10a,10bの
割り込み端子に故障信号err1,err2 の反転値を割り込み
信号として入力するようになっており、この割り込みに
よって他方のプロセッサ10a,10bの処理を停止さ
せる。
In short, both bus arbiters 13a and 13b
If one of the switches SWa is set to on and the other is set to off, the CPU unit 1a having the switch SWa that is on has the right to use the I / O bus IOB and the right to use the I / O bus IOB under normal conditions. When the CPU unit 1a included therein has a failure, the right to use the I / O bus IOB is transferred to the other CPU unit 1b whose switch is off. The processing as the programmable controller is performed by the CPU having the right to use the input / output bus IOB.
The unit 1a performs the writing of input / output information in the memory 4. At this time, C that does not have the right to use the I / O bus IOB
The PU unit 1b can also refer to the input / output information written in the memory 4. The failure signals err1 and err2 are output to the other Cs via inverting circuits 38a and 38b described later.
The inverted values of the failure signals err1 and err2 are input as interrupt signals to the interrupt terminals of the processors 10a and 10b of the PU units 1a and 1b, and the interrupts stop the processing of the other processors 10a and 10b.

【0014】ここにおいて、各CPUユニット1a,1
bでは同じプログラムを各別に実行しているから、CP
Uユニット1aからCPUユニット1bに対して入出力
バスIOBの使用権が引き渡されたときに、各プロセッ
サ10a,10bでの処理の進行状態にずれが生じる場
合が発生する。すなわち、各プロセッサ10a,10b
が同時刻においてプログラムの異なる場所を実行中であ
ると、CPUユニット1a,1bの間で入出力バスIO
Bの使用権の引渡しが行われたときに、処理の流れが整
合しなくなり、誤動作が生じることになる。
Here, each CPU unit 1a, 1
In b, the same program is executed separately, so CP
When the right to use the input / output bus IOB is handed over from the U unit 1a to the CPU unit 1b, there may be a case where the progress of processing in each of the processors 10a and 10b is deviated. That is, each processor 10a, 10b
Is executing different locations of the program at the same time, the input / output bus IO between the CPU units 1a and 1b.
When the right to use B is handed over, the flow of processing becomes inconsistent, resulting in malfunction.

【0015】本発明では、この点を解決するために、図
2に示すように、各CPUユニット1a,1bのプログ
ラムに適切な処理単位ごとにダミー出力命令〔OUT〕
を同期命令として挿入し、ダミー出力命令〔OUT〕を
実行すると、各プロセッサ10a,10bの処理の同期
をとるように制御する待ち状態発生部12a,12bを
設けている。ダミー出力命令〔OUT〕は、制御出力と
しては機能しないが特定のアドレスに出力を発生する命
令である。待ち状態発生部12a,12bは、上記特定
アドレスをアクセスする書込み命令がプロセッサ1a,
1bから発生したときに出力がLレベルになるデコーダ
31a,31bを備える。デコーダ31a,31bの出
力は、入力の立ち上がりでトリガされるフリップフロッ
プ32a,32bに入力されて出力をLレベルにラッチ
する。
In the present invention, in order to solve this point, as shown in FIG. 2, a dummy output instruction [OUT] is provided for each processing unit suitable for the program of each CPU unit 1a, 1b.
Is inserted as a synchronization instruction and the dummy output instruction [OUT] is executed, wait state generating units 12a and 12b are provided to control so as to synchronize the processing of the processors 10a and 10b. The dummy output command [OUT] is a command that does not function as a control output but generates an output at a specific address. The wait state generating units 12a and 12b send write instructions for accessing the specific address to the processor 1a,
1b includes decoders 31a and 31b whose output becomes L level when they are generated. The outputs of the decoders 31a and 31b are input to the flip-flops 32a and 32b which are triggered by the rising edge of the inputs and latch the outputs at the L level.

【0016】フリップフロップ32a,32bの出力
は、そのCPUユニット1a,1b内では反転してNA
ND回路33a,33bに入力されるとともに、非反転
でOR回路34a,34bに入力される。また、他方の
CPUユニット1a,1bに対しては、非反転でNAN
D回路33a,33bおよびOR回路34a,34bに
入力される。すなわち、NAND回路33a,33b
は、同じCPUユニット1a,1b内のフリップフロッ
プ32a,32bの出力の反転値と、他のCPUユニッ
ト1a,1bのフリップフロップ32a,32bの出力
値との論理積の否定を出力する。また、OR回路34
a,34bは、互いに他のCPUユニット1a,1b内
のフリップフロップ32a,32bの出力同士の論理和
を出力する。OR回路34a,34bの出力は、電源投
入時に一時的にLレベルになるリセット信号rst ととも
にAND回路35a,35bに入力される。NAND回
路33a,33bおよびAND回路35a,35bの出
力は、それぞれRSフリップフロップ36a,36bの
セット端子およびリセット端子に入力される。したがっ
て、RSフリップフロップ36a,36bの出力は、N
AND回路33a,33bの出力がLレベルに立ち下が
るとるとLレベルになり、AND回路35a,35bの
出力がLレベルに立ち下がるとHレベルになる。また、
AND回路35a,35bの出力はフリップフロップ3
2a,32bのリセット端子にも入力され、AND回路
35a,35bの出力がLレベルに立ち下がると、フリ
ップフロップ32a,32bの出力はHレベルになる。
The outputs of the flip-flops 32a and 32b are inverted in the CPU units 1a and 1b, and NA is inverted.
It is input to the ND circuits 33a and 33b, and is also non-inverted to the OR circuits 34a and 34b. In addition, the other CPU unit 1a, 1b is not inverted and NAN
It is input to the D circuits 33a and 33b and the OR circuits 34a and 34b. That is, the NAND circuits 33a and 33b
Outputs the NOT of the logical product of the inverted values of the outputs of the flip-flops 32a, 32b in the same CPU unit 1a, 1b and the output values of the flip-flops 32a, 32b of the other CPU units 1a, 1b. Further, the OR circuit 34
a and 34b output the logical sum of outputs of the flip-flops 32a and 32b in the other CPU units 1a and 1b. The outputs of the OR circuits 34a and 34b are input to the AND circuits 35a and 35b together with the reset signal rst which temporarily becomes L level when the power is turned on. The outputs of the NAND circuits 33a and 33b and the AND circuits 35a and 35b are input to the set terminals and the reset terminals of the RS flip-flops 36a and 36b, respectively. Therefore, the outputs of the RS flip-flops 36a and 36b are N
When the outputs of the AND circuits 33a and 33b fall to the L level, they become the L level, and when the outputs of the AND circuits 35a and 35b fall to the L level, they become the H level. Also,
The outputs of the AND circuits 35a and 35b are the flip-flops 3
When the outputs of the AND circuits 35a and 35b fall to the L level, the outputs of the flip-flops 32a and 32b also go to the H level.

【0017】RSフリップフロップ36a,36bの出
力はOR回路37a,37bを通して待ち信号wait1,wa
it2 としてプロセッサ10a,10bに入力される。O
R回路37a,37bには、故障信号err1,err2 を反転
回路38a,38bによって反転した信号と、CPUユ
ニット1a,1bを二重システムとして用いるときにL
レベルに設定されるデュアル信号dualとが、同時に入力
される。
The outputs of the RS flip-flops 36a and 36b are wait signals wait1 and wa through OR circuits 37a and 37b.
It2 is input to the processors 10a and 10b. O
In the R circuits 37a and 37b, the failure signals err1 and err2 are inverted by the inversion circuits 38a and 38b, and when the CPU units 1a and 1b are used as a dual system,
The dual signal dual set to the level is input at the same time.

【0018】上記構成によれば、電源投入後にリセット
信号rst が立ち下がるとRSフリップフロップ36a,
36bの出力がHレベルになり、その後、リセット信号
rstが立ち上がるとAND回路35a,35bの出力が
Hレベルになる。したがって、NAND回路33a,3
3bおよびOR回路34a,34bの出力(リセット信
号rst がHレベルであるから、AND回路35a,35
bの出力と同じ)は、ともにHレベルになる。この状態
において、CPUユニット1aがCPUユニット1bに
先行してダミー出力命令〔OUT〕を実行したとする
と、デコーダ31aの出力の立ち上がりによってフリッ
プフロップ32aがトリガされ、図3(a)のように、
フリップフロップ32aの出力はLレベルになる。した
がって、NAND回路33aの出力はLレベルになり、
OR回路34aの出力はHレベルに保たれる。また、N
AND回路33bおよびOR回路34bの出力はHレベ
ルに保たれる。その結果、RSフリップフロップ32a
の出力がLレベルになり、図3(c)のように、OR回
路37aの出力がLレベルになって待ち信号wait1 が発
生する。プロセッサ10aは、待ち信号wait1 がLレベ
ルである期間には処理を停止する。その後、CPUユニ
ット1bにおいてダミー出力命令〔OUT〕が実行され
ると、図3(b)のようにフリップフロップ32bの出
力がLレベルになり、NAND回路33aの出力がHレ
ベルになるとともに、OR回路34aの両入力がLレベ
ルになってRSフリップフロップ36aの出力がHレベ
ルに戻る。すなわち、図3(c)のようにOR回路37
aの出力はHレベルに戻り、プロセッサ10aでの処理
が再開される。一方、RSフリップフロップ32bの出
力がLレベルになっても、NAND回路33bは出力が
Hレベルに保たれ、OR回路34bの出力はLレベルに
立ち下がるが、RSフリップフロップ36bの出力はH
レベルに保たれるから、CPUユニット1bでは、図3
(d)のように待ち信号wait2 はLレベルにならず、プ
ロセッサ10bの処理は継続されることになる。ここ
で、OR回路34a,34bの出力の立ち下がりによっ
てフリップフロップ32a,32bはリセットされ、次
のダミー出力命令〔OUT〕に備える。CPUユニット
1bがCPUユニット1aに先行してダミー出力命令
〔OUT〕を実行したときも、図4に示すように、同様
の動作を行う。すなわち、図4(b)のようにフリップ
フロップ32bの出力が立ち下がると、図4(d)のよ
うに待ち信号wait2 がLレベルになり、その後、図4
(a)のようにフリップフロップ32aの出力が立ち下
がると、待ち信号wait2 がHレベルに戻るのである。ま
た、待ち信号wait1 は変化しない。
According to the above configuration, when the reset signal rst falls after the power is turned on, the RS flip-flop 36a,
36b output goes to H level, then reset signal
When rst rises, the outputs of the AND circuits 35a and 35b become H level. Therefore, the NAND circuits 33a and 3a
3b and the outputs of the OR circuits 34a, 34b (since the reset signal rst is at the H level, the AND circuits 35a, 35
The same as the output of b) becomes H level. In this state, if the CPU unit 1a executes the dummy output instruction [OUT] prior to the CPU unit 1b, the rising edge of the output of the decoder 31a triggers the flip-flop 32a, and as shown in FIG.
The output of the flip-flop 32a becomes L level. Therefore, the output of the NAND circuit 33a becomes L level,
The output of the OR circuit 34a is kept at H level. Also, N
The outputs of the AND circuit 33b and the OR circuit 34b are maintained at the H level. As a result, the RS flip-flop 32a
3 becomes L level, the output of the OR circuit 37a becomes L level, and the wait signal wait1 is generated as shown in FIG. 3 (c). The processor 10a stops the processing while the wait signal wait1 is at the L level. After that, when the dummy output instruction [OUT] is executed in the CPU unit 1b, the output of the flip-flop 32b becomes L level, the output of the NAND circuit 33a becomes H level, and the OR signal is obtained as shown in FIG. 3B. Both inputs of the circuit 34a become L level, and the output of the RS flip-flop 36a returns to H level. That is, as shown in FIG. 3C, the OR circuit 37
The output of a returns to H level, and the processing in the processor 10a is restarted. On the other hand, even if the output of the RS flip-flop 32b becomes L level, the output of the NAND circuit 33b is kept at H level and the output of the OR circuit 34b falls to L level, but the output of the RS flip-flop 36b becomes H level.
Since the CPU unit 1b is maintained at the level shown in FIG.
As in (d), the wait signal wait2 does not become L level, and the processing of the processor 10b is continued. Here, the flip-flops 32a and 32b are reset by the fall of the outputs of the OR circuits 34a and 34b, and prepare for the next dummy output instruction [OUT]. When the CPU unit 1b precedes the CPU unit 1a and executes the dummy output instruction [OUT], the same operation is performed as shown in FIG. That is, when the output of the flip-flop 32b falls as shown in FIG. 4B, the wait signal wait2 becomes L level as shown in FIG.
When the output of the flip-flop 32a falls as shown in (a), the wait signal wait2 returns to H level. The wait signal wait1 does not change.

【0019】以上のような動作によって、ダミー出力命
令〔OUT〕の処理後には、両CPUユニット1a,1
bはプログラムの同じ箇所を処理することになるのであ
って、ダミー出力命令〔OUT〕を適切な箇所に挿入し
ておくことによって、両CPUユニット1a,1bの処
理の同期をとることが可能になるのである。ここに、両
CPUユニット1a,1bは、処理速度に大きな差がな
いという条件が必要であるが、このような条件は現実的
なものである。
By the above operation, after the processing of the dummy output instruction [OUT], both CPU units 1a, 1
Since b processes the same part of the program, it is possible to synchronize the processes of both CPU units 1a and 1b by inserting the dummy output instruction [OUT] in an appropriate part. It will be. Here, the two CPU units 1a and 1b need to have a condition that there is no great difference in processing speed, but such a condition is realistic.

【0020】以上説明したように、CPUユニット1
a,1bはダミー出力命令〔OUT〕を介して互いに同
期をとりながら処理を進行させるのであって、プログラ
ムの進行状態を別途の装置で監視することなく処理を引
き継がせることが可能になるのである。すなわち、本発
明の構成によれば、CPUユニット1a,1bの中にプ
ロセッサバスの使用権を選択するためのバスアービタ1
3a,13bを設け、かつ、両CPUユニット1a,1
bでの処理をダミー出力命令〔OUT〕を介して同期さ
せることができるから、外部に別途の調停ユニットを設
ける必要がなく、二重システムを構築する際のユニット
数の削減につながるのである。
As described above, the CPU unit 1
Since a and 1b proceed with the processing in synchronization with each other via the dummy output instruction [OUT], the processing can be taken over without observing the progress status of the program by a separate device. .. That is, according to the configuration of the present invention, the bus arbiter 1 for selecting the right to use the processor bus among the CPU units 1a and 1b.
3a, 13b are provided, and both CPU units 1a, 1
Since the processing in b can be synchronized via the dummy output instruction [OUT], it is not necessary to provide a separate arbitration unit outside, which leads to a reduction in the number of units when constructing the dual system.

【0021】[0021]

【発明の効果】本発明は上述のように、互いのCPUユ
ニットから出力される故障信号の組み合わせ状態に基づ
いて資源の使用権を一方のCPUユニットに設定するバ
スアービタを各CPUユニットに設けるとともに、プロ
グラムの要所に同期命令を記述しておき、この同期命令
の実行タイミングに基づいてCPUユニットの相互間で
次処理の実行タイミングを同期させる待ち状態発生部を
CPUユニットに設けているので、従来のように調停ユ
ニットを用いることなく両CPUユニットでの資源の使
用権を調停することができるという利点がある。しか
も、同じプログラムに記述した同期命令の実行タイミン
グに基づいて、先に同期信号を実行したCPUユニット
が後から同期信号を実行するCPUユニットの処理を待
つことによって同期を取るようにしていることにより、
プログラムの処理の全体の進行状態を監視することなく
簡単な構成で同期をとることができるという効果を奏す
るのである。さらに、調停ユニットを用いずに、CPU
ユニット同士を相互に接続するだけで、二重システムを
構築できるから、システム構成が簡単になるという利点
もある。
According to the present invention, as described above, each CPU unit is provided with a bus arbiter for setting the right to use the resource to one CPU unit based on the combination state of the failure signals output from each CPU unit. Conventionally, a synchronization instruction is described at a key point of a program, and the CPU unit is provided with a waiting state generation unit for synchronizing the execution timing of the next process between the CPU units based on the execution timing of the synchronization instruction. As described above, there is an advantage that it is possible to arbitrate the right to use the resource in both CPU units without using the arbitration unit. Moreover, based on the execution timing of the synchronization instruction described in the same program, the CPU unit that first executes the synchronization signal waits for the processing of the CPU unit that later executes the synchronization signal to achieve synchronization. ,
The effect is that synchronization can be achieved with a simple configuration without observing the overall progress of the program processing. Furthermore, without using the arbitration unit, the CPU
There is also an advantage that the system configuration becomes simple because a dual system can be constructed simply by connecting the units to each other.

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

【図1】実施例を示す回路図である。FIG. 1 is a circuit diagram showing an embodiment.

【図2】実施例におけるプログラムの例を示す図であ
る。
FIG. 2 is a diagram showing an example of a program in the embodiment.

【図3】実施例の動作説明図である。FIG. 3 is an operation explanatory diagram of the embodiment.

【図4】実施例の動作説明図である。FIG. 4 is an operation explanatory diagram of the embodiment.

【図5】従来例を示す構成図である。FIG. 5 is a configuration diagram showing a conventional example.

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

1a CPUユニット 1b CPUユニット 4 メモリ 10a プロセッサ 10b プロセッサ 11a 故障検出部 11b 故障検出部 12a 待ち状態発生部 12b 待ち状態発生部 13a バスアービタ 13a バスアービタ 1a CPU unit 1b CPU unit 4 Memory 10a Processor 10b Processor 11a Failure detection unit 11b Failure detection unit 12a Wait state generation unit 12b Wait state generation unit 13a Bus arbiter 13a Bus arbiter

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 同一内容のプログラムを独立して実行す
るプロセッサをそれぞれ備えた2台のCPUユニットに
より資源を共有し、第1のプロセッサにより処理を行う
とともに第2のプロセッサを待機させておき、各プロセ
ッサにそれぞれ設けた故障検出部により第1のプロセッ
サの故障が検出されると第2のプロセッサが処理を引き
継ぐようにした二重システムにおいて、各CPUユニッ
トは、互いの故障検出部より出力される故障信号の組み
合わせ状態に基づいて自他のCPUユニットの一方にの
み資源を利用させるように切り換えるバスアービタと、
各CPUユニットのプロセッサがそれぞれ実行するプロ
グラムの要所に記述した同期命令をいずれか一方のプロ
セッサが他方に先行して実行すると他方のプロセッサが
同期命令を実行するまで上記一方のプロセッサを待ち状
態とする待ち状態発生部とを具備することを特徴とする
二重システム。
1. A resource is shared by two CPU units each having a processor that independently executes programs of the same content, processing is performed by the first processor, and the second processor is made to wait. In a dual system in which a failure detection unit provided in each processor detects a failure in the first processor, the second processor takes over the processing, and the CPU units output the mutual failure detection units. A bus arbiter that switches so that only one of the CPU unit and the other CPU unit uses the resource based on the combination state of the failure signals.
When one of the processors executes the synchronization instruction described in the key point of the program executed by the processor of each CPU unit in advance of the other, the one processor is placed in a waiting state until the other processor executes the synchronization instruction. And a waiting state generating section.
JP4038176A 1992-02-25 1992-02-25 Duplex system Withdrawn JPH05233576A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4038176A JPH05233576A (en) 1992-02-25 1992-02-25 Duplex system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4038176A JPH05233576A (en) 1992-02-25 1992-02-25 Duplex system

Publications (1)

Publication Number Publication Date
JPH05233576A true JPH05233576A (en) 1993-09-10

Family

ID=12518084

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4038176A Withdrawn JPH05233576A (en) 1992-02-25 1992-02-25 Duplex system

Country Status (1)

Country Link
JP (1) JPH05233576A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007299174A (en) * 2006-04-28 2007-11-15 Yokogawa Electric Corp Input control device
JP2013190879A (en) * 2012-03-12 2013-09-26 Nippon Telegr & Teleph Corp <Ntt> Computer system and system control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007299174A (en) * 2006-04-28 2007-11-15 Yokogawa Electric Corp Input control device
JP2013190879A (en) * 2012-03-12 2013-09-26 Nippon Telegr & Teleph Corp <Ntt> Computer system and system control method

Similar Documents

Publication Publication Date Title
US5226152A (en) Functional lockstep arrangement for redundant processors
JPH0792765B2 (en) Input / output controller
JPH0734179B2 (en) Automatic flight controller with multiple heterogeneous data processing channels.
JPH0430053B2 (en)
JPS6115454B2 (en)
JPH05233576A (en) Duplex system
JPS5843775B2 (en) Processor backup system
JPH0736720A (en) Duplex computer equipment
JPH0652130A (en) Multiprocessor system
JPS5911455A (en) Redundancy system of central operation processing unit
JPH02205956A (en) Fault diagnostic device for dual port memory in multiprocessor system
JPS6113627B2 (en)
JPH0430245A (en) Multiprocessor control system
JPS60140440A (en) Central processing unit
JP2985188B2 (en) Redundant computer system
JPH03222020A (en) Reset system for multi-micro processor system
JPS584365B2 (en) Reset control system
JPH02165367A (en) Microprogram control type data processor
JPH067379B2 (en) Direct memory access control circuit
JPS6175436A (en) Microprogram controller
JP3903688B2 (en) Bank switching system
JPH08329026A (en) Dual processor system
JPH04211841A (en) Duplex processor
JPH10143393A (en) Diagnosis and processing device
JPS63155330A (en) Microprogram controller

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990518