JPS60122437A - Programmable watchdog timer - Google Patents

Programmable watchdog timer

Info

Publication number
JPS60122437A
JPS60122437A JP58229193A JP22919383A JPS60122437A JP S60122437 A JPS60122437 A JP S60122437A JP 58229193 A JP58229193 A JP 58229193A JP 22919383 A JP22919383 A JP 22919383A JP S60122437 A JPS60122437 A JP S60122437A
Authority
JP
Japan
Prior art keywords
time
timer
register
value
minimum
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
JP58229193A
Other languages
Japanese (ja)
Inventor
Hideyuki Shimizu
清水 英行
Teruo Ishikawa
石川 照夫
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.)
Azbil Corp
Original Assignee
Azbil Corp
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 Azbil Corp filed Critical Azbil Corp
Priority to JP58229193A priority Critical patent/JPS60122437A/en
Publication of JPS60122437A publication Critical patent/JPS60122437A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To optimize the setting time by detecting a difference between a set timer time and a data processing execution time during that timer time and renewing and storing a minimum value of the result of detection to check the propriety of the timer time. CONSTITUTION:A processing unit 1 gives timer time data set in response to a data processing scheduled amount of the period to a timer register 6 via a data register 3 and also to a decrement counter 7 depending on the input of a selection signal and a write signal. The detected value being a difference between the set time value and the data processing execution time of the couner 7 is fed to minimum time register 8 and a comparator 9. Then the comparator 9 compares the output value of the counter 7 with the output value of the minimum time register 8 inputted to an input terminal B to renew the minimum value. Then whether or not the set timer time is appropriate is checked.

Description

【発明の詳細な説明】 “〔発明の技術分野〕 本発明は、プロセッサユニットがらのリフレッー 1−
 、へ。
DETAILED DESCRIPTION OF THE INVENTION [Technical field of the invention]
,fart.

シュ信号によりタイマを繰返しリフレッシュし、当該タ
イマのタイムアウトによってプロセッサユニットの暴走
を検出する場合に、各リフレッシュ後のタイマ時間を次
のリフレッシュまでの間におけるプロセッサユニットの
データ処理予定量に対応して設定するようにしたプログ
ラマブル・ウォッチドッグタイマに関する。
When a timer is repeatedly refreshed using a flash signal and a runaway of the processor unit is detected when the timer times out, the timer time after each refresh is set according to the amount of data that the processor unit is scheduled to process until the next refresh. Regarding the programmable watchdog timer.

〔従来技術〕[Prior art]

従来のウォッチドッグタイマでは、そのタイマのリフレ
ッシュは、別のタイマの超勤により定周期で行なうか、
またはプロセッサユニットニおけるデータ処理の進行(
プロセッサユニットの負荷)に応じて適時行なうかして
いるが、いずれもそのリフレッシュ時に設定されるタイ
マ時間は例えばCR回路やディジタルカウンタ等のハー
ドウェアを用いて固定的に定められていた。例えば、プ
ロセッサユニットの進行に応じて適時行なうものとして
、第1図に示すようなプログラムPI、P2゜・拳・な
どをシーケンシャルに実行する場合において、PI、P
2 、P3 、P4を実行した所でニゲ2− ゼクテイププログラムの実行としてリフレッシユヲ行な
い、次いでプログラムPI 、 P5 ′に実行後2回
[1のリフレッシュを行ない、引続きプログラムP6 
、 P7 、 P8の実行に移行するが、プログラムの
開始時点TOおよび各リフレッシュ時TI。
In a conventional watchdog timer, the timer is refreshed periodically by overtime of another timer, or
or the progress of data processing in the processor unit (
In both cases, the timer time set at the time of refreshing is fixedly determined using hardware such as a CR circuit or a digital counter. For example, when sequentially executing programs PI, P2°, fist, etc. as shown in FIG.
After executing programs 2, P3, and P4, perform a refresh as the execution of the next program, then refresh the programs PI and P5' twice after executing [1], and then continue to program P6.
, P7, and P8, but at the program start time TO and at each refresh time TI.

T2 、・・・において設定されるタイマ時間は常に上
記ハードウェアによって定まる一足時間、例えId 2
00m5ecでるる。このため、各リフレッシュ間の区
間内におけるプロセッサユニットのデータ処理量の違い
によって、例えばプログラムP1〜P4実行後に生じた
プロセッサユニットの暴走がタイムアウトによって検出
されるまでの時間t1と、PI 、P5夾行後に生じた
暴走がタイムアウトによって検出されるまでの時間t2
 とに差が住じるとともに、誤ってタイムアウトするの
を避けるために上記タイマ時間は最も負荷の大きい区間
全基準として余裕金もって定めるために、上記tl 、
 t2等はどうしても大きくなりがちでめった。このt
l 、 t2等の時間が大きいということは、暴走可能
時間が長いということであり、その間に破壊されるメモ
リ等の量も大きい。
The timer time set in T2,... is always one step time determined by the above hardware, for example Id2
00m5ec is out. For this reason, due to the difference in the amount of data processed by the processor unit in the interval between each refresh, for example, the time t1 until a runaway of the processor unit that occurs after executing programs P1 to P4 is detected by a timeout, and the Time t2 until later runaway is detected by timeout
In addition, in order to avoid erroneous timeouts, the timer time is determined with a margin based on the entire section with the heaviest load.
t2 etc. inevitably tended to be large and were rare. This t
A long time such as 1, t2, etc. means a long runaway time, and a large amount of memory etc. is destroyed during that time.

このため、各リフレッシュ後のタイマ時間をプログラマ
ブルにすることが考えられるが、その場合でも、各プロ
グラムの実行内容やエグゼクティブプログラムの処理方
法などによって、tl、t2等の残9時間はまちまちと
なり、しかもその実際の値はプログラムを実行してみな
いとわからない。
For this reason, it is conceivable to make the timer time after each refresh programmable, but even in that case, the remaining nine hours such as tl and t2 will vary depending on the execution content of each program and the processing method of the executive program. You won't know its actual value until you run the program.

もし設定したタイマ時間が、その間のデータ処理量に対
してぎりぎジでろつ斤とすると、その期間内に何らかの
特別な処理、例えば割込み処理などが入った場合ウォッ
チドッグタイマはタイムアウトしてしまう。
If the set timer time is just barely adequate for the amount of data processed during that time, the watchdog timer will time out if some special processing, such as interrupt processing, occurs within that period.

〔発明の目的および構成〕[Object and structure of the invention]

本発明はこのような事情に鑑みてなされたもので、その
目的は、設定したタイマ時間が適切な値でめったか否か
全チェックすることが可能なプログラマブルOウォッチ
ドッグタイマfil供することにある。
The present invention has been made in view of the above circumstances, and its purpose is to provide a programmable watchdog timer fil that can check whether or not the set timer time has rarely reached an appropriate value.

このような目的全達成するために、本発明は設定された
タイマ時間とその間のデータ処理実行時間との差を検出
する手段と、各区間の検出結果の最小値を更新記憶する
手段とを設けたものである。
In order to achieve all of these objectives, the present invention is provided with means for detecting the difference between the set timer time and the data processing execution time during that time, and means for updating and storing the minimum value of the detection results for each section. It is something that

以下実施例を用いて本発明の詳細な説明する。The present invention will be described in detail below using Examples.

〔笑施例〕[LOL example]

第2図は本発明の一実施例を示すブロック図でろる。図
において、1は周知のCPUもしくはマイクロプロセッ
サユニット等のプロセッサユニット、2(’1プロセッ
サユニット1のアドレスドライバとしてのアドレスレジ
スタ、3は同じくプロセッサユニット1のデータバッフ
ァとしてのデータレジスタ、4はアドレスレジスタから
の信号によりセレクト信号を出力するアドレスデコーダ
、5はリード、/ライトm号および例えばクリア信号な
ど他の特別な制御信号全出力する制御信号発生回路、6
けタイマレジスタでろる。
FIG. 2 is a block diagram showing one embodiment of the present invention. In the figure, 1 is a processor unit such as a well-known CPU or microprocessor unit, 2 ('1 is an address register as an address driver of the processor unit 1, 3 is a data register as a data buffer of the processor unit 1, and 4 is an address register. 5 is a control signal generating circuit that outputs all read, /write, and other special control signals such as clear signals; 6;
Enter the timer register.

上記構成において、タイマ時間は、プロセッサユニット
1によ□り設定される。すなわち、プロセッサユニット
1は、その区間のデータ処理予定量に応じて尚該処理予
定量が多いほど大きいタイマ時間に対応したデータをデ
ータレジスタ3を介してタイマレジスタ6に供給すると
ともに、アドレスレジスタ2およびアドレスデコーダ4
vi−介してセレクト信号を、制御信号発生回路5を介
してライト信号を送出する。これらセレクトa号および
ライト信号の入力によりタイマレジスタ6は上記タイマ
時間のデータが取込まれ、同じくセレクト信号およびラ
イト信号の入力によりデクリメントカウンタ7に再設定
される。
In the above configuration, the timer time is set by the processor unit 1. That is, the processor unit 1 supplies data corresponding to a larger timer time to the timer register 6 via the data register 3 according to the amount of data to be processed in that section, and the larger the amount of data to be processed is to the timer register 6 via the data register 3. and address decoder 4
A select signal is sent out through the control signal generation circuit 5, and a write signal is sent out through the control signal generation circuit 5. By inputting the select signal a and the write signal, the timer register 6 takes in the data of the timer time, and also by inputting the select signal and the write signal, the data is reset in the decrement counter 7.

デクリメントカウンタTは、上記タイマ時間のデータを
設定した後、クロック信号CLの入力ごとにその内容全
1ずつデクリメントして行く。プロセッサユニット1は
、正常動作を続けている限り、上記タイマ時間より短い
周期でリフレッシュ信号(ライト信号)を送出するため
、デクリメントカウンタ7にはそのたびにタイマレジス
タ6t−介して新たなタイマ時間が設定され、その限り
でデクリメントカウンタ7の内容は「0」とはならず、
シタがってタイムアラトラ示す出力OUTも送出されな
い。
After setting the timer time data, the decrement counter T decrements its contents by 1 every time the clock signal CL is input. As long as the processor unit 1 continues to operate normally, it sends out a refresh signal (write signal) at a cycle shorter than the above-mentioned timer time. The contents of the decrement counter 7 will not become "0" as long as it is set.
The output OUT indicating the time delay is also not sent out.

デクリメントカウンタ7の内容は、最小時間しジスタ8
およびコンパレータ9のA入力端子に供給される。ここ
で、最小時間レジスタ8は、プロセッサユニット171
)ら制御信号発生回路5を介して供給されるクリア信号
により初期値として最大値が供給されている。これに対
しコンパレータ9は、上記デクリメントカウンタ7の出
力値とB入力端子に入力される最小時間レジスタ8の出
力値と全比較し、前者が後者より小さいときに出力値k
”l”とする。その結果、インバータ10會介してクロ
ック信号CLが入力した時にアンド回路11から最小時
間レジスタ8にイネーブル信号が入力されるため、その
時のデクリメントカウンタ7の内容が取込まれる。この
様子を第3図に示す。
The contents of decrement counter 7 are the minimum time and register 8
and is supplied to the A input terminal of comparator 9. Here, the minimum time register 8 is the processor unit 171
), the maximum value is supplied as an initial value by a clear signal supplied via the control signal generation circuit 5. On the other hand, the comparator 9 compares the output value of the decrement counter 7 with the output value of the minimum time register 8 inputted to the B input terminal, and when the former is smaller than the latter, the output value k
Let it be "l". As a result, when the clock signal CL is input through the inverter 10, the enable signal is input from the AND circuit 11 to the minimum time register 8, so that the contents of the decrement counter 7 at that time are taken in. This situation is shown in FIG.

第3図(a)はクロック信号、同図(b)はコンパレー
タ9の出力信号、同図(c)はアンド回路11の出力信
号全示し、■がデクリメントカウンタ7をデクリメント
するタイミング、■が最小時間レジスタ8全リフレツシ
ユするタイミングを示す。
FIG. 3(a) shows the clock signal, FIG. 3(b) shows the output signal of the comparator 9, FIG. 3(c) shows all the output signals of the AND circuit 11, ■ is the timing to decrement the decrement counter 7, This shows the timing for refreshing the entire time register 8.

このようにして最小時間レジスタ8は、常にデクリメン
トカウンタ7の最小値、すなわち第4図7− において設定されたタイマ時間とプロセッサユニット1
のデータ処理実行時間との差tl 、 t2 。
In this way, the minimum time register 8 always records the minimum value of the decrement counter 7, i.e. the timer time set in FIG.
The difference between the data processing execution time of tl and t2.

t3.・・◆の最小値全保持することとなる。t3. ...The minimum value of ◆ will be kept.

この最小値は、プロセッサユニット1においてバッファ
12′fr:介して読出すことができる。すなわち、ア
ドレスデコーダ4を介して供給されるセレクト信号と制
御信号発生回路5から供給されるリード信号とによりバ
ッファ12は出力イネーブルとなり、最小時間レジスタ
8から取込んだ値上データバスに送出する。したがって
、この値全監視することにより、タイマ時間の設定値が
適切に保たれているか否か全チェックすることができる
This minimum value can be read out in the processor unit 1 via the buffer 12'fr:. That is, the buffer 12 becomes output enabled by the select signal supplied via the address decoder 4 and the read signal supplied from the control signal generation circuit 5, and sends the value fetched from the minimum time register 8 to the data bus. Therefore, by monitoring all of these values, it is possible to check whether or not the set value of the timer time is maintained appropriately.

なお、上述(−た実施例においては、設定したタイマ時
間とデータ処理実行時間との差音検出する手段としてデ
クリメントカウンタγを用い、またその最小値を更新記
憶する手段として最小時間レジスタ8およびコンパレー
タ9を用いたが、本発明はこれに限定されるものではな
く、例えば上記時間差の算定あるいは最小値の比較など
、プロセッサユニット1におけるソフト的な処理によっ
て 8− 行なってもよいことはもちろんでるる。
In the embodiments described above, the decrement counter γ is used as a means for detecting the difference between the set timer time and the data processing execution time, and the minimum time register 8 and the comparator are used as means for updating and storing the minimum value. 9 was used, but the present invention is not limited to this, and it is of course possible to perform the calculation of the above-mentioned time difference or the comparison of the minimum value by software processing in the processor unit 1. .

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、設定されたタイ
マ時間とその間のデータ処理実行時間との差を検出する
手段と、検出結果の最小値上更新記憶する手段とを設け
たことにより、設定したタイム時間が適切なものでめっ
たか否か全チェックすることができ、設定時間の最適化
がはかれる利点がめる。
As explained above, according to the present invention, by providing means for detecting the difference between the set timer time and the data processing execution time during that time, and means for updating and storing the detected result above the minimum value, It is possible to check whether or not the set time is appropriate, and the set time can be optimized.

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

第1図は従来のウォッチドッグタイ妥におけるタイマ時
間とデータ処理時間との関係?示す図、第2図は本発明
の一冥施例會示すブロック図、第3図は最小時間レジス
タの更新動作音説明するためのタイムチャート、第4図
はタイマ時間とデータ処理時間との関係を示す図でるる
。 1・・拳・プロセッサユニット、6e・・−タイマレジ
スタ、T・・・・デクリメントカウンタ、8−・・・最
小時間レジスタ、9・e拳・コンパレータ。 第1図 第4図 甲 平100m54 150mSeC−暮+、200m5ec −−→1 :
: + j12: m:「 第2図 第3図 (b) A<8−m: 「−− II II II 11 ( −L−m−」 +A−
Figure 1 shows the relationship between timer time and data processing time in the conventional watchdog tie system. 2 is a block diagram showing an example of the present invention, FIG. 3 is a time chart for explaining the update operation sound of the minimum time register, and FIG. 4 is a diagram showing the relationship between timer time and data processing time. The diagram shown is Ruru. 1: Fist processor unit, 6e: Timer register, T: Decrement counter, 8: Minimum time register, 9: e Fist comparator. Figure 1 Figure 4 A flat 100m54 150mSeC-gure+, 200m5ec--→1:
: + j12: m: "Figure 2 Figure 3 (b) A<8-m: "-- II II II 11 (-L-m-" +A-

Claims (1)

【特許請求の範囲】[Claims] 、プロセッサユニット71)らのリフレッシュ何カによ
りタイマを繰返しリフレッシュし、当該タイマのタイム
アウトによってプロセッサユニットの暴走を検出するウ
ォッチドッグタイマにおいて、上記タイマの各リフレッ
シュ後のタイマ時間を当該リフレッシュから次のリフレ
ッシュまでの区間におけるプロセッサユニットのデータ
処理予定量に対応して設定する手段と、設定されたタイ
マ時間と当該区間におけるプロセッサユニットのデータ
処理実行時間との差を検出する手段と、各区間における
検出結果の最小値を更新記憶する手段とを設けたこと全
特徴とするプログラマブル・ウォッチドッグタイマ。
, the processor unit 71), etc. In a watchdog timer that repeatedly refreshes a timer and detects runaway of the processor unit when the timer times out, the timer time after each refresh of the timer is changed from the current refresh to the next refresh. means for setting according to the scheduled data processing amount of the processor unit in the interval up to, means for detecting the difference between the set timer time and the data processing execution time of the processor unit in the interval, and the detection result in each interval. A programmable watchdog timer, comprising means for updating and storing the minimum value of .
JP58229193A 1983-12-06 1983-12-06 Programmable watchdog timer Pending JPS60122437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58229193A JPS60122437A (en) 1983-12-06 1983-12-06 Programmable watchdog timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58229193A JPS60122437A (en) 1983-12-06 1983-12-06 Programmable watchdog timer

Publications (1)

Publication Number Publication Date
JPS60122437A true JPS60122437A (en) 1985-06-29

Family

ID=16888260

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58229193A Pending JPS60122437A (en) 1983-12-06 1983-12-06 Programmable watchdog timer

Country Status (1)

Country Link
JP (1) JPS60122437A (en)

Similar Documents

Publication Publication Date Title
JPH0743653B2 (en) Interrupt controller
JPH05324452A (en) External memory interface circuit
JPS62262685A (en) Speed control system for ac motor
JPS60122437A (en) Programmable watchdog timer
JPH0573296A (en) Microcomputer
JPS6054054A (en) Detection for program runaway
JP2557785Y2 (en) Single chip microcomputer
JPS60122436A (en) Programmable watchdog timer
JPH05324497A (en) Real-time data processor
JP2981275B2 (en) Programmable controller
JPH05120155A (en) Microprogram controller
JP2721611B2 (en) Programmable controller
JP3089866B2 (en) Emulation circuit
JP2565590B2 (en) Data processing device
JPH05134779A (en) Calender ic correction method
JPH0450616B2 (en)
JPS6128144A (en) Executing device of tracing
JPH03246603A (en) Rapid counter
JPS63316146A (en) Microcomputer
JPS59160896A (en) Detection and correction system of memory error
JPH0120778B2 (en)
JPH0767288B2 (en) Gate pulse controller for thyristor inverter
JPH06139153A (en) Memory control system
JPS60196849A (en) Method for detecting runaway of microprocessor
JPH03263127A (en) Instruction execution control system