JPS60132221A - Abnormality detecting method of clock pulse - Google Patents

Abnormality detecting method of clock pulse

Info

Publication number
JPS60132221A
JPS60132221A JP58238747A JP23874783A JPS60132221A JP S60132221 A JPS60132221 A JP S60132221A JP 58238747 A JP58238747 A JP 58238747A JP 23874783 A JP23874783 A JP 23874783A JP S60132221 A JPS60132221 A JP S60132221A
Authority
JP
Japan
Prior art keywords
clock pulse
pulse
gate
count value
frequency
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
JP58238747A
Other languages
Japanese (ja)
Inventor
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 JP58238747A priority Critical patent/JPS60132221A/en
Publication of JPS60132221A publication Critical patent/JPS60132221A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To take easily measures against an unstable or incorrect operation of a CPU due to a frequency variation of a clock pulse by detecting a frequency abnormality of the clock pulse. CONSTITUTION:A test routine is provided on a part of a program, and in accordance with it, a counter is constituted in a CPU2, a clock pulse CK is divided by a frequency divider 4 and a clock pulse LCK is counted. This counting is executed only in a period in which a gate pulse SO is given. That is to say, when an address designating signal AD for generating a decoding output Q3 and a write signal WR are sent out, an output of an AND gate 8c is converted to ''H'', by which a pulse generator 9 genertes as ''H'' a gate pulse of a prescribed time width. In accordance with the end of the gate pulse SO, a count value of this time is compared with the upper limit frequency value and the lower limit frequency value of the divided clock pulse LCK, and in accordance with it, whether the frequencyh of the clock pulse CK is abnormal of normal is decided, and if it is abnormal, an operation of the CPU2 is stopped, or a measure for sending out an alarm, etc. is executed.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、プロセッサの動作規制に用いられるクロック
パルスの周波数が規定範囲外となったことを検出する方
法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a method for detecting that the frequency of a clock pulse used to regulate the operation of a processor is outside a specified range.

〔従来技術〕[Prior art]

プロセッサの動作規制には一定周波数のクロックパルス
が用いられておシ、これの発生には水晶発振器が一般に
使用され、クロックパルスの周波数を安定なものとして
いるが、何等かの原因によシ周波数が変化すると、プロ
セッサによるブ四グラムの実行速度も変化し、外部機器
九対する制御上のタイミングが不一致とな如、制御状況
が不安定になると共に、プロセッサが時間的な制御を行
なっている場合には、これが不正確になる等の問題を生
ずる。
A clock pulse with a constant frequency is used to regulate the operation of a processor, and a crystal oscillator is generally used to generate this clock pulse to keep the frequency of the clock pulse stable, but for some reason the frequency may change. When this changes, the execution speed of the program by the processor also changes, and the control situation becomes unstable, as the control timing for external devices becomes inconsistent, and if the processor is performing temporal control. This causes problems such as inaccuracy.

しかし、従来は、プロセッサの動作状況は監視を行なっ
ているが、クロックパルスの周波数に対する監視を行な
っておらず、クロックパルスの異常に基づく前述の諸問
題を発見するのが困難となる欠点を生じている。
However, in the past, although the operating status of the processor was monitored, the clock pulse frequency was not monitored, which resulted in the drawback that it was difficult to discover the aforementioned problems caused by abnormal clock pulses. ing.

〔発明の概要〕[Summary of the invention]

本発明は、従来のか\る欠点を根本的に排除する目的を
有し、クロックパルスをカウントするカウンタをプロセ
ッサ中へ構成すると共に、一定時間幅のゲートパルスを
発生するパルス発生器をプロセッサによシ駆動し、この
ゲートパルスがプロセッサへ与えられている期間、カウ
ンタにカウントを行なわせ、このカウント値に基づいて
クロックパルスの周波数が上限値以上または下限値以下
であるか否かを判断するものとした極めて効果的な、ク
ロックパルスの異常検出方法を提供するものである。
The present invention aims to fundamentally eliminate the drawbacks of the conventional technology, and includes a counter that counts clock pulses in the processor, and a pulse generator that generates gate pulses with a fixed time width in the processor. The clock pulse is driven by a clock pulse, and while this gate pulse is given to the processor, the counter is counted, and based on this count value, it is determined whether the frequency of the clock pulse is above the upper limit value or below the lower limit value. The present invention provides an extremely effective method for detecting abnormalities in clock pulses.

〔実施例〕〔Example〕

以下、実施例を示す図によって本発明の詳細な説明する
Hereinafter, the present invention will be explained in detail with reference to figures showing examples.

第1図はブロック図を示し、水晶発振器等の発振器1か
らのクロックパルスCKがマイクロブqセッサ等のプロ
セッサ(以下、CPU)2へ与えられ、これに基づいて
CPU2が動作のタイミングを規制されておシ、メモリ
3へ格納されたプログラムを実行すると共に、必要とす
るデータをメモリ3へアクセスしながら制御またはデー
タ処理動作を行なうものとなっている。
FIG. 1 shows a block diagram in which a clock pulse CK from an oscillator 1 such as a crystal oscillator is given to a processor (hereinafter referred to as CPU) 2 such as a microprocessor, and based on this, the timing of the operation of the CPU 2 is regulated. In addition, it executes the program stored in the memory 3 and performs control or data processing operations while accessing necessary data to the memory 3.

また、プログラムの一部にテストルーテンが設けてアシ
、これに応じてCPU2内にカウンタが構成され、クロ
ックパルスCKを分周器4にょ)分周した分周クロック
パルスLCKのカウントを行なうものとなっているが、
このカウントは、ゲートパルスS0の与えられている期
間のみ行なわれる。
In addition, a test routine is provided as a part of the program, and a counter is configured in the CPU 2 according to the test routine to count the divided clock pulse LCK obtained by dividing the clock pulse CK by the frequency divider 4. However,
This counting is performed only during the period when the gate pulse S0 is applied.

一方、CPU 2は、テストルーチンの実行にょ夛、ア
ドレスバス5からアドレス指定信号ADを送出すると共
に、書込み信号WRの送出を行ない、アドレス指定信号
ADの内容を変更しながらこれを反復するものとなって
おシ、アドレス指定信号ADの内容に応じ、デコーダ6
がデコード出力。、〜Q3を順次に′H″(高レベル)
として生ずると共に、書込み信号WRは、バッファ回路
1を介し1H″として各部へ与えられるものとなってい
る。
On the other hand, while executing the test routine, the CPU 2 sends out the address designation signal AD from the address bus 5 and also sends out the write signal WR, and repeats this while changing the contents of the address designation signal AD. Then, depending on the contents of the address designation signal AD, the decoder 6
is the decoded output. ,~Q3 sequentially 'H'' (high level)
At the same time, the write signal WR is applied to each section as 1H'' via the buffer circuit 1.

第2図は、テストルーテンに応するCPU2の制御状況
を示すフローチャートであ)、まず、デコード出力Q+
を生じさせるアドレス指定信号ADと書込み信号WRと
を送出すると、ANDゲ−)8aの出力力いH“となシ
、単安定マルチバイブレータ等のパルス発生器9がリセ
ットされると共に、フリップフロップ回路(以下、FF
C)10もリセットされ、1イニシヤライズ′101が
なされ、つぎに。
FIG. 2 is a flowchart showing the control status of the CPU 2 according to the test routine). First, the decode output Q+
When the address designation signal AD and write signal WR are sent, the output of the AND gate 8a becomes H", the pulse generator 9 such as a monostable multivibrator is reset, and the flip-flop circuit is reset. (Hereinafter, FF
C) 10 is also reset, 1 initialization '101 is performed, and then.

デコード出力Q2を生じさせるアドレス指定信号ADと
書込み信号WRとを送出することによ、9.ANDゲー
ト8bの出力力いH′となp’FFcセッビ102が行
なわれる。
9. by sending an addressing signal AD and a write signal WR which produce a decode output Q2; When the output voltage of the AND gate 8b becomes H', the p'FFc setting 102 is performed.

すると、FFC10の出力Qが′″H#へ転じ、 AN
Dゲート11がオン状態となシ、ゲートパルスS0の送
出準備が行なわれる。
Then, the output Q of FFC10 changes to ``H#'', and AN
While the D gate 11 is in the on state, preparations are made to send out the gate pulse S0.

たソし、とのときは未だパルス発生器9が駆動されてお
らず、ゲートパルスS0カ” ’ L ”(低レベル)
であるため、 5O=L?“103のチェックを行ない
、これのy (YES)に応じ、デコード出力Qsを生
じさせるアドレス指定信号ADと書込み信号WRとを送
出すれば、ANDゲート8cの出力が′H″へ転じ、こ
れによって1パルス発生器駆動″104がなされ、パル
ス発生器9が一定時間幅のゲートパルスを′H″として
発生するため、ゲートパルスSOが′H#となυ、’5
O=H?’105のYに応じ、CPU 2内のカウンタ
によシ分周りロックパルス’LCKカウント“106を
1ステップ行なったうえ、’5O=L?’107のN 
(No )および、カウンタのカウント値Cと1分周ク
ロックパルスLCKの周波数上限値と対応する上限カウ
ント値Cuとの比較″’C〉cu?’108ONを前提
とし、ステップ10G以降を反復する。
At this time, the pulse generator 9 is not yet driven and the gate pulse S0 is "L" (low level).
Therefore, 5O=L? 103 is checked, and in response to y (YES), the address designation signal AD and write signal WR that generate the decode output Qs are sent out, and the output of the AND gate 8c changes to 'H', thereby 1 pulse generator drive ``104'' is performed, and the pulse generator 9 generates a gate pulse with a constant time width as ``H'', so that the gate pulse SO becomes ``H#'' υ, ``5''.
O=H? In response to the Y of '105, the counter in the CPU 2 performs one step of the lock pulse 'LCK count'106, and then outputs the N of '5O=L?'107.
(No), and the comparison between the count value C of the counter, the frequency upper limit value of the frequency-divided clock pulse LCK, and the corresponding upper limit count value Cu is premised on ``'C>cu?''108ON, and steps 10G and subsequent steps are repeated.

ゲートパルスSOの終了に応じ、ステップ107がYと
なれば、カウンタによるカウントが停止され、このとき
のカウント値Cと、分周クロックパルスLCKの周波数
下限値と対応する下限カウント値Cdとの比較′CくC
d? “109がなされ、これがNであればテストルー
チンを終了し、主ルーテンへ復帰する。
When step 107 becomes Y in response to the end of the gate pulse SO, counting by the counter is stopped, and the count value C at this time is compared with the lower limit count value Cd corresponding to the frequency lower limit value of the frequency-divided clock pulse LCK. 'C C
d? “109 is performed, and if it is N, the test routine is ended and the process returns to the main routine.

以上に対し、ステップ103 、105のN、および、
ステップ108,109のYでは’ ERROR’とな
シ、ステップ108,109のYによシ、カウント値が
上限カウント値以上−または下限カウント値以下となっ
たことの検出がなされ、これにしたがって、クロックパ
ルスCKの周波数が異常であることの判断を行なうこと
ができるため、この判断に応じ、CPU2の動作停止、
または、警報送出等の対処が自在となる。
Regarding the above, N in steps 103 and 105, and
At Y in steps 108 and 109, it is detected that the count value is greater than or equal to the upper limit count value or less than the lower limit count value. Since it can be determined that the frequency of the clock pulse CK is abnormal, the operation of the CPU 2 may be stopped or
Alternatively, it becomes possible to take measures such as sending out a warning.

たソし、条件に応じては分周器4を省略し、クロックパ
ルスCKを直接カウントしてもよく、テストルーチン専
用の出カポLトおよび入力ポートを設けられる場合は、
書込み信号WRの代りに別途のタイミング信号を送出す
るものとし、バンファ回路7、FFCl01ANDゲー
ト111等を省略しても同様でちゃ1分周クロックLC
Kを割込み信号として用い、これに応じてテストルーチ
ンを実行し、他のプログラムと並列処理を行なうものと
してもよい等、種々の変形が自在である。
However, depending on the conditions, the frequency divider 4 may be omitted and the clock pulses CK may be directly counted. If an output port and an input port exclusively for the test routine are provided,
A separate timing signal is sent instead of the write signal WR, and even if the bumper circuit 7, FFCl01AND gate 111, etc. are omitted, the same result will occur.
Various modifications are possible, such as using K as an interrupt signal, executing a test routine in response, and performing parallel processing with other programs.

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

以上の説明によシ明らかなとおり本発明によれば、簡単
な回路の付加によ見クロックパルスの周波数異常が検出
され、クロックパルスの周波数変化によるCPU動作の
不安定寸たは不正確に対する処置が容易に行なえるもの
となり、各種プロセッサのクロックパルス周波数を監視
する目的上、顕著な効果が得られる。
As is clear from the above description, according to the present invention, an abnormality in the frequency of the clock pulse can be detected by adding a simple circuit, and measures can be taken against instability or inaccuracy in the CPU operation due to changes in the frequency of the clock pulse. can be easily performed, and a remarkable effect can be obtained for the purpose of monitoring the clock pulse frequencies of various processors.

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

図は本発明の実施例を示し、第1図はプロンク図、第2
図はCPUの制御状況を示すフローチャートである。 1・・・・発振器、2・・・・CPU(プロセッサ)、
4・・・・分周器、6・・・・デコーダ、9・・・・パ
ルス発生f5. CK・・・・クロックパルス、LCK
・・・・分周クロックパルス、SO・・・eゲートパル
ス。 特許出願人 山武ハネウェル株式会社
The figures show embodiments of the present invention, with Figure 1 being a Pronk diagram and Figure 2 being a Pronk diagram.
The figure is a flowchart showing the control status of the CPU. 1... Oscillator, 2... CPU (processor),
4... Frequency divider, 6... Decoder, 9... Pulse generation f5. CK...Clock pulse, LCK
...Divided clock pulse, SO...e gate pulse. Patent applicant Yamatake Honeywell Co., Ltd.

Claims (1)

【特許請求の範囲】[Claims] 与えられるクロックパルスをカウントするカウンタをプ
ロセッサ中へ構成し、該プロセッサによシ一定時間幅の
ゲートパルスを発生するパルス発生器を駆動し、前記ゲ
ートパルスが前記プロセッサへ与えられている期間前記
カウンタによるカウントを行なうと共に、該カウントに
よるカウント値と前記クロックパルスの周波数キ限値と
対応する上限カウント値とを比較し、前記カウント値が
上限カウント値以上となったとき異常と判断し、かつ、
前記ゲートパルスの終了に応じて前記カウント値と前記
クロックパルスの周波数下限値と対応する下限カウント
値とを比較し、前記カウント値が下限カウント値以下で
あったとき異常と判断することを特徴としたクロックパ
ルスの異常検出方法。
A counter for counting applied clock pulses is configured in the processor, the processor drives a pulse generator that generates a gate pulse of a constant time width, and the counter is configured to count the applied clock pulses during the period when the gate pulse is applied to the processor. , and compares the counted value with an upper limit count value corresponding to the frequency key limit value of the clock pulse, and determines that there is an abnormality when the count value exceeds the upper limit count value, and
The count value is compared with a lower limit count value corresponding to a frequency lower limit value of the clock pulse in response to the end of the gate pulse, and when the count value is less than or equal to the lower limit count value, an abnormality is determined. A method for detecting abnormalities in clock pulses.
JP58238747A 1983-12-20 1983-12-20 Abnormality detecting method of clock pulse Pending JPS60132221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58238747A JPS60132221A (en) 1983-12-20 1983-12-20 Abnormality detecting method of clock pulse

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58238747A JPS60132221A (en) 1983-12-20 1983-12-20 Abnormality detecting method of clock pulse

Publications (1)

Publication Number Publication Date
JPS60132221A true JPS60132221A (en) 1985-07-15

Family

ID=17034654

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58238747A Pending JPS60132221A (en) 1983-12-20 1983-12-20 Abnormality detecting method of clock pulse

Country Status (1)

Country Link
JP (1) JPS60132221A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01255044A (en) * 1988-04-05 1989-10-11 Sanyo Electric Co Ltd System for protecting runaway of microprocessor
JPH0916281A (en) * 1995-06-02 1997-01-17 United Microelectron Corp Operation suppressor of ic chip
JP2006172202A (en) * 2004-12-16 2006-06-29 Nec Electronics Corp Semiconductor device
JP2008149159A (en) * 2008-02-01 2008-07-03 Daiichi Shokai Co Ltd Control device of game machine
JP2008259103A (en) * 2007-04-09 2008-10-23 Hitachi Ltd Means for detecting abnormality of carrier wave frequency

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5757328A (en) * 1980-09-22 1982-04-06 Fujitsu Ltd Inspecting system of clock pulse
JPS58105357A (en) * 1981-12-17 1983-06-23 Fuji Xerox Co Ltd Clock diagnosing device of copying machine
JPS58176726A (en) * 1982-04-09 1983-10-17 Toshiba Corp Detector of bus fault

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5757328A (en) * 1980-09-22 1982-04-06 Fujitsu Ltd Inspecting system of clock pulse
JPS58105357A (en) * 1981-12-17 1983-06-23 Fuji Xerox Co Ltd Clock diagnosing device of copying machine
JPS58176726A (en) * 1982-04-09 1983-10-17 Toshiba Corp Detector of bus fault

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01255044A (en) * 1988-04-05 1989-10-11 Sanyo Electric Co Ltd System for protecting runaway of microprocessor
JPH0916281A (en) * 1995-06-02 1997-01-17 United Microelectron Corp Operation suppressor of ic chip
JP2006172202A (en) * 2004-12-16 2006-06-29 Nec Electronics Corp Semiconductor device
JP2008259103A (en) * 2007-04-09 2008-10-23 Hitachi Ltd Means for detecting abnormality of carrier wave frequency
JP2008149159A (en) * 2008-02-01 2008-07-03 Daiichi Shokai Co Ltd Control device of game machine

Similar Documents

Publication Publication Date Title
JPS60132221A (en) Abnormality detecting method of clock pulse
JPS62197838A (en) Watchdog timer controller
JPS6051141B2 (en) Program runaway detection method
JP2001092692A (en) Circuit and method for measuring time
JPS622685Y2 (en)
JPH0465410B2 (en)
JPH10228397A (en) Watchdog timer
JPH09198280A (en) Method for generating pulse for system monitoring and real time operating system provided with pulse generation function for monitoring
JPS5937880Y2 (en) Abnormality monitoring device
JP2000035903A (en) Runaway monitoring device for microcomputer
JP2742371B2 (en) Motor start circuit in microcomputer servo system of VTR
JPS63245740A (en) Microprocessor
JPH05257750A (en) Watchdog timer control circuit
JPS6028986Y2 (en) data processing equipment
JP2557785Y2 (en) Single chip microcomputer
JP4083954B2 (en) Anomaly monitoring apparatus and anomaly monitoring method
JPH0363776B2 (en)
JPS60196849A (en) Method for detecting runaway of microprocessor
JPS62152048A (en) Monitor circuit for runaway
JPS6310444B2 (en)
JPS5819097B2 (en) Computer system monitoring method
JPH05342059A (en) Abnormality monitoring method for micro-processor and circuit for realizing the method
JPS62623B2 (en)
JPH02259845A (en) Processor
JPH0223435A (en) Microcomputer