JPH05224999A - Runaway processor - Google Patents

Runaway processor

Info

Publication number
JPH05224999A
JPH05224999A JP3051604A JP5160491A JPH05224999A JP H05224999 A JPH05224999 A JP H05224999A JP 3051604 A JP3051604 A JP 3051604A JP 5160491 A JP5160491 A JP 5160491A JP H05224999 A JPH05224999 A JP H05224999A
Authority
JP
Japan
Prior art keywords
cpu
runaway
output
interrupt
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP3051604A
Other languages
Japanese (ja)
Inventor
Shinji Aramaki
晋治 荒巻
Kazuo Shimizu
一夫 清水
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.)
Olympus Corp
Original Assignee
Olympus Optical 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 Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP3051604A priority Critical patent/JPH05224999A/en
Publication of JPH05224999A publication Critical patent/JPH05224999A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To provide a runaway processor which can deal with detection of runaways of plural CPUs with a single timer for simplification of a circuit and for deletion of a timer program and then, can extremely reduce the software developing burden. CONSTITUTION:A dual port RAM 3 is provided between the CPU1 and 2 which transmit the data to each other. Then, the RAM 3 outputs an interruption signal to the CPU2 when the data to be transferred to the CPU2 from the CPU1 are written and then, stops the output of the interruption signal when the CPU2 reads out the data. Meanwhile, a watchdog timer circuit 6 fetches the interruption signal from the RAM3 outputs a runaway detection signal if the output of the interruption signal is not stopped even after a prescribed time to prevent the runaway of the CPU 2.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロコンピュータ
の暴走を防止するための暴走処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a runaway processing device for preventing runaway of a microcomputer.

【0002】[0002]

【従来の技術】マイクロコンピュータの暴走を防止する
ための技術手段として、ウオッチドッグタイマと呼ばれ
る手法が広く採用されている。これは、マイクロコンピ
ュータの出力ポートに一定周期の信号を出力させて、こ
の信号を監視回路で監視することによって暴走を検出す
るものである。
2. Description of the Related Art A technique called a watchdog timer is widely adopted as a technical means for preventing a runaway of a microcomputer. This is to detect a runaway by outputting a signal of a constant cycle to an output port of a microcomputer and monitoring this signal with a monitoring circuit.

【0003】また、ソフト的に暴走処理を行なう技術手
段も各種提案されている。例えば、特開平2−2632
43号に記載されているように、メモリの未使用エリア
に特定のアドレスへジャンプする命令を書き込み、この
命令に従って特定のアドレスへジャンプするとそこにコ
ンピュータ暴走時の処理プログラムが書き込まれてい
て、このプログラムを取り込んで暴走処理を実行するも
のや、また特開平2−259936号に記載されている
ように、メインループが一巡する度にスタックレジスタ
の内容を書替えて暴走防止を図るものなどがある。
Various technical means for performing runaway processing by software have also been proposed. For example, JP-A-2-2632
As described in No. 43, an instruction for jumping to a specific address is written in an unused area of the memory, and when the instruction is jumped to a specific address, a processing program for computer runaway is written there. There are a method of fetching a program and executing a runaway process, and a method of rewriting the contents of the stack register each time the main loop completes to prevent a runaway, as described in JP-A-2-259936.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、ウオッ
チドッグタイマによるマイクロコンピュータの暴走監視
は、プログラム内に一定時間内でウオッチドッグタイマ
をアクセスするためのプログラムが挿入されることか
ら、プログラムが正常動作中にウオッチドッグタイマが
異常検知をしないように、ウオッチドッグタイマ用のプ
ログラムの挿入位置を調整しなければならず、本来のプ
ログラム作成とは無縁の作業に時間を費やすことにな
る。
However, in the runaway monitoring of the microcomputer by the watchdog timer, since the program for accessing the watchdog timer is inserted in the program within a certain time, the program is operating normally. Moreover, the insertion position of the program for the watchdog timer must be adjusted so that the watchdog timer does not detect an abnormality, and time is spent for work unrelated to the original program creation.

【0005】また、複数のCPUを持つシステムでは、
CPU毎に別々のタイミングでウオッチドッグタイマ用
信号が出力されるため、各CPU毎にウオッチドッグタ
イマが必要となり回路が複雑になるという問題がある。
In a system having a plurality of CPUs,
Since the watchdog timer signals are output at different timings for each CPU, there is a problem that a watchdog timer is required for each CPU and the circuit becomes complicated.

【0006】さらに、ソフトによる暴走処理では、マイ
クロコンピュータの動作と暴走処理の動作とが独立でな
いため、対処しきれない暴走が発生する可能性があり、
暴走対策としては不十分であった。
Further, in software runaway processing, since the operation of the microcomputer and the runaway processing are not independent, runaway that cannot be dealt with may occur.
It was insufficient as a measure against runaway.

【0007】本発明は以上のような実情に鑑みてなされ
たもので、一つのウオッチドッグタイマで複数のCPU
の暴走検出に対処できて回路の簡略化を図ることがで
き、ウオッチドッグタイマ用プログラムを削除でき、そ
のプログラムの挿入位置の調整が必要なくなりソフト開
発の負担を大幅に軽減できる暴走処理装置を提供するこ
とを目的とする。
The present invention has been made in view of the above-mentioned circumstances, and one watchdog timer is used for a plurality of CPUs.
Provides a runaway processing device that can deal with the detection of runaway and simplify the circuit, can delete the program for the watchdog timer, does not need to adjust the insertion position of the program, and can significantly reduce the burden of software development The purpose is to do.

【0008】[0008]

【課題を解決するための手段】本発明は上記目的を達成
するために暴走処理装置を、データ伝送が行われる複数
のCPU間にそれぞれ設けられ、あるCPUから他のC
PUへ伝送するデータが書込まれると前記他のCPUへ
割込み信号を出力し、前記他のCPUが前記データを読
込むことによって前記割込み信号の出力を停止するデュ
アルポートRAMと、前記デュアルポートRAMから出
力される割込み信号を取込み、該割込み信号が予め決め
られた時間を経過しても停止しないとき暴走検出信号を
出力して暴走した前記他のCPUの暴走を停止させるウ
オッチドッグタイマ回路とを具備した構成とし、またさ
らに、暴走時の処理プログラムが記憶されているメモリ
と、各割込みルーチン毎に設けられアクセスしてきた前
記各CPUに割込みルーチン終了後のメインルーチンへ
の帰りアドレスが格納されているスタックのチェックを
行わせメインルーチンへ戻れない場合には前記処理プロ
グラムを実行させる手段とを具備した構成とした。
SUMMARY OF THE INVENTION In order to achieve the above object, the present invention provides a runaway processing device between a plurality of CPUs for data transmission.
A dual port RAM, which outputs an interrupt signal to the other CPU when data to be transmitted to the PU is written, and stops the output of the interrupt signal by the other CPU reading the data, and the dual port RAM And a watchdog timer circuit for stopping the runaway of the other CPU that has runaway by outputting the runaway detection signal when the interrupt signal does not stop even if a predetermined time has elapsed. In addition to the above configuration, a memory in which a processing program at the time of a runaway is stored, and a return address to the main routine after the completion of the interrupt routine is stored in each of the CPUs provided for each interrupt routine and accessed. Check the existing stack and execute the above processing program if it cannot return to the main routine. It has a structure provided with the means.

【0009】[0009]

【作用】以上のような手段が講じられた本発明によれ
ば、CPU間のデータ伝送はデュアルポートRAMを介
して行われ、あるCPUから他のCPUへデータ伝送が
行われるときは、あるCPUから伝送されたデータはデ
ュアルポートRAMに一旦書込まれ、これに伴ってデュ
アルポートRAMから伝送先のCPUおよびウオッチド
ッグタイマ回路に割込み信号が出力される。伝送先のC
PUは割込み信号を受信するとデュアルポートRAMに
書き込まれているデータを読み込み、デュアルポートR
AMは伝送先のCPUがデータを読込むと割込み信号の
出力を停止させる。一方、ウオッチドッグタイマ回路で
は、割込み信号が入力するとタイマをスタートさせ、予
め決められている時間を経過しても割込み信号の出力が
停止されないとき、すなわち伝送先のCPUがデータを
読込みに行かない場合には、異常検知信号を出力して伝
送先CPUをリセットさせる。
According to the present invention in which the above means are taken, the data transmission between the CPUs is performed through the dual port RAM, and when the data transmission is performed from one CPU to another CPU, The data transmitted from the dual port RAM is once written in the dual port RAM, and accordingly, an interrupt signal is output from the dual port RAM to the destination CPU and the watchdog timer circuit. Destination C
When the PU receives the interrupt signal, it reads the data written in the dual port RAM and
The AM stops the output of the interrupt signal when the destination CPU reads the data. On the other hand, in the watchdog timer circuit, when the interrupt signal is input, the timer is started, and when the output of the interrupt signal is not stopped even after the lapse of a predetermined time, that is, the transmission destination CPU does not go to read the data. In this case, an abnormality detection signal is output and the transmission destination CPU is reset.

【0010】また、割込みルーチンで帰り先アドレスを
さかのぼりメインルーチンへ戻れる否かのスタックチェ
ックが行なわれ、戻れない場合には暴走時の処理プログ
ラムが実行される。これにより、割込みを受け付けるよ
うな暴走が発生している場合であっても、確実に暴走が
停止されるものとなる。
In the interrupt routine, the return address is traced back to check the stack to see if it can return to the main routine. If the stack cannot be returned, the runaway program is executed. As a result, even if a runaway that accepts an interrupt occurs, the runaway is surely stopped.

【0011】[0011]

【実施例】以下、図面を参照しながら本発明の実施例に
ついて説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0012】図1には本発明の一実施例に係る暴走処理
装置の概略的な構成を示す。同図に示すように、本実施
例は、データ伝送が行われる一方のCPU1と他方のC
PU2とがデュアルポートRAM3を介して接続され、
各CPU1,2は入力ポート4,5を介してアドレスバ
スおよびデータバスにそれぞれ接続されている。データ
伝送先のCPU1または2へ割込み信号を出力するデュ
アルポートRAM3の出力端子は、ウオッチドッグタイ
マ回路6の入力端子に接続され、このウオッチドッグタ
イマ回路6の暴走検知信号を出力する出力端子は各CP
U1,2の入力ポート4,5にそれぞれ接続された構成
となっている。
FIG. 1 shows a schematic configuration of a runaway processing apparatus according to an embodiment of the present invention. As shown in the figure, in this embodiment, the CPU 1 on one side and the C on the other side are used for data transmission.
PU2 is connected via dual port RAM3,
Each of the CPUs 1 and 2 is connected to an address bus and a data bus via input ports 4 and 5, respectively. The output terminal of the dual port RAM 3 that outputs an interrupt signal to the CPU 1 or 2 of the data transmission destination is connected to the input terminal of the watchdog timer circuit 6, and the output terminals that output the runaway detection signal of the watchdog timer circuit 6 are CP
It is configured to be connected to the input ports 4 and 5 of U1 and U2, respectively.

【0013】本実施例のさらに詳しい構成を図2に示
す。
A more detailed structure of this embodiment is shown in FIG.

【0014】なお、本実施例では、マイクロコンピュー
タとしてグラフィックシステムプロセッサ(以下、「G
SP」と呼ぶ)と、外部機器制御用マイクロコンピュー
タとを備えた構成を例にして説明する。
In this embodiment, a graphic system processor (hereinafter referred to as "G") is used as a microcomputer.
(Hereinafter referred to as "SP") and a microcomputer for controlling an external device will be described as an example.

【0015】CPU11は主にディスプレイへの表示を
制御するGSPであり、CPU12,13は外部機器の
制御を行うCPUである。各CPU11〜13にはアド
レスバスおよびデータバスがそれぞれ接続されている。
The CPU 11 is a GSP that mainly controls the display on the display, and the CPUs 12 and 13 are CPUs that control the external equipment. An address bus and a data bus are connected to the CPUs 11 to 13, respectively.

【0016】CPU11に接続されたアドレスバス、デ
ータバスには、プログラムが内蔵されているROMと、
データおよびプログラムが格納され着脱自在に設けられ
たICカードと、データが読み書きされるRAMとが接
続されている。また、CPU12,13に接続されたア
ドレスバス、データバスには、プログラムおよびデータ
が格納されるRAMが接続されている。
The address bus and data bus connected to the CPU 11 include a ROM containing a program,
An IC card in which data and programs are stored and which is detachably provided, and a RAM for reading and writing data are connected. A RAM for storing programs and data is connected to the address bus and data bus connected to the CPUs 12 and 13.

【0017】CPU11,CPU12間、およびCPU
11,CPU13間ではデータ伝送が行われ、図1に示
すCPU1とCPU2との関係にあるため、デュアルポ
ートRAM14,15を介してそれぞれ接続されてい
る。これらデュアルポートRAM14,15は2つの割
込み出力端子を有し、一方側からあるアドレスにデータ
書込みを行うと、他方への割込み出力がアクティブにな
り、他方からそのアドレスのデータ内容を読込むと、そ
の割込み出力がノンアクティブになる。これら各デュア
ルポートRAM14,15の割込み出力端子のうち、C
PU11側の割込み出力端子はAND回路16を介して
CPU11の割込み端子に接続され、CPU12,13
側の割込み出力端子はそれぞれCPU12,13の割込
み端子に接続されている。これらデュアルポートRAM
14,15の割込み出力端子は、さらにウオッチドッグ
タイマ回路16に接続されている。
Between CPU 11 and CPU 12, and CPU
Data is transmitted between the CPU 11 and the CPU 13, and the CPU 1 and the CPU 2 shown in FIG. 1 are connected to each other through the dual port RAMs 14 and 15, respectively. These dual-port RAMs 14 and 15 have two interrupt output terminals. When data is written to one address from one side, the interrupt output to the other becomes active, and when the data content of that address is read from the other, Interrupt output becomes non-active. Of the interrupt output terminals of these dual port RAMs 14 and 15, C
The interrupt output terminal on the PU 11 side is connected to the interrupt terminal of the CPU 11 via the AND circuit 16, and the CPUs 12 and 13 are connected.
The side interrupt output terminals are connected to the interrupt terminals of the CPUs 12 and 13, respectively. These dual port RAM
The interrupt output terminals 14 and 15 are further connected to the watchdog timer circuit 16.

【0018】ウオッチドッグタイマ回路16の回路構成
を図3に示す。
The circuit configuration of the watchdog timer circuit 16 is shown in FIG.

【0019】ウオッチドッグタイマ回路16は、デュア
ルポートRAM14のCPU11側の割込み出力端子を
割込みライン1、CPU12側の割込み出力端子を割込
みライン2とし、デュアルポートRAM15のCPU1
1側の割込み出力端子を割込みライン3、CPU13側
の割込み出力端子を割込みライン4とすると、各割込み
ライン1〜4がフリップフロップよりなるラッチ回路2
1〜24のD入力にそれぞれ接続されている。各ラッチ
回路21〜24のQ出力はOR回路25〜28の一方の
入力端子にそれぞれ接続され、各OR回路25〜28の
他方の入力端子には各々対応する割込みライン1〜4が
接続されている。これらOR回路25〜28の各出力端
子はNAND回路29の入力端子にそれぞれ接続されて
いる。NAND回路29の出力端子はタイマ回路30に
接続されている。また、NAND回路29の出力端子
は、一方の入力端子にクロック信号が入力されたOR回
路20の他方の入力端子に接続される。このOR回路2
0出力が各ラッチ回路21〜24のクロック端子にクロ
ック信号として入力する。
The watchdog timer circuit 16 uses the interrupt output terminal on the CPU 11 side of the dual port RAM 14 as the interrupt line 1 and the interrupt output terminal on the CPU 12 side as the interrupt line 2, and the CPU 1 of the dual port RAM 15
If the interrupt output terminal on the first side is the interrupt line 3 and the interrupt output terminal on the CPU 13 side is the interrupt line 4, each of the interrupt lines 1 to 4 is a latch circuit 2 including a flip-flop.
They are connected to D inputs 1 to 24, respectively. The Q outputs of the latch circuits 21 to 24 are connected to one input terminals of the OR circuits 25 to 28, respectively, and the corresponding interrupt lines 1 to 4 are connected to the other input terminals of the OR circuits 25 to 28, respectively. There is. The output terminals of the OR circuits 25 to 28 are connected to the input terminals of the NAND circuit 29, respectively. The output terminal of the NAND circuit 29 is connected to the timer circuit 30. The output terminal of the NAND circuit 29 is connected to the other input terminal of the OR circuit 20 whose one input terminal receives the clock signal. This OR circuit 2
The 0 output is input as a clock signal to the clock terminals of the latch circuits 21 to 24.

【0020】タイマ回路30は、入力信号の立ち上がり
でカウントを開始し、立ち下がりでカウントをストップ
する。そして、予め決められた時間カウントすると負パ
ルスを出力するものである。この予め決められた時間す
なわちタイマの設定時間はCPUにデュアルポートRA
Mから割り込みが入ってからCPUがデータを読み込
み、その割り込みをノンアクティブになるまでの時間よ
り十分長くとる。タイマ回路30の出力端子にはOR回
路31〜34が並列に接続され、各OR回路31〜34
のもう一方の入力端子に前段の各OR回路25〜28の
出力が印加される。割込みライン1,3に対応したOR
回路31,33の出力はAND回路35に入力され、論
理条件が成立したときに暴走検知信号S1が出力され
る。また、割込みライン2に対応したOR回路32から
暴走信号S2が出力され、割込みライン4に対応したO
R回路34から暴走信号S3が出力される。
The timer circuit 30 starts counting at the rising edge of the input signal and stops counting at the falling edge. Then, a negative pulse is output when counting a predetermined time. This predetermined time, that is, the timer setting time
It takes longer than the time from when an interrupt is input from M to when the CPU reads data and becomes inactive. The OR circuits 31 to 34 are connected in parallel to the output terminals of the timer circuit 30, and the OR circuits 31 to 34 are connected.
The outputs of the OR circuits 25 to 28 in the preceding stages are applied to the other input terminal of the. OR corresponding to interrupt lines 1 and 3
The outputs of the circuits 31 and 33 are input to the AND circuit 35, and the runaway detection signal S1 is output when the logical condition is satisfied. In addition, the runaway signal S2 is output from the OR circuit 32 corresponding to the interrupt line 2, and the O signal corresponding to the interrupt line 4 is output.
A runaway signal S3 is output from the R circuit 34.

【0021】CPU11が暴走したことを示す暴走検知
信号S1を出力するAND回路35はCPU11のリセ
ット端子およびCPU12,13の内蔵する入力ポート
に接続されている。また、CPU12が暴走したことを
示す暴走検知信号S2を出力するOR回路32は、CP
U11の入力ポート41およびCPU13の内蔵する入
力ポートに接続されている。さらに、CPU13が暴走
したことを示す暴走検知信号S3を出力するOR回路3
4は、CPU11の入力ポート41およびCPU12の
内蔵する入力ポートに接続されている。さらにまた、暴
走検知信号S1〜S3はAND回路42に入力され、そ
の出力端子はCPU11〜13の各割込み入力端子に接
続されている。これにより、暴走検知信号が一つでも出
力された場合には、各CPU11〜13に割込みが入る
構成となっている。
An AND circuit 35 which outputs a runaway detection signal S1 indicating that the CPU 11 has runaway is connected to the reset terminal of the CPU 11 and the input ports built in the CPUs 12 and 13. Further, the OR circuit 32 that outputs the runaway detection signal S2 indicating that the CPU 12 has run out of control
It is connected to the input port 41 of U11 and the input port of the CPU 13. Further, an OR circuit 3 that outputs a runaway detection signal S3 indicating that the CPU 13 has runaway
Reference numeral 4 is connected to an input port 41 of the CPU 11 and an input port built in the CPU 12. Furthermore, the runaway detection signals S1 to S3 are input to the AND circuit 42, and its output terminal is connected to each interrupt input terminal of the CPUs 11 to 13. As a result, if any one of the runaway detection signals is output, the CPU 11 to 13 is interrupted.

【0022】また、CPU11は、CPU12およびC
PU13のリセット端子に接続された出力ポート43を
有する。CPU12およびCPU13は、この出力ポー
ト43から出力されるリセット信号RST2およびRS
T3によってリセットされる。また、CPU12および
CPU13は、CPU11がリセットされた後の立ち上
げ動作時にCPU11によってリセットされないための
ノンリセット信号NR2,3をCPU11に出力するた
めの出力端子を有している。
The CPU 11 has a CPU 12 and a CPU C.
It has an output port 43 connected to the reset terminal of the PU 13. The CPU 12 and the CPU 13 have reset signals RST2 and RS output from the output port 43.
Reset by T3. Further, the CPU 12 and the CPU 13 have output terminals for outputting to the CPU 11 non-reset signals NR2 and NR3 that are not reset by the CPU 11 during the startup operation after the CPU 11 is reset.

【0023】次に、以上のように構成された本実施例の
動作について説明する。
Next, the operation of this embodiment configured as described above will be described.

【0024】正常動作時には、CPU11とCPU12
との間、およびCPU11とCPU13との間でデュア
ルポートRAM14,15を介してデータ伝送が行われ
る。例えば、CPU11からCPU12へデータを伝送
する場合には、CPU11がデュアルポートRAM14
の特定アドレスにデータを書き込む。データが書き込ま
れたデュアルポートRAM14は、CPU12およびウ
オッチドッグタイマ回路16に割込み信号を出力する。
During normal operation, the CPU 11 and the CPU 12
And between the CPU 11 and the CPU 13 via the dual port RAMs 14 and 15. For example, when data is transmitted from the CPU 11 to the CPU 12, the CPU 11 uses the dual port RAM 14
Write the data to the specific address of. The dual port RAM 14 in which the data is written outputs an interrupt signal to the CPU 12 and the watchdog timer circuit 16.

【0025】この割込み信号が出力されると、ウオッチ
ドッグタイマ回路16では割込みライン2がローレベル
となって、NAND回路29が不成立となり、タイマ回
路30の入力信号が立ち上がり、時間のカウントが開始
される。一方、同じ割込み信号を受けたCPU12は、
デュアルポートRAM14に書き込まれたデータを読み
込む。CPU12がデュアルポートRAM14からデー
タを読み込むと、デュアルポートRAM14から出力さ
れていた割込み信号の出力が停止され、これに伴って割
込み信号ライン2もハイレベルに戻り、NAND回路2
9の条件が成立してタイマ回路30の入力信号が立ち下
がりカウントが停止される。従って、ウオッチドッグタ
イマ回路16から暴走検知信号S2は出力されない。
When this interrupt signal is output, in the watchdog timer circuit 16, the interrupt line 2 becomes low level, the NAND circuit 29 is not established, the input signal of the timer circuit 30 rises, and time counting is started. It On the other hand, when the CPU 12 receives the same interrupt signal,
The data written in the dual port RAM 14 is read. When the CPU 12 reads the data from the dual port RAM 14, the output of the interrupt signal output from the dual port RAM 14 is stopped, the interrupt signal line 2 also returns to the high level accordingly, and the NAND circuit 2
When the condition 9 is satisfied, the input signal of the timer circuit 30 falls and the counting is stopped. Therefore, the watchdog timer circuit 16 does not output the runaway detection signal S2.

【0026】一方、CPU12に割込みが掛からないよ
うな暴走が発生している場合には、CPU12はデュア
ルポートRAM14からデータを読み込まないため、デ
ュアルポートRAM14から割込み信号が出力されたま
まとなり、ウオッチドックタイマ回路16のタイマ回路
30は予め設定されている時間をカウントし終わると、
負パルスを出力する。この結果、割込みライン2に対応
したOR回路32は、両入力端子がローレベルとなり、
CPU12が暴走したことを示す暴走検知信号S2を出
力する。
On the other hand, when a runaway that does not cause an interrupt to the CPU 12 occurs, the CPU 12 does not read data from the dual port RAM 14, so that the interrupt signal remains output from the dual port RAM 14 and the watch dock When the timer circuit 30 of the timer circuit 16 finishes counting the preset time,
Output a negative pulse. As a result, both input terminals of the OR circuit 32 corresponding to the interrupt line 2 become low level,
A runaway detection signal S2 indicating that the CPU 12 has run out is output.

【0027】この暴走検知信号S2は、CPU12以外
のCPU11およびCPU13の入力ポートに入力され
る。CPU11は暴走検知信号S2を受信すると、その
出力ポート43からCPU12に対してリセット信号R
ST2を出力して、暴走したCPU12をリセットす
る。
The runaway detection signal S2 is input to the input ports of the CPU 11 and the CPU 13 other than the CPU 12. When the CPU 11 receives the runaway detection signal S2, the reset signal R is output from its output port 43 to the CPU 12.
ST2 is output to reset the runaway CPU 12.

【0028】CPU11は、CPU12をリセットする
とそのCPU12を立ち上げる。
When the CPU 12 is reset, the CPU 11 starts up the CPU 12.

【0029】即ち、CPU11がCPU12のリセット
を掛けた状態で、デュアルポートRAM14にブートプ
ログラム(CPU12が本来のプログラムをバスを介し
て接続されたRAMに書き込むためのプログラム)とリ
セットベクタとを書き込んだ後、CPU12のリセット
を解除する。そうすると、CPU12は、本来のプログ
ラムをCPU11からデュアルポートRAM14を介し
て自己のRAMに読み込み、そのRAM上で本来のプロ
グラムが立ち上がる。なお、このときCPU13はCP
U12に対して送信は行わないようにする。
That is, while the CPU 11 resets the CPU 12, the boot program (the program for the CPU 12 to write the original program in the RAM connected via the bus) and the reset vector are written in the dual port RAM 14. After that, the reset of the CPU 12 is released. Then, the CPU 12 reads the original program from the CPU 11 into its own RAM via the dual port RAM 14, and the original program starts up on the RAM. At this time, the CPU 13
Do not send to U12.

【0030】以上の暴走検出、リセットおよび立ち上げ
動作は、CPU13についても同様にして行われる。
The above-described runaway detection, reset and start-up operations are similarly performed for the CPU 13.

【0031】また、CPU11が暴走した場合には、上
記したようにしてウオッチドッグタイマ回路16のAN
D回路35より暴走検知信号S1が出力されて、CPU
11がリセットされると共に、CPU12,13にCP
U11が暴走したことが知らされる。
When the CPU 11 runs out of control, the AN of the watchdog timer circuit 16 is operated as described above.
When the runaway detection signal S1 is output from the D circuit 35, the CPU
11 is reset, and CP is sent to the CPUs 12 and 13.
Informed that U11 had runaway.

【0032】ここで、通常の電源投入時には、先ず、C
PU11が立ち上がり、続いて上記した手順にてCPU
12およびCPU13が立ち上げられる。従って、CP
U11が暴走した場合には、CPU11の立ち上げ時に
CPU12およびCPU13がリセットされないように
しなければならない。
Here, when the power is normally turned on, first, C
PU11 starts up, and then the CPU is executed by the procedure described above.
12 and the CPU 13 are started up. Therefore, CP
When U11 runs out of control, it is necessary to prevent the CPU 12 and the CPU 13 from being reset when the CPU 11 starts up.

【0033】本実施例では、CPU12,13は、CP
U11が暴走したことを暴走検知信号S1によって知る
と、ノンリセット信号NR2,NR3をCPU11に対
して出力する。CPU11は入力ポート41にノンリセ
ット信号NR2,NR3が入力しているか否か判断し
て、ノンリセット信号NR2,NR3が出力されていれ
ば、CPU12,13のリセットは行わないようにす
る。
In this embodiment, the CPUs 12 and 13 use the CP
When it knows that U11 has runaway by the runaway detection signal S1, it outputs the non-reset signals NR2 and NR3 to the CPU 11. The CPU 11 judges whether or not the non-reset signals NR2 and NR3 are input to the input port 41, and if the non-reset signals NR2 and NR3 are output, the CPUs 12 and 13 are not reset.

【0034】また、2つ以上のCPUが同時に送信を行
った場合、またはタイマ回路30がカウント中に別のC
PUが送信を行った場合には、ウオッチドッグタイマ回
路16は図5に示すタイムチャートにて動作する。同図
には、最初にCPU12からCPU11へ送信が行われ
て割込みライン1がローレベルとなり、その送信中にC
PU11からCPU12へ、およびCPU13からCP
U11へ送信が行われて割込みライン2,3がそれぞれ
ローレベルとなり、しかもCPU12が暴走している場
合である。
When two or more CPUs transmit at the same time, or when the timer circuit 30 is counting, another C
When the PU transmits, the watchdog timer circuit 16 operates according to the time chart shown in FIG. In the figure, first, transmission is performed from the CPU 12 to the CPU 11, the interrupt line 1 becomes low level, and C is transmitted during the transmission.
PU11 to CPU12 and CPU13 to CP
This is a case where the transmission is performed to U11, the interrupt lines 2 and 3 are set to the low level, and the CPU 12 is out of control.

【0035】先ず、割込みライン1がローレベルになる
と、OR回路25の両入力端子がローレベルになり、N
AND回路29の条件が不成立となってタイマ回路30
の入力信号TP1が立ち上がる。タイマ回路30は入力
信号TP1の立ち上がりでカウントを開始し、ラッチ回
路21〜24の各々はOR回路20を介してクロック入
力する信号TP1によってその出力がラッチされる。そ
して、割込みライン1がタイマ設定時間以内に立ち上が
ると、次のクロック信号が立ち上がるまでの間NAND
回路29の入力信号は全てハイレベルとなるため、条件
が成立して入力信号TP1は立ち下がる。この立ち下が
りで、タイマ回路30のカウントは停止される。この時
には割込みライン2,3はローレベルとなっているた
め、次のクロック信号の立ち上がりでNAND回路29
が再び不成立となって、タイマ回路30の入力信号TP
1が立ち上がりカウントが開始される。今回は、割込み
ライン2はタイマ設定時間が経過しても立ち上がらない
ため、タイマ設定時間が経過したときにタイマ回路30
から負パルスが出力される。この時、OR回路31〜3
4の一方の入力端子は、割込みライン2に対応したOR
回路32のみローレベルとなっているため、OR回路3
2の出力がローレベルとなって暴走検知信号S2が出力
される。
First, when the interrupt line 1 becomes low level, both input terminals of the OR circuit 25 become low level, and N
When the condition of the AND circuit 29 is not satisfied, the timer circuit 30
Input signal TP1 of rises. The timer circuit 30 starts counting at the rising edge of the input signal TP1, and the output of each of the latch circuits 21 to 24 is latched by the signal TP1 clocked through the OR circuit 20. When the interrupt line 1 rises within the timer setting time, the NAND is waited until the next clock signal rises.
Since the input signals of the circuit 29 are all at the high level, the condition is satisfied and the input signal TP1 falls. At this fall, the counting of the timer circuit 30 is stopped. At this time, the interrupt lines 2 and 3 are at the low level, so that the NAND circuit 29 rises at the next rise of the clock signal.
Is not established again, and the input signal TP of the timer circuit 30 is
1 rises and counting is started. This time, the interrupt line 2 does not rise even after the timer setting time elapses. Therefore, when the timer setting time elapses, the timer circuit 30
Outputs a negative pulse. At this time, the OR circuits 31 to 3
One input terminal of 4 is an OR corresponding to the interrupt line 2.
Since only the circuit 32 is at the low level, the OR circuit 3
The output of 2 goes low and the runaway detection signal S2 is output.

【0036】以上のようにして、2つ以上のCPUが同
時に送信を行った場合、またはタイマ回路30がカウン
ト中に別のCPUが送信を行った場合にも対応してい
る。
As described above, it is possible to deal with the case where two or more CPUs simultaneously transmit, or when another CPU transmits while the timer circuit 30 is counting.

【0037】また、本実施例では、無限ループによる暴
走をしていても割込みは受け付ける類いの暴走に対処す
るため、図4に示す処理を実行している。
Further, in the present embodiment, the processing shown in FIG. 4 is executed in order to cope with a kind of runaway that accepts an interrupt even if the runaway is caused by an infinite loop.

【0038】先ず、メインループから割込みループへ移
行すると、割込みルーチン終了後の帰り先アドレスが格
納されているスタックをチェックする。このスタックチ
ェックは、帰り先アドレスをさかのぼりメインルーチン
へ戻れるか否かを判断する。メインルーチンへ戻れる場
合には、その割込みルーチンへ移行して割込み処理を実
行する。また、スタックチェックの結果、メインルーチ
ンへ戻れないような場合には、予め暴走処理用の初期化
プログラムが格納されている所定のアドレスへジャンプ
して、初期化等の処理を行う。
First, when shifting from the main loop to the interrupt loop, the stack in which the return address after the end of the interrupt routine is stored is checked. This stack check determines whether the return address can be traced back to the main routine. If it can return to the main routine, it shifts to the interrupt routine and executes interrupt processing. Further, as a result of the stack check, if it is not possible to return to the main routine, a process such as initialization is performed by jumping to a predetermined address in which an initialization program for runaway processing is stored in advance.

【0039】この様に本実施例によれば、CPU11〜
13間のデータ伝送をデュアルポートRAM14,15
を介して行い、データ伝送の際に各デュアルポートRA
M14,15から出力される割込み信号でウオッチドッ
グタイマ回路16のタイマをスタートさせ、伝送先のC
PUが予め設定されている時間を経過してもデータを読
み込まない場合に、伝送先のCPUに関する暴走検知信
号を出力して、その暴走CPUをリセットするようにし
たので、複数のCPU11〜13に対して一つのウオッ
チドッグタイマ回路16で暴走検知が可能となり、各C
PU毎にウオッチドッグタイマ回路を設けなければなら
なかった従来に比べて回路が大幅に簡略化される。ま
た、ウオッチドッグタイマ用のプログラムを削除するこ
とができ、そのプログラムを挿入する位置を調整するよ
うがなくなるので、プログラム開発の負担を大幅に軽減
できる。
As described above, according to this embodiment, the CPUs 11 to 11 are
Data transmission between 13 and dual port RAM 14, 15
Via each dual port RA for data transmission
The timer of the watchdog timer circuit 16 is started by the interrupt signal output from M14 and M15, and the transmission destination C
When the PU does not read the data even after the preset time elapses, the runaway detection signal regarding the CPU of the transmission destination is output and the runaway CPU is reset. On the other hand, one watchdog timer circuit 16 can detect runaway and each C
The circuit is greatly simplified as compared with the conventional case where a watchdog timer circuit must be provided for each PU. Further, since the program for the watchdog timer can be deleted and it is not necessary to adjust the position where the program is inserted, the burden of program development can be greatly reduced.

【0040】また、割込みルーチン終了後の帰り先アド
レスが格納されているスタックチェックを行い、メイン
ルーチンへ戻れないような場合には、初期化等の処理を
行うようにしたので、割込みは受け付ける暴走であって
もその暴走を検知して有効に対処することができる。
Further, a stack check is carried out in which the return address after the end of the interrupt routine is stored, and if the routine cannot return to the main routine, processing such as initialization is carried out. Even then, the runaway can be detected and effectively dealt with.

【0041】なお、上記実施例では、暴走検知信号S1
〜S3をCPU11〜13の入力ポートに接続する構成
になっているが、この様な構成に限定されず、ウオッチ
ドッグタイマ回路16から出力された暴走検知信号をエ
ンコーダを通してデータとして入力するように構成する
こともできる。この様に構成することにより、CPUの
数が増えた場合にも容易に対応することができる。
In the above embodiment, the runaway detection signal S1
~ S3 is connected to the input ports of the CPUs 11 to 13, but is not limited to such a structure, and the runaway detection signal output from the watchdog timer circuit 16 is input as data through the encoder. You can also do it. With this configuration, it is possible to easily deal with the case where the number of CPUs increases.

【0042】また、上記実施例では、CPU11が暴走
した場合には、暴走検知信号S1をCPU11のリセッ
ト信号としているが、暴走検知信号S1を受けた他のC
PU12,13からCPU11にリセットをかけるよう
に構成しても良い。
Further, in the above embodiment, when the CPU 11 runs out of control, the runaway detection signal S1 is used as the reset signal of the CPU 11, but other C receiving the runaway detection signal S1.
The PUs 12 and 13 may be configured to reset the CPU 11.

【0043】[0043]

【発明の効果】以上詳記したように本発明によれば、一
つのウオッチドッグタイマで複数のCPUの暴走検出に
対処できて回路の簡略化を図ることができ、ウオッチド
ッグタイマ用プログラムを削除でき、そのプログラムの
挿入位置の調整が必要なくなりソフト開発の負担を大幅
に軽減できる暴走処理装置を提供できる。
As described above in detail, according to the present invention, one watchdog timer can cope with runaway detection of a plurality of CPUs to simplify the circuit, and the watchdog timer program can be deleted. Therefore, it is possible to provide a runaway processing device that does not require adjustment of the insertion position of the program and can significantly reduce the burden of software development.

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

【図1】本発明の一実施例に係る暴走処理装置の概略的
な構成を示す図。
FIG. 1 is a diagram showing a schematic configuration of a runaway processing device according to an embodiment of the present invention.

【図2】一実施例に係る暴走処理装置の詳細な構成を示
す図。
FIG. 2 is a diagram showing a detailed configuration of a runaway processing device according to an embodiment.

【図3】一実施例におけるウオッチドッグタイマ回路の
構成図。
FIG. 3 is a configuration diagram of a watchdog timer circuit according to an embodiment.

【図4】一実施例におけるスタックチェックを含む割込
み処理を説明するための動作説明図。
FIG. 4 is an operation explanatory diagram for explaining an interrupt process including a stack check according to an embodiment.

【図5】一実施例におけるウオッチドッグタイマ回路の
タイムチャートを示す図。
FIG. 5 is a diagram showing a time chart of the watchdog timer circuit in the embodiment.

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

1,2…CPU、3…デュアルポートRAM、4,5…
入力ポート、6…ウオッチドッグタイマ回路。
1, 2 ... CPU, 3 ... Dual port RAM, 4, 5 ...
Input port, 6 ... Watchdog timer circuit.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 データ伝送が行われる複数のCPU間に
それぞれ設けられ、あるCPUから他のCPUへ伝送す
るデータが書込まれると前記他のCPUへ割込み信号を
出力し、前記他のCPUが前記データを読込むことによ
って前記割込み信号の出力を停止するデュアルポートR
AMと、 前記デュアルポートRAMから出力される割込み信号を
取込み、該割込み信号が予め決められた時間を経過して
も停止しないとき暴走検出信号を出力して暴走した前記
他のCPUの暴走を停止させるウオッチドッグタイマ回
路と、を具備したことを特徴とする暴走処理装置。
1. A CPU is provided between a plurality of CPUs for data transmission, and when data to be transmitted from one CPU to another CPU is written, an interrupt signal is output to the other CPU, and the other CPU is Dual port R that stops the output of the interrupt signal by reading the data
AM and an interrupt signal output from the dual port RAM are taken in, and when the interrupt signal does not stop even after a predetermined time has elapsed, a runaway detection signal is output to stop the runaway of the other CPU that has runaway. A watchdog timer circuit for causing a runaway processing device.
【請求項2】 暴走時の処理プログラムが記憶されてい
るメモリと、各割込みルーチン毎に設けられアクセスし
てきた前記各CPUに割込みルーチン終了後のメインル
ーチンへの帰りアドレスが格納されているスタックのチ
ェックを行わせメインルーチンへ戻れない場合には前記
処理プログラムを実行させる手段と、を具備したことを
特徴とする請求項1記載の暴走処理装置。
2. A memory in which a processing program at the time of a runaway is stored and a stack in which a return address to a main routine after completion of an interrupt routine is stored in each CPU provided for each interrupt routine and accessed The runaway processing apparatus according to claim 1, further comprising: a unit that performs a check and executes the processing program when the process cannot return to the main routine.
JP3051604A 1991-03-15 1991-03-15 Runaway processor Withdrawn JPH05224999A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3051604A JPH05224999A (en) 1991-03-15 1991-03-15 Runaway processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3051604A JPH05224999A (en) 1991-03-15 1991-03-15 Runaway processor

Publications (1)

Publication Number Publication Date
JPH05224999A true JPH05224999A (en) 1993-09-03

Family

ID=12891507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3051604A Withdrawn JPH05224999A (en) 1991-03-15 1991-03-15 Runaway processor

Country Status (1)

Country Link
JP (1) JPH05224999A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009286380A (en) * 2008-06-02 2009-12-10 Honda Motor Co Ltd On-vehicle electronic control device and vehicle with fuel cell
JP2010541105A (en) * 2007-10-04 2010-12-24 オープンピーク インコーポレイテッド Firmware image update and management
JP2015082233A (en) * 2013-10-23 2015-04-27 大日本印刷株式会社 Security token and handler routine execution method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010541105A (en) * 2007-10-04 2010-12-24 オープンピーク インコーポレイテッド Firmware image update and management
JP2009286380A (en) * 2008-06-02 2009-12-10 Honda Motor Co Ltd On-vehicle electronic control device and vehicle with fuel cell
JP2015082233A (en) * 2013-10-23 2015-04-27 大日本印刷株式会社 Security token and handler routine execution method

Similar Documents

Publication Publication Date Title
JP2651916B2 (en) In-circuit emulator
US6065078A (en) Multi-processor element provided with hardware for software debugging
US5664199A (en) Microcomputer free from control of central processing unit (CPU) for receiving and writing instructions into memory independent of and during execution of CPU
EP0084431A2 (en) Monitoring computer systems
JPH02287635A (en) Debugging peripheral equipment for microcomputer,microprocessor and core processor integrated circuit
RU2137182C1 (en) Execution of data processing instruction
US5488728A (en) Microprocessor having a run/stop pin for accessing an idle mode
US20090083736A1 (en) Virtualized computer, monitoring method of the virtualized computer and a computer readable medium thereof
US5678003A (en) Method and system for providing a restartable stop in a multiprocessor system
JPH05224999A (en) Runaway processor
JP2004302731A (en) Information processor and method for trouble diagnosis
JPH07152598A (en) Incircuit emulator
EP0138045A2 (en) Apparatus and method for synchronization of peripheral devices via bus cycle alteration in a microprocessor implemented data processing system
JP4197798B2 (en) Chip with debugging capability
JP2883091B2 (en) Multiprocessor system
JP2654105B2 (en) Microprocessor
JPS60229141A (en) Preserving system of register data
JPH0652013A (en) Tracing circuit
JPH0149975B2 (en)
JPS6158049A (en) Error detection
JPS60193046A (en) Detecting system for instruction exception
JPH03296146A (en) Back-up device for program development
JPS62241041A (en) Information processor
JPS6316338A (en) Microprogram control system
JPS62239242A (en) Debugging device

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: 19980514