JPS5835651A - Stack preventing circuit for programmable device - Google Patents

Stack preventing circuit for programmable device

Info

Publication number
JPS5835651A
JPS5835651A JP56133810A JP13381081A JPS5835651A JP S5835651 A JPS5835651 A JP S5835651A JP 56133810 A JP56133810 A JP 56133810A JP 13381081 A JP13381081 A JP 13381081A JP S5835651 A JPS5835651 A JP S5835651A
Authority
JP
Japan
Prior art keywords
timer
reset
microprocessor
program
programmable device
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
Application number
JP56133810A
Other languages
Japanese (ja)
Inventor
Toshio Yokoyama
横山 利雄
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.)
NEC Corp
Original Assignee
NEC Corp
Nippon Electric 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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP56133810A priority Critical patent/JPS5835651A/en
Publication of JPS5835651A publication Critical patent/JPS5835651A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs

Abstract

PURPOSE:To prevent stacking of a programmable device, by performing the reset operation or the nonmaskable interrupt operation by a microprocessor when a program runs away. CONSTITUTION:When the program processing is executed normally, a timer reset pulse 30 is issued from a decoder 3 at intervals of a prescribed time T2 shorter than a prescribed time T1 of a hardware timer 4, and the timer 4 is reset each time, and the output of the timer 4 is not issued. If the program runs away, the timer 4 is overflowed to output the reset operation to an indicating line after the elapse of the time T1 because the timer reset pulse 30 is not issued from the decoder 3. By this output, a microprocessor 2 performs the reset operation. When this operation is impossible, the timer 4 outputs a nonmaskable interrupt signal of the indicating line, and the processor 2 performs the nonmaskable interrupt operation.

Description

【発明の詳細な説明】 本発明はマイクロプロセ、すを利用したプログラマブル
装置のスタ、り防止回路に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a stall prevention circuit for a programmable device using a microprocessor.

従来電子交換機におけるサービストランク(例えば1加
入者から複数加入者に接続し回報サービスや会議サービ
スを行うマルチアドレスサービストランク)など、主装
置とは独立しているマイクロプロセッサを利用したプロ
グラマブル装置ではメモリの破壊やイリーガルシーケン
スなどの原因によりプログラムが暴走したときは前記マ
イクロプロセッサをリセットすることができず前記プロ
グラマブル装置がスタ、りしてしまうという欠点があっ
た。
Programmable devices that use a microprocessor that is independent of the main device, such as service trunks in conventional electronic exchanges (for example, multi-address service trunks that connect one subscriber to multiple subscribers and provide broadcast services or conference services), require memory storage. When the program runs out of control due to corruption or an illegal sequence, the microprocessor cannot be reset and the programmable device stalls.

本発明の目的はプログラムが暴走したときハードウェア
タイマがオーバフローした後にマイクロプロセ、すがリ
セットまたはノンマスカブル割込を行うことにより上記
の欠点を除去し几プログラマブル装置のスタ、り防止回
路を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a circuit for preventing a programmable device from stalling by eliminating the above-mentioned drawbacks by performing a microprocessor reset or a non-maskable interrupt after a hardware timer overflows when a program runs out of control. It is in.

本発明によるプログラマブル装置のスタ、り防止回路は
、マイクロプロセ、すを利用したプログラマブル装置に
おいて、デコーダおよびハードウェアタイマを備え、プ
ログラムが暴走したとき前記ハードウェアタイマがオー
バフローした後に前記マイクロプロセ、すのリセット動
作およびメンマスカブル割込動作のいずれかを指示する
ことを特徴とする。
A programmable device star-start prevention circuit according to the present invention is a programmable device using a microprocessor, and includes a decoder and a hardware timer, and when the program runs out of control, the microprocessor is stopped after the hardware timer overflows. It is characterized by instructing either a reset operation or a menmaskable interrupt operation.

次に図面を参照して本発明の実施例について説明する。Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明のプログラマブル装置のスタック防止回
路を適用したサービストランクの一実施例金示すブロッ
ク図である。同図において1は主装置金倉して加入者に
サービスを与えるトランク回路、2はトランク回路1と
情報制御線10によ)接続され且つメモリから取り出し
たプログラムの処理実行を入出力vc會に対して行うマ
イクロプロセッサ、3は前記入出力装置のアドレスを設
定し前記プログラム処理実行中タイマリセットパルス3
0を出力するデコーダ、4はクロック源(図示せず)か
らのクロ、り20全カウントするカウンタを有し、また
タイマリセ、トノ(ルス30によりリセットされ、さら
にオーバフローしたときは指示線40を介してマイクロ
プロセ、す2にリセ、ト動作指示またはノンマスカブル
割込動作指示を行うハードウェアタイマ、50,51.
52はマイクロプロセッサ2とデコーダ3と前記メモリ
または前記入出力装置の相互間を接続するそれぞれアド
レス線、データ線、コントロール線である。
FIG. 1 is a block diagram showing an embodiment of a service trunk to which a stack prevention circuit of a programmable device according to the present invention is applied. In the figure, 1 is a trunk circuit that serves as the main unit and provides services to subscribers, and 2 is a trunk circuit that is connected to the trunk circuit 1 (via an information control line 10) and that executes a program taken out from memory to an input/output VC. A microprocessor 3 sets the address of the input/output device and generates a timer reset pulse 3 during execution of the program.
A decoder 4 that outputs 0 has a counter that counts all 20 clocks from a clock source (not shown), and is reset by a timer reset and pulse 30, and furthermore, when an overflow occurs, it is output via an instruction line 40. Hardware timers 50, 51, which instruct the microprocessor to reset, reset, or non-maskable interrupt operations;
Reference numeral 52 denotes an address line, a data line, and a control line, respectively, which connect the microprocessor 2, decoder 3, and the memory or the input/output device.

次に本実施例の動作について説明する。トランク回路l
とマイクロプロセ、す2およびメモリまたは入出力装置
の動作は従来のマイクロプロセッサを利用したサービス
トランクと同様である。すなわちトランク回路lからの
情報によ)マイクロプロセ、す2はアドレス@SOt介
して指定した前記メモリのアドレスのデータを、データ
線51を介して取り出しコントロール線52を介して前
記入出力装置を制御するなどプログラム処理を実行する
。ハードウェアタイマ4を規定時間T1(例えば1秒)
にあらかじめセットしておく、ノ1−ドウェアタイi4
はカウンタを設え前述し友ようにクロック20tl−カ
ウントする。前記プログラム処理が正常に実行されてい
るときはデコーダ3から前記規定時間T1より小さい規
定時間T2(例えば0.5秒)ごとにタイ!リセ?)パ
ルス30が発せられると、その都度ノ1−ドウエアタイ
マ4がリセットされるのでハードウェアタイマ4の出力
はな匹。一方前述のプログラムが暴走したときにデコー
ダ3からタイツリセットパルス30が発セられないので
前記規定時間Tlの経過後ハードウェアタイマ4はオー
バフローし指示線40にリセ、ト信号を出力して、マイ
クロプロセッサ2にリセット動作を指示する。この指示
によりマイクロプロセ、す2はリセット動作を行うので
再開処理ルーチンが走り前記サービストランクはスタ、
りすることがない。もしマイクロブロセ、す2のリセッ
トが不可能な場合、例えばマイクロプロセッサ2の前記
リセット動作により他の正常な入出力装置もリセットさ
れ、処理動作が継続できなくなるなどの場合は、ハード
ウェアタイマ4は指示線40にノンマスカブル割込信号
を出力するので、マイクロプロセ、す2は後述するノン
マスカブル割込動作を行ってプログラム処理が自動再開
し、前記サービストランクはスタックすることがない。
Next, the operation of this embodiment will be explained. trunk circuit l
The operation of the microprocessor, S2, and memory or input/output devices is similar to a conventional microprocessor-based service trunk. That is, based on the information from the trunk circuit 1), the microprocessor 2 retrieves the data at the address of the memory designated via the address @SOt via the data line 51 and controls the input/output device via the control line 52. Executes program processing such as Set hardware timer 4 to specified time T1 (for example, 1 second)
Set the No. 1-Dware Tie i4 in advance.
A counter is provided to count 20tl of clocks as described above. When the program processing is normally executed, the decoder 3 sends a Tie signal every specified time T2 (for example, 0.5 seconds) smaller than the specified time T1! Lyceum? ) Since the hardware timer 4 is reset each time the pulse 30 is issued, the output of the hardware timer 4 is negligible. On the other hand, when the aforementioned program runs out of control, the tights reset pulse 30 is not generated from the decoder 3, so after the specified time Tl has elapsed, the hardware timer 4 overflows and outputs a reset signal to the instruction line 40, and the micro Instructs processor 2 to perform a reset operation. In response to this instruction, the microprocessor S2 performs a reset operation, so the restart processing routine runs and the service trunk is restarted.
There is nothing to do. If it is impossible to reset the microprocessor 2, for example if the reset operation of the microprocessor 2 also resets other normal input/output devices, making it impossible to continue processing, the hardware timer 4 Since the microprocessor 2 outputs a non-maskable interrupt signal to the instruction line 40, the microprocessor 2 performs a non-maskable interrupt operation to be described later, and program processing is automatically restarted, so that the service trunk does not become stuck.

次に第2図(at、 (b)はノンマスカブル割込動作
について説明す、るための図である。同図において、p
o、plはメモリのそれぞれ正常処理プログラムのエリ
ア()LAMま友はROMを使用)1異常処理プログラ
ムのエリア(ROMt−使用)t−示し、a、bはそれ
ぞれマスカブル割込によるスタートアドレス、ノンマス
カブル割込によるスタートアドレスを示す、またDI、
EI はそれぞれディスエーブルインタラブト、イネー
ブルインタラブドを示し、INT、NINT l;jそ
れぞれインタラブド信号(インターバルタイマなどによ
り発生される)、メンマスカブルインタラブド信号を示
す。
Next, FIGS. 2(at) and 2(b) are diagrams for explaining the non-maskable interrupt operation.
o and pl indicate areas of the memory for normal processing programs (LAM and ROM) 1 areas for abnormal processing programs (ROMt), and a and b are the start addresses for maskable interrupts and non-maskable ones, respectively. Indicates the start address due to interrupt, also DI,
EI indicates a disable interrupt and an enable interrupt, respectively, and INT and NINT l;j indicate an interleaved signal (generated by an interval timer or the like) and a maskable interleaved signal, respectively.

マスカブル割込動作では、マイクロプロセ、す内の割込
イネーブルフリップフロップ(図示せず)が一般にイン
ターバルタイマなどにより起動され正常処理プログラム
を実行する。一方ノンマスカブル割込動作では、割込要
求が発生するとマイクロプロセ、す内のプログラムカウ
ンタ(図示せず)により固定的なメモリアドレスが設定
され、このメモリアドレスをスタートアドレスとして異
常処理プログラムを実行する。なおスタック防止回路(
図示せず)の出力をマスカブル割込に入れると、プログ
ラムが暴走したとき前記割込イネーブルフリ、プフロ、
プがディスエーブル状態になる場合があるので前記出力
をマスカブル割込に入れることはできない。
In the maskable interrupt operation, an interrupt enable flip-flop (not shown) in the microprocessor is generally activated by an interval timer or the like to execute a normal processing program. On the other hand, in the non-maskable interrupt operation, when an interrupt request occurs, a fixed memory address is set by a program counter (not shown) in the microprocessor, and an abnormality handling program is executed using this memory address as a start address. Note that the stack prevention circuit (
If the output of the interrupt enable program (not shown) is placed in a maskable interrupt, if the program goes out of control,
The output cannot be placed in a maskable interrupt because the output may be disabled.

まずエリアP1′ftROMにし、プログラム暴走によ
りそのメモリ内容が破壊されないようにしておく。正常
時はディスエーブルインタラブ)DIをスタートアドレ
スaK入れることにより前記正常処理プログラムが実行
され、この処理が終了す′ルトイネーブルインタラプト
EIにより割込可能な状態となり他のプログラム処理が
行われるかまたは空転する(′第2図(b)に点線で示
す)。次にインタラブド信号INTによりスタートアド
レスaにジャンプしく第2図(b>に矢印で示す)上記
の正常処理プログラムを繰返し実行する(正常処理動作
)0%し異常時には、すなわち前記正常処理動作を実行
中に、例えば時点t・でプログラムが暴走する(第2図
(b)に鎖線で示す)と、前記スタック防止回路が働き
前述の規定時間Tlが経過した時点でノンマスカブルイ
ンタラブド信号NINTがスタートアドレスbに入り異
常処理プログラムが実行される(異常処理動作)、この
異常処理動作終了後、エリアpoがROMの場合にはそ
の11゜またエリアPoがRAMの場合にはそのメ皐り
内容が破壊されている恐れがあるので前記正常処理プロ
グラム全エリアPoに再びロードした後、スタートアド
レス直にジャンプしく第2図(b)に矢印で示す)前記
正常処理プログラムを実行する。
First, the area P1' is set to ftROM to prevent its memory contents from being destroyed due to program runaway. The normal processing program is executed by inputting the start address aK to DI (disable interrupt in normal operation), and when this processing is completed, it becomes interruptible by the enable interrupt EI, and other program processing is performed. It spins idly (indicated by the dotted line in Figure 2(b)). Next, jump to the start address a by the interwoven signal INT, and repeatedly execute the above normal processing program (indicated by the arrow in Fig. 2 (b)) (normal processing operation) at 0%, and when there is an abnormality, that is, execute the above normal processing operation. If, for example, the program goes out of control at time t (as shown by the dashed line in FIG. 2(b)), the stack prevention circuit is activated and the non-maskable interwoven signal NINT changes to the start address when the specified time Tl has elapsed. Enter b, and the abnormality processing program is executed (abnormality handling operation). After this abnormality handling operation is completed, if area po is ROM, the contents of the memory will be destroyed. If area po is RAM, the contents of the memory will be destroyed. Therefore, after reloading the normal processing program into all areas Po, the normal processing program is executed by jumping directly to the start address (as indicated by the arrow in FIG. 2(b)).

次に第3図は第1図におけるデコーダおよびハードウェ
アタイマ の一実施例を示すプロ、り図である。アドレ
ス比較回路31ではハードウェアタイマ(カウンタ)4
に割当てられたアドレスとアドレス線50からの入力ア
ドレスとが比較され、この両アドレスが合致したとき出
力32がアンド回路33に与えられる。ま几アンド回路
33には、例えばデータビ、ト0が@1”のときハード
ウェアタイマ4f:リセットするとすれば、データ線5
1を介して前記デー、タビットが与えられる。なおデー
タがドント轡ケアのときはデータ1s51は不要である
。さらにアンド回路33にはコントロール線52f!:
介して入出力装置(ここではハードウェアタイマ4)の
書込み指示が与えられる。アンド回路33Fi上記の3
種の入力(データがドント・ケアのときは2種の入力)
t−アンドし、タイマリセットパルス30にハードウェ
アタイマ4のリセ、ト端子R8Tに与える。ハードウェ
アタイマ(カウンタ)4はクロ、クパルス端子CPの入
力であるクロック20をカウントし、タイマリセットパ
ルス30を受ける都度リセットされる。なお前述のプロ
グラム暴走時にはタイマリセットパルス30が入力され
ないので、ハードウェアタイマ4は前記規定時間Tl経
過後オーバフローしオーバフロ一端子OVPから指示線
40にリセット信号あるtAはノンマスカブル割込信号
を出力する。
Next, FIG. 3 is a diagram showing an embodiment of the decoder and hardware timer in FIG. 1. In the address comparison circuit 31, a hardware timer (counter) 4
The address assigned to address line 50 is compared with the input address from address line 50, and when the two addresses match, output 32 is given to AND circuit 33. For example, if the hardware timer 4f is reset when the data line 0 is @1, the data line 5 is connected to the AND circuit 33.
The data, tabit, is given through 1. Note that when the data is don't care, the data 1s51 is unnecessary. Furthermore, the AND circuit 33 has a control line 52f! :
A write instruction for the input/output device (hardware timer 4 in this case) is given via the input/output device. AND circuit 33Fi above 3
Enter the species (input 2 types if the data is don't care)
t-AND, and the timer reset pulse 30 is applied to reset the hardware timer 4 and to the t terminal R8T. A hardware timer (counter) 4 counts a clock 20 inputted to a clock pulse terminal CP, and is reset each time it receives a timer reset pulse 30. Since the timer reset pulse 30 is not input when the program runs out of control, the hardware timer 4 overflows after the predetermined time Tl has elapsed, and a reset signal tA from the overflow terminal OVP to the instruction line 40 outputs a non-maskable interrupt signal.

以上の説明により明らかなように本発明のプログラマブ
ル装置のスタック防止回路によれば、プログラム処理実
行中プログラムが暴走したときでもマイクロプロセ、す
がリセット動作またはノンマスカブル割込動作を行うこ
とによりプログラム処理が再開され、プログラマブル装
置がスタックするのを防止できるという効果が生じる。
As is clear from the above explanation, according to the stack prevention circuit of the programmable device of the present invention, even if the program runs out of control during program processing, the program processing can be stopped by performing a microprocessor reset operation or a non-maskable interrupt operation. This has the effect of preventing the programmable device from getting stuck.

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

第1図は本発明のプログラマブル装置のスタック防止回
路を適用したサービストランクの一実施例を示すブロッ
ク図、第2図(al、 (blはノンマスカブル割込動
作につき説明するための図、第3図は第1図におけるデ
コーダおよび/S−ドウエアタイマの一実施例を示すプ
ロ、り図である。 1・・・・・・トランク回路、2・・・・・・マイクロ
プロセッサ、3・・・・・・デコーダ、4・・・・・・
ハードウェアタイマ、10・・・・・・情報制御線、2
0・・・・・・クロ、り、30・・・・・・タイマリセ
ットパルス、31・・・・・・アドレス比較回路、32
・・・・・・出力、33・・・・・・アンド回路、40
・・・・・・指示線、50・・・・・・アドレス線、5
1・・・・・・データm、52・・・・・・コントロー
ル線。
FIG. 1 is a block diagram showing an embodiment of a service trunk to which a stack prevention circuit of a programmable device according to the present invention is applied; FIG. 2 is a diagram showing one embodiment of the decoder and /S-ware timer in FIG. 1. 1...Trunk circuit, 2...Microprocessor, 3... ...Decoder, 4...
Hardware timer, 10...Information control line, 2
0...Black, 30...Timer reset pulse, 31...Address comparison circuit, 32
...Output, 33...AND circuit, 40
...Indication line, 50...Address line, 5
1...Data m, 52...Control line.

Claims (1)

【特許請求の範囲】[Claims] マイクロプロセッサを利用したプログラマブル装置にお
いて、デコーダおよびハードウェアタイマを備え、プロ
グラムが暴走したとき前記ハードウェアタイマがオーバ
フローした後に前記マイクロプロセ、すのリセット動作
およびノンマスカブル割込動作のいずれかを指示するこ
とを特徴とするプログラマブル装置のスタック防止回路
A programmable device using a microprocessor, comprising a decoder and a hardware timer, and instructing the microprocessor to perform either a reset operation or a non-maskable interrupt operation after the hardware timer overflows when a program runs out of control. A programmable device stack prevention circuit characterized by:
JP56133810A 1981-08-25 1981-08-25 Stack preventing circuit for programmable device Pending JPS5835651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56133810A JPS5835651A (en) 1981-08-25 1981-08-25 Stack preventing circuit for programmable device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56133810A JPS5835651A (en) 1981-08-25 1981-08-25 Stack preventing circuit for programmable device

Publications (1)

Publication Number Publication Date
JPS5835651A true JPS5835651A (en) 1983-03-02

Family

ID=15113563

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56133810A Pending JPS5835651A (en) 1981-08-25 1981-08-25 Stack preventing circuit for programmable device

Country Status (1)

Country Link
JP (1) JPS5835651A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01173235A (en) * 1987-12-28 1989-07-07 Fujitsu Ltd Detection of mpu runaway

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01173235A (en) * 1987-12-28 1989-07-07 Fujitsu Ltd Detection of mpu runaway

Similar Documents

Publication Publication Date Title
CN109064327B (en) Intelligent contract processing method, device and equipment
JP2625402B2 (en) Microprocessor
JPS5835651A (en) Stack preventing circuit for programmable device
JPS5920061A (en) Watchdog timer
JPS5878239A (en) Operation controlling circuit
JPS5916054A (en) Microprocessor
JPH04205152A (en) Monitor device for controller
GB2030331A (en) Real-time Data Processing System for Processing Time Period Commands
JP2812037B2 (en) Restart control method for business processing programs
JPS642981B2 (en)
JPS603735A (en) Data processing device
JPH0756774A (en) Watching timer
JPS6019802B2 (en) information processing equipment
JPH02224053A (en) Monitoring system for input time of terminal
JPH04275635A (en) Constant cycle processing system
JPS6214235A (en) Information processor
JP2578267B2 (en) Microcomputer system
JPH0531773B2 (en)
JPS607541A (en) Fault end control system under fault end processing
JPS63311442A (en) Multiple operating system
JPH01181295A (en) Runaway informing system
JPH06149592A (en) Interruption processing system for microcomputer
JPS60183647A (en) Watchdog timer
JPS61151494A (en) Timer circuit with password
JPS60252961A (en) Program trouble supervisory device of information processing device