JPH0744417A - Test circuit for microcomputer - Google Patents

Test circuit for microcomputer

Info

Publication number
JPH0744417A
JPH0744417A JP5184767A JP18476793A JPH0744417A JP H0744417 A JPH0744417 A JP H0744417A JP 5184767 A JP5184767 A JP 5184767A JP 18476793 A JP18476793 A JP 18476793A JP H0744417 A JPH0744417 A JP H0744417A
Authority
JP
Japan
Prior art keywords
clock
circuit
signal
test
reset
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
JP5184767A
Other languages
Japanese (ja)
Inventor
Hisashi Tonai
久志 藤内
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.)
Oki Electric Industry Co Ltd
Oki Micro Design Miyazaki Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Oki Micro Design Miyazaki 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 Oki Electric Industry Co Ltd, Oki Micro Design Miyazaki Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP5184767A priority Critical patent/JPH0744417A/en
Publication of JPH0744417A publication Critical patent/JPH0744417A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To reduce the scale of the test circuit, to simplify the test method and to remarkably reduce the test time. CONSTITUTION:When a select signal generating circuit 40 and an n-bit counter 30 are reset by a reset signal RESET, a select signal S40 outputted from an RS F/F 42 goes to an L level, a select circuit 50 selects a clock TBCCLK and the n-bit counter 30 is counted up by a first one-count only based on the clock TBCCLK. Then the select signal S40 goes to an H level by the output of a 1st stage F/F 31, the select circuit 50 selects a basic clock SYSCLK, which is used to count up the n-bit counter 30.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、プログラム暴走監視用
のウォッチドッグタイマを備えたマイクロコンピュータ
(以下、マイコンという)において、そのウォッチドッ
グタイマにクロックを供給してオーバフロー信号が期待
時間後に発生するか否かのテストを行うマイコンのテス
ト回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention, in a microcomputer equipped with a watchdog timer for monitoring program runaway (hereinafter referred to as "microcomputer"), supplies a clock to the watchdog timer to generate an overflow signal after an expected time. The present invention relates to a test circuit of a microcomputer that tests whether or not.

【0002】[0002]

【従来の技術】図2は、マイコン内に設けられる従来の
一般的なウォッチドッグタイマの一構成例を示す概略の
ブロック図である。このウォッチドッグタイマは、ブロ
ックAのウォッチドッグタイマカウンタ10と、ブロッ
クBのクロック制御回路20とで構成されている。ブロ
ックAのウォッチドッグタイマカウンタ10は、リセッ
ト可能なオーバフロー付きnビットカウンタ11で構成
されている。このnビットカウンタ11は、クロック入
力端子CKに入力されるクロックをカウントアップし、
一定時間以上経過してもリセット信号によりリセットさ
れないときにはオーバフローを生じ、オーバフロー端子
OVFから、ウォッチドッグタイマオーバフローによる
リセット信号WDTRESを出力する回路である。ブロックB
のクロック制御回路20は、マイコン内に設けられる各
種の周波数のクロックを発生するタイムベースカウンタ
のオーバフロー信号であるクロックTBCCLKを入力し、n
ビットカウンタ11に対してカウントアップ用のクロッ
クをそのクロック入力端子CKに供給する回路である。
この種のウォッチドッグタイマでは、図示しないリセッ
ト信号によってnビットカウンタ11をリセットするこ
とで、正常にマイコンのプログラムが実行されている限
り、該nビットカウンタ11がオーバフローしないよう
にさせておく。もしマイコンに異常が発生した場合、n
ビットカウンタ11が一定時間以上経過してもリセット
されないためにオーバフローを生じ、オーバフロー端子
OVFからリセット信号WDTRESが出力される。このリセ
ット信号WDTRESを用いてプログラムの暴走を防止し、マ
イコン全体の信頼度を高めている。通常、図2に示すブ
ロックAのnビットカウンタ11のテストとしては、ブ
ロックBからブロックAへクロックを供給し、リセット
信号WDTRESが次式で示す期待時間t後に発生するか否か
を確認するものである。 t=2n×(1/f)(S) 但し、n;カウンタ11のビット数 f;動作クロック周波数(Hz) ところが、このテスト方法では、ウォッチドッグタイマ
カウンタ10をカウントアップさせるクロックが、タイ
ムベースカウンタのオーバフロー信号であるクロックTB
CCLKであり、このクロックTBCCLKはマイコンの基本クロ
ックSYSCLKに比べて非常に周期の長いクロックである。
そのため、テスト時間が非常に長くかかってしまうため
に、従来、種々のテスト回路が提案されている。
2. Description of the Related Art FIG. 2 is a schematic block diagram showing a configuration example of a conventional general watchdog timer provided in a microcomputer. This watchdog timer is composed of a watchdog timer counter 10 of block A and a clock control circuit 20 of block B. The watchdog timer counter 10 of the block A is composed of a resettable n-bit counter 11 with overflow. The n-bit counter 11 counts up the clock input to the clock input terminal CK,
This is a circuit that causes an overflow when it is not reset by the reset signal even after a lapse of a certain period of time, and outputs a reset signal WDTRES from the watchdog timer overflow from the overflow terminal OVF. Block B
The clock control circuit 20 receives a clock TBCCLK which is an overflow signal of a time base counter which generates clocks of various frequencies provided in the microcomputer, and n
It is a circuit that supplies a clock for counting up to the bit counter 11 to its clock input terminal CK.
In this type of watchdog timer, the n-bit counter 11 is reset by a reset signal (not shown) so that the n-bit counter 11 does not overflow as long as the microcomputer program is normally executed. If an error occurs in the microcomputer, n
Since the bit counter 11 is not reset even after a lapse of a certain period of time, overflow occurs, and the reset signal WDTRES is output from the overflow terminal OVF. This reset signal WDTRES is used to prevent program runaway and improve the reliability of the entire microcomputer. Normally, as a test of the n-bit counter 11 of the block A shown in FIG. 2, a clock is supplied from the block B to the block A to check whether or not the reset signal WDTRES is generated after the expected time t shown by the following equation. Is. t = 2 n × (1 / f) (S) where n is the number of bits of the counter 11 f is the operating clock frequency (Hz) However, in this test method, the clock that causes the watchdog timer counter 10 to count up is timed. Clock TB that is the overflow signal of the base counter
This is CCLK, and this clock TBCCLK has a very long cycle compared to the basic clock SYSCLK of the microcomputer.
Therefore, since the test time is extremely long, various test circuits have been conventionally proposed.

【0003】図3は、従来のウォッチドッグタイマのテ
スト回路の一構成例を示すブロック図である。このテス
ト回路は、図2のウォッチドッグタイマカウンタ10を
構成するnビットカウンタ11を、3つのmビットカウ
ンタ11−1〜11−3に分割し、それらの各mビット
カウンタ11−1〜11−3を、制御レジスタ12で制
御されるセレクタ13−1〜13−4を介して接続した
構成になっている。このテスト回路を用いたテスト方法
では、3つのmビットカウンタ11−1〜11−3のう
ち、例えば11−1と11−2、11−2と11−3、
あるいは11−1のみという具合に、セレクタ13−1
〜13−3を通してクロックTBCCLKでカウントアップさ
せる。そして、各mビットカウンタ11−1〜11−3
のオーバフロー信号であるリセット信号 WDRES0,WDRE
S1,WDRES2が正常に発生したか否かをテストし、全体
としてウォッチドッグタイマカウンタ10が正常に動作
することを、セレクタ13−4から出力されるリセット
信号WDTRESによって確認する。このテスト方法によれ
ば、図2のようなテスト回路のないウォッチドッグタイ
マカウンタ10のテスト時間よりも、テスト時間を短縮
できる。
FIG. 3 is a block diagram showing a configuration example of a test circuit of a conventional watchdog timer. This test circuit divides the n-bit counter 11 constituting the watchdog timer counter 10 of FIG. 2 into three m-bit counters 11-1 to 11-3, and the respective m-bit counters 11-1 to 11-. 3 are connected via selectors 13-1 to 13-4 controlled by the control register 12. In the test method using this test circuit, of the three m-bit counters 11-1 to 11-3, for example, 11-1 and 11-2, 11-2 and 11-3,
Alternatively, only the selector 11-1 has a selector 13-1.
Count up with clock TBCCLK through 13-3. Then, each m-bit counter 11-1 to 11-3
Reset signals WDRES0 and WDRE which are overflow signals of
It is tested whether or not S1 and WDRES2 are normally generated, and it is confirmed that the watchdog timer counter 10 normally operates as a whole by the reset signal WDTRES output from the selector 13-4. According to this test method, the test time can be shortened as compared with the test time of the watchdog timer counter 10 without the test circuit as shown in FIG.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、従来の
図3のテスト回路では、若干のテスト時間を短縮できる
ものの、大幅なテスト時間の短縮は不可能である。しか
も、nビットカウンタ11を3つのmビットカウンタ1
1−1〜11−3に分割し、それらのmビットカウンタ
11−1〜11−3を制御レジスタ12で制御されるセ
レクタ13−1〜13−3を介して接続した構成である
ため、テスト回路の回路規模が大きくなってしまい、コ
スト的に問題があるばかりか、テスト方法が複雑である
という問題があり、それらを解決することが困難であっ
た。本発明は、前記従来技術が持っていた課題として、
テスト時間が長い点、さらにテスト回路の規模が大きく
なってテスト方法が複雑になるという点について解決
し、回路規模が小さく、テスト方法が簡略化され、テス
ト時間を大幅に短縮できる、ウォッチドッグタイマを内
蔵したマイコンのテスト回路を提供することを目的とす
る。
However, with the conventional test circuit of FIG. 3, although the test time can be slightly shortened, it is impossible to significantly reduce the test time. Moreover, the n-bit counter 11 is replaced by three m-bit counters 1.
It is divided into 1-1 to 11-3, and these m-bit counters 11-1 to 11-3 are connected through the selectors 13-1 to 13-3 controlled by the control register 12, so that the test is performed. Since the circuit scale of the circuit becomes large, there is a problem not only in terms of cost but also in a complicated test method, and it is difficult to solve them. The present invention has the following problems with the conventional technology.
A watchdog timer that solves the problem of long test time and the complexity of the test method due to the large scale of the test circuit. The circuit scale is small, the test method is simplified, and the test time can be greatly shortened. It is an object of the present invention to provide a test circuit for a microcomputer including a.

【0005】[0005]

【課題を解決するための手段】本発明は、前記課題を解
決するために、複数段のフリップフロップ(以下、F/
Fという)で構成され、リセット信号によりリセットさ
れかつカウントアップ用クロック(例えば、TBCCLK)に
よってカウントアップされるオーバフロー付きnビット
カウンタを有するウォッチドッグタイマを備え、前記ウ
ォッチドッグタイマにクロックを供給してオーバフロー
信号が期待時間後に発生するか否かのテストを行うマイ
コンのテスト回路において、セレクト信号生成回路とセ
レクト回路とを設けている。セレクト信号生成回路は、
前記リセット信号でリセットされて第1のセレクト信号
を出力した後に、前記nビットカウンタの初段のF/F
の出力とテスト信号とに基づきセットされて第2のセレ
クト信号を出力する回路である。セレクト回路は、前記
カウントアップ用クロックと該クロックよりも短い周期
の高速クロック(例えば、マイコンの基本クロックSYSC
LK)とを入力し、前記第1のセレクト信号で該カウント
アップ用クロックを出力して前記nビットカウンタをカ
ウントアップさせ、かつ前記第2のセレクト信号で切換
えられ該高速クロックを出力して前記nビットカウンタ
をカウントアップさせる回路である。
SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, the present invention has a plurality of stages of flip-flops (hereinafter referred to as F / F).
F), a watchdog timer having an n-bit counter with overflow that is reset by a reset signal and counts up by a count-up clock (eg, TBCCLK), and supplies a clock to the watchdog timer. A select signal generation circuit and a select circuit are provided in a test circuit of a microcomputer that tests whether or not an overflow signal occurs after an expected time. The select signal generation circuit
After being reset by the reset signal and outputting the first select signal, the first stage F / F of the n-bit counter
Is a circuit which is set on the basis of the output and the test signal and outputs the second select signal. The select circuit includes a count-up clock and a high-speed clock having a cycle shorter than the clock (for example, the basic clock SYSC
LK), the count-up clock is output by the first select signal to count up the n-bit counter, and the high-speed clock is switched by the second select signal to output the high-speed clock. It is a circuit that counts up an n-bit counter.

【0006】[0006]

【作用】本発明によれば、以上のようにウォッチドッグ
タイマを内蔵したマイコンのテスト回路を構成したの
で、リセット信号が入力され、nビットカウンタ及びセ
レクト信号生成回路がリセットされると、該セレクト信
号生成回路から第1のセレクト信号が出力される。この
第1のセレクト信号により、セレクト回路がカウントア
ップ用クロックを選択してnビットカウンタへ供給す
る。そのため、最初の1カウントのみカウントアップ用
クロック信号によってウォッチドッグタイマがカウント
アップする。nビットカウンタが最初の1カウントのみ
カウントアップすると、その初段のF/Fの出力によっ
てセレクト信号生成回路から第2のセレクト信号が出力
される。第2のセレクト信号が出力されると、セレクト
回路が高速クロックを選択してnビットカウンタへ供給
する。そのため、ウォッチドッグタイマは、最初の1カ
ウント以後、全て高速クロックでカウントアップしてい
く。このように、最初の1カウントのみカウントアップ
用クロックによってウォッチドッグタイマが動作し、そ
の後はセレクト回路によって高速クロックに自動的に切
換えられ、その高速クロックによってウォッチドッグタ
イマがカウントアップしていく。従って、前記課題を解
決できるのである。
According to the present invention, since the test circuit of the microcomputer incorporating the watchdog timer is configured as described above, when the reset signal is input and the n-bit counter and the select signal generating circuit are reset, the select signal is selected. The first select signal is output from the signal generation circuit. The select circuit selects the count-up clock according to the first select signal and supplies it to the n-bit counter. Therefore, the watchdog timer counts up by the count-up clock signal only for the first 1 count. When the n-bit counter counts up only the first 1 count, the second select signal is output from the select signal generation circuit by the output of the F / F at the first stage. When the second select signal is output, the select circuit selects the high speed clock and supplies it to the n-bit counter. Therefore, the watchdog timer counts up with the high-speed clock after the first count. In this way, the watchdog timer operates with the count-up clock only for the first one count, and thereafter, the select circuit automatically switches to the high-speed clock, and the watchdog timer counts up with the high-speed clock. Therefore, the above problem can be solved.

【0007】[0007]

【実施例】図1は、本発明の実施例を示すウォッチドッ
グタイマを内蔵したマイコンのテスト回路の回路図であ
る。ウォッチドッグタイマは、従来と同様に、リセット
可能なオーバフロー付きnビットカウンタ30で構成さ
れている。nビットカウンタ30は、クロック入力端子
CK、リセット入力端子R、及び出力端子Q等を有する
F/F31が、複数段縦続接続された回路構成になって
いる。各F/F31のリセット入力端子Rには、ウォッ
チドッグタイマをリセットするためのリセット信号RESE
T が供給される。nビットカウンタ30のオーバフロー
端子OVFは、2入力ANDゲート32の一方の入力端
子に接続され、その他方の入力端子が初段のF/F31
のクロック入力端子CKに接続され、該ANDゲート3
2の出力端子から、ウォッチドッグタイマオーバフロー
によるリセット信号WDTRESが出力されるようになってい
る。nビットカウンタ30のクロック入力端子側には、
セレクト信号S40を生成するセレクト信号生成回路4
0と、該セレクト信号S40によって切換えられるセレ
クト回路50とが設けられている。セレクト信号生成回
路40は、リセット信号RESET でリセットされて“L”
のセレクト信号S40を出力した後に、nビットカウン
タ30の初段のF/F31の出力とテスト信号TESTとに
基づきセットされて“H”のセレクト信号S40を出力
する回路であり、2入力ANDゲート41と、リセット
セット型F/F(以下、RS・F/Fという)42とで
構成されている。2入力ANDゲート41の一方の入力
端子はnビットカウンタ30の初段のF/F31の出力
端子Qに接続され、他方の入力端子にテスト信号TESTが
供給され、該ANDゲート41の出力端子がRS・F/
F42のセット入力端子Sに接続されている。RS・F
/F42は、2個の2入力NORゲート42a,42b
を有し、それらがセット入力端子Sとリセット入力端子
Rとの間にたすき掛け接続され、該NORゲート42
a,42bの出力端子が、セット信号S40を出力する
ための出力端子Qに接続されている。RS・F/F42
のリセット入力端子Rには、リセット信号RESETが供給
される。 RS・F/F42の出力端子Qには、該出力
端子Qから出力されるセレクト信号S40を反転するイ
ンバータ43が接続され、該インバータ43と出力端子
Qがセレクト回路50に接続されている。セレクト回路
50は、セレクト信号生成回路40から出力されるセレ
クト信号S40と、それがインバータ43で反転された
反転セレクト信号とにより切換えられ、タイムベースカ
ウンタのオーバフロー信号であるクロックTBCCLKと、マ
イコンの基本クロックSYSCLKとの、いずれか一方を選択
して出力する回路である。このセレクト回路50は、ク
ロックTBCCLK及びインバータ43の出力信号の論理積を
求める2入力ANDゲート51と、セレクト信号S40
及び基本クロックSYSCLKの論理積を求める2入力AND
ゲート52と、該ANDゲート51,52の出力信号の
論理和を求める2入力ORゲート53とで、構成されて
いる。ORゲート53の出力端子は、2入力ANDゲー
ト54の一方の入力端子に接続され、その他方の入力端
子にウォッチドッグタイマランビットの入力信号WWDTが
供給され、さらに該ANDゲート54の出力端子が、n
ビットカウンタ30の初段のF/F31のクロック入力
端子CK及びANDゲート32の入力端子に共通接続さ
れている。
1 is a circuit diagram of a test circuit of a microcomputer incorporating a watchdog timer showing an embodiment of the present invention. The watchdog timer is composed of a resettable n-bit counter 30 with overflow, as in the conventional case. The n-bit counter 30 has a circuit configuration in which F / Fs 31 having a clock input terminal CK, a reset input terminal R, an output terminal Q, etc. are cascaded in a plurality of stages. The reset input terminal R of each F / F 31 has a reset signal RESE for resetting the watchdog timer.
T is supplied. The overflow terminal OVF of the n-bit counter 30 is connected to one input terminal of the 2-input AND gate 32, and the other input terminal is the first stage F / F 31.
Connected to the clock input terminal CK of the AND gate 3
The reset signal WDTRES due to watchdog timer overflow is output from the second output terminal. On the clock input terminal side of the n-bit counter 30,
Select signal generation circuit 4 for generating select signal S40
0 and a select circuit 50 which is switched by the select signal S40 are provided. The select signal generation circuit 40 is reset to "L" by the reset signal RESET.
Is a circuit that outputs the select signal S40 of "H" after being output from the select signal S40 of the n-bit counter 30, and is set based on the output of the F / F 31 of the first stage of the n-bit counter 30 and the test signal TEST. And a reset set type F / F (hereinafter referred to as RS · F / F) 42. One input terminal of the 2-input AND gate 41 is connected to the output terminal Q of the F / F 31 of the first stage of the n-bit counter 30, the test signal TEST is supplied to the other input terminal, and the output terminal of the AND gate 41 is RS.・ F /
It is connected to the set input terminal S of F42. RS / F
/ F42 is two 2-input NOR gates 42a and 42b.
Are connected in series between the set input terminal S and the reset input terminal R, and the NOR gate 42
The output terminals of a and 42b are connected to the output terminal Q for outputting the set signal S40. RS / F / F42
The reset input terminal R is supplied with the reset signal RESET. The inverter 43 for inverting the select signal S40 output from the output terminal Q is connected to the output terminal Q of the RS / F / F 42, and the inverter 43 and the output terminal Q are connected to the select circuit 50. The select circuit 50 is switched by the select signal S40 output from the select signal generating circuit 40 and the inverted select signal which is inverted by the inverter 43, and is a clock TBCCLK which is an overflow signal of the time base counter and the basic of the microcomputer. It is a circuit that selects and outputs either one of the clock SYSCLK. The select circuit 50 includes a 2-input AND gate 51 that obtains a logical product of a clock TBCCLK and an output signal of the inverter 43, and a select signal S40.
And 2-input AND to obtain the logical product of the basic clock SYSCLK
It is composed of a gate 52 and a 2-input OR gate 53 for obtaining a logical sum of output signals of the AND gates 51 and 52. The output terminal of the OR gate 53 is connected to one input terminal of the 2-input AND gate 54, the input signal WWDT of the watchdog timer run bit is supplied to the other input terminal, and the output terminal of the AND gate 54 is further connected. , N
The bit counter 30 is commonly connected to the clock input terminal CK of the first stage F / F 31 and the input terminal of the AND gate 32.

【0008】図4は、図1のテスト回路のテスト動作を
示すタイミングチャートであり、この図を参照しつつ図
1のテスト動作を説明する。まず、マイコンのリセット
処理により、リセット信号RESET が発生すると、RS・
F/F42及びnビットカウンタ30がリセットされ
る。そのため、RS・F/F42の出力端子Qから出力
されるセレクト信号S40が“L”(第1のセレクト信
号)となり、それがインバータ43で反転されてセレク
ト回路50のANDゲート51が開き、該セレクト回路
50がクロックTBCCLKを選択することになる。そして、
テストを行う前に、テスト信号TESTを“H”にセットす
る。これにより、ANDゲート51が開いてテスト回路
が有効になり、この状態でウォッチドッグタイマを構成
するnビットカウンタ30のテストを行う。このテスト
では、ウォッチドッグタイマを構成するnビットカウン
タ30を動作させるために、入力信号WWDTを“H”にセ
ットし、ANDゲート54を開いてnビットカウンタ3
0にクロックが供給されるようにする。nビットカウン
タ30に供給されるクロックは、初期状態ではセレクト
回路50によってクロックTBCCLKが選択されている。ク
ロックTBCCLKが1発発生すると、nビットカウンタ30
の初段のF/F31の出力端子Qが“L”→“H”へと
変化する。このとき、F/F31の出力端子Qの出力信
号とテスト信号TESTとにより作られるANDゲート41
の出力信号が“L”→“H”となる。これにより、RS
・F/F42の出力端子Qから出力されるセレクト信号
S40も“L”→“H”(第2のセレクト信号)へと変
化する。セレクト信号S40が“L”→“H”へ変化す
ると、セレクト回路50内のANDゲート52が開き、
該セレクト回路50が基本クロックSYSCLKを選択し、そ
の基本クロックSYSCLKがANDゲート54を通してnビ
ットカウンタ30へ供給される。nビットカウンタ30
は、以後リセット信号RESET が発生しない限り、RS・
F/F42の出力端子Qから出力されるセレクト信号S
40が変化せず、セレクト回路50も変化しないので、
基本クロックSYSCLKでカウントアップを行っていく。そ
して、nビットカウンタ30にオーバフローが発生し、
オーバフロー端子OVFが“H”となると、ANDゲー
ト32によってANDゲート54の出力信号との論理積
がとられ、リセット信号WDTRESが発生する。
FIG. 4 is a timing chart showing the test operation of the test circuit of FIG. 1. The test operation of FIG. 1 will be described with reference to this figure. First, when the reset signal RESET is generated by the reset process of the microcomputer, RS.
The F / F 42 and the n-bit counter 30 are reset. Therefore, the select signal S40 output from the output terminal Q of the RS / F / F 42 becomes "L" (first select signal), which is inverted by the inverter 43 to open the AND gate 51 of the select circuit 50, The select circuit 50 will select the clock TBCCLK. And
Before performing the test, the test signal TEST is set to "H". As a result, the AND gate 51 is opened to enable the test circuit, and in this state, the n-bit counter 30 constituting the watchdog timer is tested. In this test, in order to operate the n-bit counter 30 that constitutes the watchdog timer, the input signal WWDT is set to "H", the AND gate 54 is opened, and the n-bit counter 3 is opened.
The clock is supplied to 0. As the clock supplied to the n-bit counter 30, the clock TBCCLK is selected by the select circuit 50 in the initial state. When one clock TBCCLK is generated, the n-bit counter 30
The output terminal Q of the first-stage F / F 31 changes from “L” to “H”. At this time, the AND gate 41 formed by the output signal of the output terminal Q of the F / F 31 and the test signal TEST.
Output signal of "L" → "H". This allows RS
The select signal S40 output from the output terminal Q of the F / F 42 also changes from "L" to "H" (second select signal). When the select signal S40 changes from "L" to "H", the AND gate 52 in the select circuit 50 opens,
The select circuit 50 selects the basic clock SYSCLK, and the basic clock SYSCLK is supplied to the n-bit counter 30 through the AND gate 54. n-bit counter 30
Unless the reset signal RESET is generated thereafter, RS
Select signal S output from output terminal Q of F / F 42
Since 40 does not change and the select circuit 50 does not change,
Count up with the basic clock SYSCLK. Then, an overflow occurs in the n-bit counter 30,
When the overflow terminal OVF becomes “H”, the AND gate 32 performs a logical product with the output signal of the AND gate 54, and the reset signal WDTRES is generated.

【0009】以上のように、本実施例では、nビットカ
ウンタ30が、最初の1カウントの“0”→“1”への
カウントアップのみクロックTBCCLKでカウントアップ
し、その後の“2”→“2n ”(但し、n;nビットカ
ウンタ30のビット数)までは基本クロックSYSCLKでカ
ウントアップする。そのため、ウォッチドッグタイマの
オーバフローによるリセット信号WDTRESが、従来と比べ
て非常に速い時間で発生するので、結果として該ウォッ
チドッグタイマのテスト時間を大幅に短縮できる。しか
も、セレクト回路50により、nビットカウンタ30を
最初の1カウント目にクロックTBCCLKで動作させ、その
後は全て基本クロックSYSCLKでカウントアップさせるよ
うに自動的に切換えられるので、テスト回路の回路構成
が簡単で、その構成素子数が少なく、低コスト化が可能
になると共に、テスト方法の簡略化も可能となる。な
お、本発明は上記実施例に限定されず、例えば、図1の
セレクト信号生成回路40及びセレクト回路50を、他
のゲート回路やフリップフロップ等を用いて図示以外の
回路構成に変更してもよい。さらに、上記実施例のテス
ト回路は、nビットカウンタ30のオーバフローを速く
起こさせるものであり、ウォッチドッグタイマ以外のカ
ウンタのテスト等にも非常に有効であって適用可能であ
る。
As described above, in the present embodiment, the n-bit counter 30 counts up with the clock TBCCLK only when the first 1 counts up from "0" to "1", and thereafter "2" → "1". Up to 2 n ″ (where n is the number of bits of the n-bit counter 30) is counted up by the basic clock SYSCLK. Therefore, the reset signal WDTRES due to overflow of the watchdog timer is generated in a much faster time than in the conventional case, and as a result, the test time of the watchdog timer can be greatly shortened. Moreover, since the select circuit 50 automatically switches the n-bit counter 30 to operate with the clock TBCCLK at the first count and then count up with the basic clock SYSCLK, the circuit configuration of the test circuit is simple. Thus, the number of constituent elements is small, the cost can be reduced, and the test method can be simplified. Note that the present invention is not limited to the above embodiment, and for example, the select signal generation circuit 40 and the select circuit 50 of FIG. 1 may be changed to a circuit configuration other than that shown by using another gate circuit, a flip-flop, or the like. Good. Further, the test circuit of the above-mentioned embodiment causes the overflow of the n-bit counter 30 at a high speed, and is very effective and applicable to the test of counters other than the watchdog timer.

【0010】[0010]

【発明の効果】以上詳細に説明したように、本発明によ
れば、ウォッチドッグタイマのカウントアップを、最初
の1カウント目にカウントアップ用クロックで動作さ
せ、その後は全て高速クロックでカウントアップさせる
ように自動的に切換わるセレクト信号生成回路及びセレ
クト回路を設けたので、テスト回路の回路構成が簡単に
なってその回路規模を小さくでき、低コスト化が可能と
なる。さらに、高速クロックでウォッチドッグタイマの
オーバフローを検出するので、テスト時間を大幅に短縮
でき、その上、テスト方法の簡略化も可能になる。
As described above in detail, according to the present invention, the count-up of the watchdog timer is operated by the count-up clock at the first count and thereafter the count-up is performed by the high-speed clock. Since the select signal generating circuit and the select circuit that are automatically switched are provided, the circuit configuration of the test circuit is simplified, the circuit scale can be reduced, and the cost can be reduced. Further, since the watchdog timer overflow is detected by the high-speed clock, the test time can be greatly shortened and the test method can be simplified.

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

【図1】本発明の実施例を示すウォッチドッグタイマを
内蔵したマイコンのテスト回路の回路図である。
FIG. 1 is a circuit diagram of a test circuit of a microcomputer including a watchdog timer according to an embodiment of the present invention.

【図2】従来のウォッチドッグタイマの構成例を示す概
略のブロック図である。
FIG. 2 is a schematic block diagram showing a configuration example of a conventional watchdog timer.

【図3】従来のウォッチドッグタイマのテスト回路の構
成例を示すブロック図である。
FIG. 3 is a block diagram showing a configuration example of a test circuit of a conventional watchdog timer.

【図4】図1のテスト動作のタイミングチャートであ
る。
FIG. 4 is a timing chart of the test operation of FIG.

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

30 nビットカウンタ 31 フリップフロップ(F/F) 32,41,54 ANDゲート 40 セレクト信号生成回路 42 RS・F/F 43 インバータ 50 セレクト回路 RESET リセット信号 S40 セレクト信号 SYSCLK 基本クロック TBCCLK クロック TEST テスト信号 WDTRES リセット信号 WWDT 入力信号 30 n-bit counter 31 flip-flop (F / F) 32, 41, 54 AND gate 40 select signal generation circuit 42 RS / F / F 43 inverter 50 select circuit RESET reset signal S40 select signal SYSCLK basic clock TBCCLK clock TEST test signal WDTRES Reset signal WWDT input signal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数段のフリップフロップで構成され、
リセット信号によりリセットされかつカウントアップ用
クロックによってカウントアップされるオーバフロー付
きnビットカウンタを有するウォッチドッグタイマを備
え、 前記ウォッチドッグタイマにクロックを供給してオーバ
フロー信号が期待時間後に発生するか否かのテストを行
うマイクロコンピュータのテスト回路において、 前記リセット信号でリセットされて第1のセレクト信号
を出力した後に、前記nビットカウンタの初段のフリッ
プフロップの出力とテスト信号とに基づきセットされて
第2のセレクト信号を出力するセレクト信号生成回路
と、 前記カウントアップ用クロックと該クロックよりも短い
周期の高速クロックとを入力し、前記第1のセレクト信
号で該カウントアップ用クロックを出力して前記nビッ
トカウンタをカウントアップさせ、かつ前記第2のセレ
クト信号で切換えられ該高速クロックを出力して前記n
ビットカウンタをカウントアップさせるセレクト回路と
を、 設けたことを特徴とするマイクロコンピュータのテスト
回路。
1. A flip-flop having a plurality of stages,
A watchdog timer having an n-bit counter with overflow that is reset by a reset signal and counts up by a count-up clock is provided, and a clock is supplied to the watchdog timer to determine whether an overflow signal occurs after an expected time. In a test circuit of a microcomputer for performing a test, after being reset by the reset signal and outputting a first select signal, it is set based on an output of a first stage flip-flop of the n-bit counter and a test signal, A select signal generation circuit for outputting a select signal, the count-up clock and a high-speed clock having a cycle shorter than the clock are input, and the count-up clock is output by the first select signal to output the n-bit signal. Counter Is Ntoappu, and outputs the high-speed clock is switched by the second select signal said n
A test circuit for a microcomputer, comprising: a select circuit for counting up a bit counter.
JP5184767A 1993-07-27 1993-07-27 Test circuit for microcomputer Withdrawn JPH0744417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5184767A JPH0744417A (en) 1993-07-27 1993-07-27 Test circuit for microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5184767A JPH0744417A (en) 1993-07-27 1993-07-27 Test circuit for microcomputer

Publications (1)

Publication Number Publication Date
JPH0744417A true JPH0744417A (en) 1995-02-14

Family

ID=16158973

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5184767A Withdrawn JPH0744417A (en) 1993-07-27 1993-07-27 Test circuit for microcomputer

Country Status (1)

Country Link
JP (1) JPH0744417A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011175607A (en) * 2010-02-25 2011-09-08 Mitsubishi Heavy Ind Ltd Inspection device, method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011175607A (en) * 2010-02-25 2011-09-08 Mitsubishi Heavy Ind Ltd Inspection device, method and program

Similar Documents

Publication Publication Date Title
JP3116618B2 (en) Semiconductor integrated circuit with built-in test circuit
US6654439B1 (en) High speed linear feedback shift register
JPH0744417A (en) Test circuit for microcomputer
JP3431754B2 (en) Synchronous counter
JP3124912B2 (en) Timer device
JPH1019996A (en) Rate generating circuit
JP2001066352A (en) Semiconductor integrated circuit and method for testing the same
JP2984429B2 (en) Semiconductor integrated circuit
JP2903548B2 (en) Logic circuit diagnostic system
KR970000260B1 (en) Parallel inputable boudary-scan architecture
JP3685419B2 (en) Testability circuit
JP2591210B2 (en) Signal detection circuit
JPH07287052A (en) Logic integrated circuit with scan path
JP2872098B2 (en) Counter device with test function
JP2533946B2 (en) Integrated circuit
KR100206906B1 (en) Timer/counter circuit
JP2002350509A (en) Semiconductor device
JP3015454B2 (en) Synchronous counter
JPS60187870A (en) Semiconductor integrated logical circuit
JPH0547128B2 (en)
JPS58201151A (en) Integrated circuit
JPH05256913A (en) Semiconductor integrated circuit device
JPH0779247B2 (en) Decode circuit
JPH0392016A (en) Parity circuit
JPH01193942A (en) Self-diagnosis system for signal processing circuit

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