JP2007316961A - Semiconductor integrated circuit device - Google Patents

Semiconductor integrated circuit device Download PDF

Info

Publication number
JP2007316961A
JP2007316961A JP2006146129A JP2006146129A JP2007316961A JP 2007316961 A JP2007316961 A JP 2007316961A JP 2006146129 A JP2006146129 A JP 2006146129A JP 2006146129 A JP2006146129 A JP 2006146129A JP 2007316961 A JP2007316961 A JP 2007316961A
Authority
JP
Japan
Prior art keywords
signal
semiconductor integrated
value
integrated circuit
interrupt
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
JP2006146129A
Other languages
Japanese (ja)
Inventor
Kazuhiro Umemoto
和宏 梅本
Toshio Ootashiro
敏男 太田代
Masanori Matsumoto
真典 松本
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2006146129A priority Critical patent/JP2007316961A/en
Publication of JP2007316961A publication Critical patent/JP2007316961A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a semiconductor integrated circuit device, easily monitoring a system. <P>SOLUTION: The device comprises a counter CUNT which generates a reset signal, for example, in the event of overflow; an alarm signal generation part WG_BLK 1 which outputs a warning signal when a part of bits of CUNT is equal to a preset value; and an interrupt signal generation part INT_BLK and an interrupt processing part INT_PRG which perform various interrupt processings in response to the warning signal. The WG_BLK 1 generates the warning signal when the CUNT value reaches, for example, 1/4, 1/2 or 3/4 of the overflowing value by setting, and the INT_BLK and INT_PRG perform interrupt processing in response to this warning signal to rewrite the CUNT value in an interrupt processing program in the INT_PRG. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は半導体集積回路装置に関し、特に、ウォッチドッグタイマを含むマイクロコンピュータなどの半導体集積回路装置に適用して有効な技術に関するものである。   The present invention relates to a semiconductor integrated circuit device, and more particularly to a technique effective when applied to a semiconductor integrated circuit device such as a microcomputer including a watchdog timer.

例えば、特許文献1には、複数ビット内の途中の固定ビットから第1オーバーフロー信号を出力可能なウォッチドッグタイマと、第1オーバーフロー信号を受けてウォッチドッグタイマクリア信号を出力するプログラムとを備えた異常検出回路が示されている。この異常検出回路を用いると、例えば、過去においてウォッチドックタイマクリア命令をプログラム中に挿入する際に必要とされていた労力を軽減可能となる。
特開2000−311100号公報
For example, Patent Document 1 includes a watchdog timer that can output a first overflow signal from fixed bits in the middle of a plurality of bits, and a program that receives the first overflow signal and outputs a watchdog timer clear signal. An anomaly detection circuit is shown. If this abnormality detection circuit is used, for example, it is possible to reduce the labor required in the past when inserting a watchdog timer clear instruction into the program.
JP 2000-311100 A

例えば、マイクロコンピュータ等には、システムまたはプログラムの暴走を監視するため、ウォッチドッグタイマ(以降、WDTと略す場合有り)と呼ばれるものが搭載されている。図6は、本発明の前提として検討したウォッチドッグタイマを示すものであり、(a)はその構成例および使用例を示す概念図、(b)はその動作例を示す説明図である。   For example, a microcomputer or the like is equipped with what is called a watchdog timer (hereinafter sometimes abbreviated as WDT) in order to monitor system or program runaway. 6A and 6B show a watchdog timer studied as a premise of the present invention. FIG. 6A is a conceptual diagram showing a configuration example and a usage example thereof, and FIG. 6B is an explanatory diagram showing an operation example thereof.

図6(a)に示すように、一般的なWDTは、例えば、カウンタCUNTをカウントソースクロックCLKでカウントし、その最上位ビットがオーバーフローした際に、オーバーフロー検出部OFがマイクロコンピュータ等の内部を強制的にリセットするというものである。そこで、通常、ユーザは、プログラム中にCUNTを書き換える命令を定期的に挿入したり(S601)、または、CUNTの値をリードし、しきい値を超えたらCUNTを書き換えるようなプログラムを実装し(S602)、CUNTがオーバーフローに達する前にその書き換えを実行することでシステムの暴走を監視する。しかしながら、このような方式では、例えば次のような問題が生じる恐れがある。   As shown in FIG. 6A, a general WDT, for example, counts a counter CUNT with a count source clock CLK, and when the most significant bit overflows, an overflow detection unit OF is provided inside the microcomputer or the like. Forcibly reset. Therefore, normally, the user periodically inserts an instruction to rewrite CUNT in the program (S601), or reads the value of CUNT and implements a program that rewrites CUNT when the threshold is exceeded ( S602), the runaway of the system is monitored by executing the rewrite before the CUNT reaches the overflow. However, such a method may cause the following problem, for example.

第1に、プログラムの実行速度は、マイクロコンピュータ等のハードウエアに依存するため、例えば、複数のマイクロコンピュータで共通に使用するプログラムを作成したい場合などで、CUNTの書き換え命令を挿入する位置を定めるのが困難となる。すなわち、例えば、あるマイクロコンピュータを対象として、2ms毎にCUNTの書き換え命令が発生するようなプログラムを作成したとしても、この1/2の速度で動作するマイクロコンピュータで当該プログラムを実行させると、4ms毎に書き換え命令が発生することになる。仮にオーバーフローに達する時間が2ms〜4msの間だと、後者では意図しないリセットが発生してしまう。第2に、プログラム中にこのCUNTの書き換え命令を挿入し忘れるといった人為的なミスが発生し易い。特に、プログラムの実行時間を考慮して定期的に書き換え命令を挿入する場合には、入れ忘れ等のミスが発生し易く、また、実行時間の目算を誤るようなミスも発生し易い。   First, since the execution speed of a program depends on hardware such as a microcomputer, the position for inserting a CUNT rewrite instruction is determined when, for example, it is desired to create a program used in common by a plurality of microcomputers. It becomes difficult. That is, for example, even if a program that generates a CUNT rewrite command every 2 ms is created for a certain microcomputer, if the program is executed by a microcomputer that operates at this half speed, 4 ms Each time a rewrite command is generated. If the time to reach overflow is between 2 ms and 4 ms, the latter will cause an unintended reset. Secondly, an artificial mistake such as forgetting to insert this CUNT rewrite instruction in the program is likely to occur. In particular, when rewriting instructions are periodically inserted in consideration of the execution time of the program, mistakes such as forgetting to enter easily occur, and mistakes that miscalculate the execution time are likely to occur.

第3に、例えば、低速オンチップオシレータのような精度の低いクロックをカウントソースクロックCLKに使用した場合、CUNTの書き換えタイミングが安定しない。すなわち、通常、マイクロコンピュータ内のCPUとWDTは、それぞれ異なるソースクロックで動作させるが、WDTのソースクロックの精度が低い場合、仮にCPU(つまりプログラム)によって2ms毎にWDTの書き換えを実行したつもりでも、WDTの視点では例えば2ms±10%毎に書き換え命令が入力されるという事態が起こり得る。図6(b)では、例えば、WDTの書き換え命令によってWDTのカウンタCUNTの値を定期的にH’20に書き換えているが、その書き換えが発生するタイミング(CUNTの値)が不安定となっている。仮に、このばらつきによって書き換えタイミングが、H’FFをオーバーした場合、意図しないリセットが発生してしまう。   Third, for example, when a low-accuracy clock such as a low-speed on-chip oscillator is used as the count source clock CLK, the rewrite timing of the CUNT is not stable. In other words, the CPU and WDT in the microcomputer are usually operated with different source clocks, but if the accuracy of the source clock of the WDT is low, even if the WDT is rewritten every 2 ms by the CPU (that is, the program). From the viewpoint of WDT, for example, a situation in which a rewrite command is input every 2 ms ± 10% can occur. In FIG. 6B, for example, the value of the WDT counter CUNT is periodically rewritten to H′20 by a WDT rewrite instruction, but the timing (the value of the CUNT) at which the rewrite occurs becomes unstable. Yes. If the rewrite timing exceeds H′FF due to this variation, an unintended reset occurs.

このような問題を解決するため、例えば特許文献1の技術を用いることが考えられる。しかしながら、この技術では、固定したタイミングでしかWDTの書き換え命令を発生できないため、例えばシステムの条件に応じてその監視タイミングを最適化するなどの柔軟性が得られない。   In order to solve such a problem, for example, it is conceivable to use the technique of Patent Document 1. However, with this technique, since a WDT rewrite command can be generated only at a fixed timing, flexibility such as optimization of the monitoring timing according to system conditions cannot be obtained.

そこで、本発明の目的は、システムの監視を容易に実現可能にする半導体集積回路装置を提供することにある。また、本発明の他の目的は、システムの監視条件を柔軟に設定可能にする半導体集積回路装置を提供することにある。本発明の前記ならびにそれ以外の目的と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。   SUMMARY OF THE INVENTION An object of the present invention is to provide a semiconductor integrated circuit device that can easily realize system monitoring. Another object of the present invention is to provide a semiconductor integrated circuit device capable of flexibly setting system monitoring conditions. The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、次のとおりである。   Of the inventions disclosed in the present application, the outline of typical ones will be briefly described as follows.

本発明による半導体集積回路装置は、オーバーフローが発生した際に第1信号を出力するカウンタ回路と、カウンタ回路の値が予め設定した値と等しくなった際に第2信号を出力する第1回路と、この第2信号を割り込み要因として処理し、対応する割り込みプログラムを用いてカウンタ回路の値を更新する各種処理回路とを有するものとなっている。すなわち、通常のプログラム内でソフトウエア的にWDTの値を更新するのではなく、WDTの更新が必要なタイミングで割り込み信号を生成するようなハードウエアを構築し、これに伴う割り込み処理の中でWDTの値を更新する。   A semiconductor integrated circuit device according to the present invention includes a counter circuit that outputs a first signal when an overflow occurs, and a first circuit that outputs a second signal when the value of the counter circuit becomes equal to a preset value. The second signal is processed as an interrupt factor, and various processing circuits are used to update the value of the counter circuit using a corresponding interrupt program. In other words, instead of updating the WDT value in software in a normal program, hardware that generates an interrupt signal at the timing when WDT needs to be updated is constructed, Update the value of WDT.

これによって、プログラムを作成する際のユーザの労力や人為的なミスが低減し、容易にシステムの監視が実現可能となる。また、ソフトウエア的にWDTの値を更新する際には、各種タイミングのばらつきや人為的なミス等により意図しないオーバーフローが生じる恐れがあったが、これが防止可能となり、システムを監視する際の信頼性が向上する。更に、第1回路での設定値を変えることで、第2信号を発生させるタイミングを変更可能であるため、様々なシステム条件に柔軟に対応可能となる。なお、第1回路での設定値は、カウンタ回路の一部のビットを比較する為のものでもよいし、全てのビットを比較する為のものでもよい。前者を用いると、後者に比べて回路面積を小さくすることができる。   This reduces the user's labor and human error when creating a program, and makes it possible to easily monitor the system. In addition, when updating the WDT value in software, there was a risk of unintentional overflow due to various timing variations and human error, but this can be prevented, and reliability when monitoring the system Improves. Furthermore, since the timing for generating the second signal can be changed by changing the setting value in the first circuit, it is possible to flexibly cope with various system conditions. The set value in the first circuit may be for comparing some bits of the counter circuit, or may be for comparing all the bits. When the former is used, the circuit area can be reduced as compared with the latter.

本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば、システムの暴走等の監視を容易に実現可能となる。また、システムの監視条件を柔軟に設定可能となる。   If the effect obtained by the representative one of the inventions disclosed in the present application is briefly described, it is possible to easily realize monitoring of a system runaway or the like. In addition, system monitoring conditions can be set flexibly.

以下の実施の形態においては便宜上その必要があるときは、複数のセクションまたは実施の形態に分割して説明するが、特に明示した場合を除き、それらは互いに無関係なものではなく、一方は他方の一部または全部の変形例、詳細、補足説明等の関係にある。また、以下の実施の形態において、要素の数等(個数、数値、量、範囲等を含む)に言及する場合、特に明示した場合および原理的に明らかに特定の数に限定される場合等を除き、その特定の数に限定されるものではなく、特定の数以上でも以下でも良い。   In the following embodiment, when it is necessary for the sake of convenience, the description will be divided into a plurality of sections or embodiments. However, unless otherwise specified, they are not irrelevant, and one is the other. Some or all of the modifications, details, supplementary explanations, and the like are related. Further, in the following embodiments, when referring to the number of elements (including the number, numerical value, quantity, range, etc.), especially when clearly indicated and when clearly limited to a specific number in principle, etc. Except, it is not limited to the specific number, and may be more or less than the specific number.

以下、本発明の実施の形態を図面に基づいて詳細に説明する。なお、実施の形態を説明するための全図において、同一の部材には原則として同一の符号を付し、その繰り返しの説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Note that components having the same function are denoted by the same reference symbols throughout the drawings for describing the embodiment, and the repetitive description thereof will be omitted.

(実施の形態1)
図1は、本発明の実施の形態1による半導体集積回路装置において、その主要部の概要を示すものであり、(a)は、その構成例を示す概念図、(b)は、(a)の動作例を示す説明図である。図1(a)に示す半導体集積回路装置は、カウンタCUNTと、オーバーフロー検出部OFと、警告信号生成部(第1回路)WG_BLK1と、割り込み信号生成部(第2回路)INT_BLKと、割り込み処理部(第3回路)INT_PRGとを含んでいる。カウンタCUNTは、ここでは例えば8ビット(b0〜b7)のウォッチドッグタイマ(WDT)となっており、カウントソースクロック(第1クロック信号)CLKに同期して順次カウント動作を行う。オーバーフロー検出部OFは、CUNTの最上位ビット(b7)からのオーバーフローを検出して、リセット信号(第1信号)を発生する。
(Embodiment 1)
FIG. 1 shows an outline of the main part of a semiconductor integrated circuit device according to the first embodiment of the present invention. FIG. 1A is a conceptual diagram showing an example of the configuration, and FIG. It is explanatory drawing which shows the operation example. The semiconductor integrated circuit device shown in FIG. 1A includes a counter CUNT, an overflow detection unit OF, a warning signal generation unit (first circuit) WG_BLK1, an interrupt signal generation unit (second circuit) INT_BLK, and an interrupt processing unit. (Third circuit) INT_PRG is included. The counter CUNT here is, for example, an 8-bit (b0 to b7) watchdog timer (WDT), and sequentially performs a counting operation in synchronization with the count source clock (first clock signal) CLK. The overflow detection unit OF detects an overflow from the most significant bit (b7) of CUNT and generates a reset signal (first signal).

警告信号生成部WG_BLK1は、ハードウエアで構成され、CUNTの一部のビットの値が予め設定した値となった場合に警告(WARNING)信号(第2信号)を生成する。ここでは、例えばCUNTの最上位ビット(b7)とその下位ビット(b6)を参照しており、(b7,b6)が、(0,1)、(1,0)または(1,1)の場合に、それぞれフラグ信号FG14、FG12またはFG34を出力するものとなっている。さらに、このFG14,FG12,FG34のいずれか1本を選択して、それを警告信号として出力可能となっており、このいずれを選択するかを予め設定可能となっている。これにより、WG_BLK1は、FG14が設定された場合、CUNTが最大値の1/4に達した場合に警告信号が発生することになる。同様に、FG12、FG34が設定された場合は、それぞれ、CUNTが最大値の1/2、3/4に達した場合に警告信号が発生することになる。   The warning signal generation unit WG_BLK1 is configured by hardware, and generates a warning (WARNING) signal (second signal) when the values of some of the bits of the CUNT become preset values. Here, for example, the most significant bit (b7) of CUNT and its lower bit (b6) are referred to, and (b7, b6) is (0, 1), (1, 0) or (1, 1). In this case, the flag signal FG14, FG12 or FG34 is output. Further, any one of FG14, FG12, and FG34 can be selected and output as a warning signal, and it can be set in advance which one is selected. As a result, WG_BLK1 generates a warning signal when FG14 is set and CUNT reaches ¼ of the maximum value. Similarly, when FG12 and FG34 are set, a warning signal is generated when CUNT reaches 1/2, 3/4 of the maximum value, respectively.

割り込み信号生成部INT_BLKは、所謂割り込みコントローラであり、WG_BLK1からの警告信号を割り込み要因として、優先順位の処理などを行い、割り込み信号を発生する。割り込み処理部INT_PRGは、例えば、CPUと、プログラムが格納されたメモリ等であり、割り込み信号を受けて割り込み処理プログラムを実行し、割り込み処理プログラム内でCUNTの書き換えを実行する。   The interrupt signal generation unit INT_BLK is a so-called interrupt controller, and performs priority processing using the warning signal from the WG_BLK1 as an interrupt factor to generate an interrupt signal. The interrupt processing unit INT_PRG is, for example, a CPU and a memory in which a program is stored. The interrupt processing unit INT_PRG receives an interrupt signal, executes the interrupt processing program, and rewrites CUNT in the interrupt processing program.

このような構成を用いると、例えば図1(b)に示すような動作が行える。図1(b)では、WG_BLK1に対して、予め前述したカウンタ値の設定(1/4、1/2または3/4)が行なわれており、CUNTの値がこの設定値に達した際に警告信号が生成され、その後、割り込み処理プログラムの中でCUNTの値がH’00に書き換えられている。また、図示はしないが、例えばプラグラムの暴走やハードウエアの異常といったシステムの不具合により割り込み処理プログラムが実行されない場合は、CUNTがオーバーフローするため、システムの異常を検出できる。なお、図1(a),(b)では、カウンタ値の設定を1/4、1/2または3/4としたが、勿論これに限定されるものではなく、WG_BLK1によってCUNT内の所望のビットを参照させることで適宜変更可能である。   When such a configuration is used, for example, an operation as shown in FIG. In FIG. 1B, the above-described counter value setting (1/4, 1/2, or 3/4) is performed in advance on WG_BLK1, and when the value of CUNT reaches this setting value. A warning signal is generated, and then the value of CUNT is rewritten to H'00 in the interrupt processing program. Although not shown, for example, when the interrupt processing program is not executed due to a system malfunction such as a program runaway or hardware abnormality, the CUNT overflows, so that the system abnormality can be detected. In FIGS. 1A and 1B, the counter value is set to 1/4, 1/2, or 3/4. However, of course, the present invention is not limited to this, and a desired value in CUNT can be set by WG_BLK1. It can be changed as appropriate by referring to the bit.

以上、図1の半導体集積回路装置を用いることで、従来技術のようにユーザがプログラム内に定期的にWDTの書き換え命令を挿入する必要がなくなり、割り込み処理プログラムのみ記載すればよいため、プログラム作成の労力や人為的なミスが低減し、容易にシステムの監視が実現可能となる。また、プログラムを格納するROMなどの使用効率も向上する。さらに、このシステムを監視する際の信頼性が向上する。すなわち、従来技術のように、CPU(プログラム)のクロック周期ではなく、WDT自身のクロック周期に基づいて、自身がオーバーフローする前に書き換えを行わせるような仕組みであるため、CPUとWDTのクロック周波数の違いやその誤差の有無に関わらず、オーバーフローによる本来意図しないリセットは原理的に発生しない。すなわち、図1(b)のようにWDTの書き換えタイミングは常に安定しており、図6(b)に示したように不安定にはならないため、本来意図しないリセットは発生しない。   As described above, the use of the semiconductor integrated circuit device of FIG. 1 eliminates the need for the user to periodically insert a WDT rewrite instruction into the program as in the prior art, and only the interrupt processing program needs to be described. Therefore, it is possible to easily monitor the system. In addition, the use efficiency of a ROM or the like for storing programs is improved. Furthermore, the reliability when monitoring this system is improved. In other words, as in the prior art, the clock frequency of the CPU and the WDT is based on the clock cycle of the WDT itself rather than the clock cycle of the CPU (program), so that rewriting is performed before it overflows. Regardless of the difference or the presence or absence of the error, an unintended reset due to overflow does not occur in principle. That is, the rewrite timing of the WDT is always stable as shown in FIG. 1B and does not become unstable as shown in FIG. 6B, so that an unintended reset does not occur.

また、割り込み(警告信号)を発生させるタイミングが選択可能であるため、様々なシステム条件に柔軟に対応可能となる。例えば、警告信号発生後の割り込み処理にある程度時間を要するようなシステムでは、その分余裕を持たせてカウンタの値を小さめに設定したり、または割り込み処理を高速に行えるようなシステムでは、カウンタの値を大きめに設定して割り込み処理の発生頻度を下げるようなことが可能となる。また、加えて、割り込み処理プログラムの中で書き換える値を、H’00ではない任意の値にすることによっても、割り込み処理の発生頻度を調整することができる。   In addition, since the timing for generating an interrupt (warning signal) can be selected, it is possible to flexibly cope with various system conditions. For example, in a system that requires a certain amount of time for interrupt processing after a warning signal is generated, the counter value may be set to a small value with a margin, or in a system that can perform interrupt processing at high speed. It is possible to reduce the frequency of interrupt processing by setting a larger value. In addition, the occurrence frequency of interrupt processing can be adjusted by changing the value to be rewritten in the interrupt processing program to an arbitrary value other than H'00.

図2は、本発明の実施の形態1による半導体集積回路装置において、その全体構成の一例を示すブロック図である。図2に示す半導体集積回路装置は、例えば、マイクロコンピュータやシステムLSI等であり、中央処理ユニットCPUと、割り込みコントローラINTと、ウォッチドッグタイマWDTと、WDT用発振器WDT_OSCと、揮発性メモリRAMと、不揮発性メモリROMと、その他の各種機能ユニットPERIなどを備えている。CPU、INT、WDT、RAM、ROMおよびPERIは、それぞれアドレスバスBUS(ADD)およびデータバスBUS(DAT)で接続されており、相互に通信可能となっている。また、例えば、CPU等は、図示はしないが、WDT_OSCの出力とは異なる内部クロックによって動作する。   FIG. 2 is a block diagram showing an example of the overall configuration of the semiconductor integrated circuit device according to the first embodiment of the present invention. The semiconductor integrated circuit device shown in FIG. 2 is, for example, a microcomputer or a system LSI, and includes a central processing unit CPU, an interrupt controller INT, a watchdog timer WDT, a WDT oscillator WDT_OSC, a volatile memory RAM, A nonvolatile memory ROM and other various functional units PERI are provided. The CPU, INT, WDT, RAM, ROM, and PERI are connected by an address bus BUS (ADD) and a data bus BUS (DAT), respectively, and can communicate with each other. For example, although not shown, the CPU or the like operates with an internal clock different from the output of WDT_OSC.

このような半導体集積回路装置に対して、図1(a)の構成例を適用すると、図1(a)のCUNT、OFおよびWG_BLK1が図2のWDTに実装され、図1(a)のINT_BLKが図2のINTに実装され、図1(a)のINT_PRGが図2のCPUおよびRAM/ROMに実装される。図3は、図2の半導体集積回路装置に図1の構成例を適用した場合の、WDT周りのより詳細な構成例を示す回路ブロック図である。   When the configuration example in FIG. 1A is applied to such a semiconductor integrated circuit device, CUNT, OF, and WG_BLK1 in FIG. 1A are mounted on the WDT in FIG. 2, and INT_BLK in FIG. 2 is mounted on the INT of FIG. 2, and INT_PRG of FIG. 1A is mounted on the CPU and RAM / ROM of FIG. FIG. 3 is a circuit block diagram showing a more detailed configuration example around the WDT when the configuration example of FIG. 1 is applied to the semiconductor integrated circuit device of FIG.

図3の半導体集積回路装置は、前述したWDT用発振器WDT_OSC、割り込みコントローラINTおよび中央処理ユニットCPUと、プリスケーラPSSと、カウントソースセレクタCK_SELと、タイマカウンタTCWDと、比較回路CMPaと、各種レジスタによって構成される。この各種レジスタの中には、タイマモードレジスタTMWD、タイマワーニングレジスタTWWD、割り込み制御レジスタWDTIC、タイマコントロール/ステータスレジスタTCSRWDなどが含まれる。   The semiconductor integrated circuit device of FIG. 3 includes the above-described WDT oscillator WDT_OSC, interrupt controller INT and central processing unit CPU, prescaler PSS, count source selector CK_SEL, timer counter TCWD, comparison circuit CMPa, and various registers. Is done. The various registers include a timer mode register TMWD, a timer warning register TWWD, an interrupt control register WDTIC, a timer control / status register TCSRWD, and the like.

カウントソースセレクタCK_SELには、プリスケーラPSSによって所望の周期に設定された内部クロックや、WDT_OSCからのカウントソースクロックなどが入力され、それらのいずれかのクロックを選択してタイマカウンタTCWDに供給する。この際のクロックの選択は、タイマモードレジスタTMWDの設定によって行う。タイマカウンタTCWDは、CK_SELからのクロック(例えばWDT_OSCからのカウントソースクロック)に同期してカウント動作を行い、仮にオーバーフローした際には内部リセット信号を発生する。内部リセット信号が発生するとCPU等が強制的にリセットされる。   The count source selector CK_SEL receives an internal clock set in a desired cycle by the prescaler PSS, a count source clock from the WDT_OSC, and the like, and selects one of these clocks to supply to the timer counter TCWD. The clock is selected at this time by setting the timer mode register TMWD. The timer counter TCWD performs a count operation in synchronization with a clock from CK_SEL (for example, a count source clock from WDT_OSC), and generates an internal reset signal when it overflows. When an internal reset signal is generated, the CPU and the like are forcibly reset.

また、タイマカウンタTCWDの最上位ビット(b7)およびその下位ビット(b6)と、これらのビットに対応させてタイマワーニングレジスタTWWDで予め設定した値(第1の値)とが比較回路CMPaに入力され、比較される。比較回路CMPaは、複合ゲート等を含む各種論理回路で構成され、TWWDに設定した値(b7,b6)と、TCWDのカウント値(b7,b6)とが一致し、なおかつ割り込みイネーブル信号が活性化している場合に警告(WARNING)信号を発生する。この警告信号は、割り込みコントローラINTに入力される。   Further, the most significant bit (b7) and its lower bit (b6) of the timer counter TCWD and a value (first value) preset by the timer warning register TWWD corresponding to these bits are input to the comparison circuit CMPa. And compared. The comparison circuit CMPa is composed of various logic circuits including a composite gate and the like. The values (b7, b6) set in the TWWD match the count values (b7, b6) of the TCWD, and the interrupt enable signal is activated. A warning (WARNING) signal is generated. This warning signal is input to the interrupt controller INT.

INTは、この警告信号やその他の図示しない各種割り込み要求信号の優先順位をそれぞれ比較し、CPUに割り込み信号を出力すると共に最も優先順位が高い信号を通知する。この際の警告信号の割り込み優先順位は、割り込み制御レジスタWDTICによって設定する。なお、実使用上、警告信号は、高い優先順位に設定する方が望ましい。警告信号に該当する割り込み信号を受けたCPUは、RAMまたはROMに格納されている割り込み処理プログラムを実行し、この割り込み処理プログラムの中で、タイマコントロール/ステータスレジスタTCSRWDを制御したり、タイマカウンタTCWDを所望の値に書き換える。ここでは、TCWDは、TCSRWDの制御によってライトイネーブル状態となり、この状態の際に書き換えが可能な仕様となっている。   INT compares the priorities of the warning signal and other interrupt request signals (not shown), outputs an interrupt signal to the CPU, and notifies the signal with the highest priority. The interrupt priority order of the warning signal at this time is set by the interrupt control register WDTIC. For practical use, it is desirable to set the warning signal to a higher priority. Upon receiving the interrupt signal corresponding to the warning signal, the CPU executes the interrupt processing program stored in the RAM or ROM, and controls the timer control / status register TCSRWD or the timer counter TCWD in the interrupt processing program. To the desired value. Here, TCWD is in a write enable state under the control of TCSRWD, and is rewritable in this state.

以上、本実施の形態1の半導体集積回路装置を用いることで、図1で述べたように、ユーザの労力や人為的なミスが低減し、容易にシステムの監視が実現可能となる。また、意図しないリセットが発生しないため、システムを監視する際の信頼性が向上する。更に、割り込み(警告信号)を発生させるタイミングが選択可能であるため、様々なシステム条件に柔軟に対応可能となる。また、一般的なマイクロコンピュータ等に本実施の形態を適用する場合は、既存の回路に対して図3のような比較回路CMPaやタイマワーニングレジスタTWWDを追加すればよく、小さい面積オーバーヘッドで実現可能となる。特に、比較回路CMPaは、一部のビットを比較する構成となっているため、小さな回路規模で比較動作が可能である。   As described above, by using the semiconductor integrated circuit device according to the first embodiment, as described with reference to FIG. 1, the user's labor and human error are reduced, and the system can be easily monitored. In addition, since an unintended reset does not occur, reliability when monitoring the system is improved. Furthermore, since the timing for generating an interrupt (warning signal) can be selected, various system conditions can be flexibly handled. In addition, when the present embodiment is applied to a general microcomputer or the like, it is only necessary to add a comparison circuit CMPa and a timer warning register TWWD as shown in FIG. 3 to an existing circuit, which can be realized with a small area overhead. It becomes. In particular, since the comparison circuit CMPa is configured to compare some bits, a comparison operation is possible with a small circuit scale.

(実施の形態2)
図4は、本発明の実施の形態2による半導体集積回路装置において、その主要部の構成例を示す概念図である。図4の半導体集積回路装置は、図1の構成例と同様に、カウンタCUNTと、オーバーフロー検出部OFと、警告信号生成部(第1回路)WG_BLK2と、割り込み信号生成部(第2回路)INT_BLKと、割り込み処理部(第3回路)INT_PRGとを含んでいる。ただし、図1とは警告信号生成部WG_BLK2内の構成が異なっている。それ以外の構成に関しては、図1と同様の機能であるため詳細な説明は省略する。
(Embodiment 2)
FIG. 4 is a conceptual diagram showing a configuration example of the main part of the semiconductor integrated circuit device according to the second embodiment of the present invention. As in the configuration example of FIG. 1, the semiconductor integrated circuit device of FIG. 4 includes a counter CUNT, an overflow detection unit OF, a warning signal generation unit (first circuit) WG_BLK2, and an interrupt signal generation unit (second circuit) INT_BLK. And an interrupt processing unit (third circuit) INT_PRG. However, the configuration in the warning signal generation unit WG_BLK2 is different from that in FIG. Since other functions are similar to those in FIG. 1, detailed description thereof is omitted.

警告信号生成部WG_BLK2は、ハードウエアで構成され、図1のWG_BLK1と異なりCUNTの全てのビットの値が予め設定した値と等しくなった場合に警告(WARNING)信号を生成する。具体的には、WG_BLK2は、予めCUNTの全てのビットに対応した任意の値(第1の値)を設定可能なタイマワーニングレジスタTWWDを備えており、このTWWDとCUNTの各ビットをそれぞれ比較し、全てのビットが一致した際に割り込み処理部INT_BLKに対して警告信号(第2信号)を出力する。   The warning signal generation unit WG_BLK2 is configured by hardware, and generates a warning (WARNING) signal when the values of all the bits of the CUNT are equal to preset values unlike the WG_BLK1 of FIG. Specifically, WG_BLK2 includes a timer warning register TWWD that can set an arbitrary value (first value) corresponding to all the bits of CUNT in advance, and compares each bit of TWWD and CUNT. When all the bits match, a warning signal (second signal) is output to the interrupt processing unit INT_BLK.

警告信号が出力された後は、図1の構成例と同様に、INT_BLKによって優先順位の処理やINT_PRGに向けた割り込み信号の発生が行われ、INT_PRG内の割り込み処理プログラムの中でCUNTの書き換えが行われる。このような構成を用いると、図1で述べたような効果に加えて、更に、割り込み(警告信号)を発生させるタイミングを任意に設定可能となるため、様々なシステム条件により柔軟に対応可能となる。   After the warning signal is output, the priority processing and the generation of the interrupt signal for INT_PRG are performed by INT_BLK as in the configuration example of FIG. 1, and the CUNT is rewritten in the interrupt processing program in INT_PRG. Done. When such a configuration is used, in addition to the effects described in FIG. 1, the timing for generating an interrupt (warning signal) can be arbitrarily set, so that it is possible to flexibly respond to various system conditions. Become.

また、このような構成をマイクロコンピュータ等に適用する場合は、例えば図5のような回路を用いればよい。図5は、前述した図2の半導体集積回路装置に図4の構成例を適用した場合の、WDT周りのより詳細な構成例を示す回路ブロック図である。図5の半導体集積回路装置は、図3の構成例と同様に、WDT用発振器WDT_OSC、割り込みコントローラINT、中央処理ユニットCPU、プリスケーラPSS、カウントソースセレクタCK_SEL、タイマカウンタTCWD、比較回路CMPbおよび各種レジスタによって構成される。また、各種レジスタも、図3の構成例と同様に、タイマモードレジスタTMWD、タイマワーニングレジスタTWWD、割り込み制御レジスタWDTIC、タイマコントロール/ステータスレジスタTCSRWDなどが含まれる。   When such a configuration is applied to a microcomputer or the like, for example, a circuit as shown in FIG. 5 may be used. FIG. 5 is a circuit block diagram showing a more detailed configuration example around the WDT when the configuration example of FIG. 4 is applied to the semiconductor integrated circuit device of FIG. 2 described above. As in the configuration example of FIG. 3, the semiconductor integrated circuit device of FIG. 5 includes a WDT oscillator WDT_OSC, an interrupt controller INT, a central processing unit CPU, a prescaler PSS, a count source selector CK_SEL, a timer counter TCWD, a comparison circuit CMPb, and various registers. Consists of. The various registers also include a timer mode register TMWD, a timer warning register TWWD, an interrupt control register WDTIC, a timer control / status register TCSRWD, and the like, as in the configuration example of FIG.

ただし、図5の半導体集積回路装置は、図3とは比較回路CMPb内の構成が異なっている。それ以外の構成に関しては、図3と同様の機能であるため詳細な説明は省略する。図5の比較回路CMPbは、例えば、TCWDとTWWDの各ビット(b0〜b7)をそれぞれEXOR演算し、その演算結果全てをAND演算するような論理となっている。そして、このAND演算結果は、割り込みイネーブル信号を有効状態(ここでは‘H’レベル)に設定することで、警告信号として出力される。なお、割り込みイネーブル信号を無効状態(ここでは‘L’レベル)に設定することで、警告信号を割り込み要因とせずに、一般的なWDTとして使用することも可能である。   However, the configuration of the semiconductor integrated circuit device of FIG. 5 is different from that of FIG. 3 in the comparison circuit CMPb. Since other functions are the same as those in FIG. 3, detailed description thereof is omitted. The comparison circuit CMPb in FIG. 5 has a logic such that, for example, each bit (b0 to b7) of TCWD and TWWD is subjected to an EXOR operation, and all the operation results are ANDed. The AND operation result is output as a warning signal by setting the interrupt enable signal to a valid state (here, “H” level). By setting the interrupt enable signal to an invalid state (here, “L” level), the warning signal can be used as a general WDT without causing an interrupt factor.

以上、本実施の形態2の半導体集積回路装置を用いることで、実施の形態1と同様に、ユーザの労力や人為的なミスが低減し、容易にシステムの監視が実現可能となる。また、意図しないリセットが発生しないため、システムを監視する際の信頼性が向上する。更に、割り込み(警告信号)を発生させるタイミングを任意に設定可能であるため、様々なシステム条件により柔軟に対応可能となる。   As described above, by using the semiconductor integrated circuit device of the second embodiment, the user's labor and human error are reduced as in the first embodiment, and the system can be easily monitored. In addition, since an unintended reset does not occur, reliability when monitoring the system is improved. Furthermore, since the timing for generating an interrupt (warning signal) can be arbitrarily set, it is possible to flexibly cope with various system conditions.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and various modifications can be made without departing from the scope of the invention. Needless to say.

本発明による半導体集積回路装置は、特に、ウォッチドッグタイマや割り込みコントローラ等が搭載されたマイクロコンピュータ等に適用して有効なものであり、これに限らず、ウォッチドッグタイマを含むあらゆるシステムに対して広く適用可能である。   The semiconductor integrated circuit device according to the present invention is particularly effective when applied to a microcomputer equipped with a watchdog timer, an interrupt controller or the like, and is not limited to this, but for any system including a watchdog timer. Widely applicable.

本発明の実施の形態1による半導体集積回路装置において、その主要部の概要を示すものであり、(a)は、その構成例を示す概念図、(b)は、(a)の動作例を示す説明図である。BRIEF DESCRIPTION OF THE DRAWINGS The semiconductor integrated circuit device by Embodiment 1 of this invention shows the outline | summary of the principal part, (a) is a conceptual diagram which shows the structural example, (b) is the operation example of (a). It is explanatory drawing shown. 本発明の実施の形態1による半導体集積回路装置において、その全体構成の一例を示すブロック図である。1 is a block diagram showing an example of the overall configuration of a semiconductor integrated circuit device according to a first embodiment of the present invention. 図2の半導体集積回路装置に図1の構成例を適用した場合の、WDT周りのより詳細な構成例を示す回路ブロック図である。3 is a circuit block diagram showing a more detailed configuration example around the WDT when the configuration example of FIG. 1 is applied to the semiconductor integrated circuit device of FIG. 本発明の実施の形態2による半導体集積回路装置において、その主要部の構成例を示す概要を示す概念図である。In the semiconductor integrated circuit device by Embodiment 2 of this invention, it is a conceptual diagram which shows the outline | summary which shows the structural example of the principal part. 図2の半導体集積回路装置に図4の構成例を適用した場合の、WDT周りのより詳細な構成例を示す回路ブロック図である。5 is a circuit block diagram showing a more detailed configuration example around the WDT when the configuration example of FIG. 4 is applied to the semiconductor integrated circuit device of FIG. 本発明の前提として検討したウォッチドッグタイマを示すものであり、(a)はその構成例および使用例を示す概念図、(b)はその動作例を示す説明図である。The watchdog timer examined as a premise of the present invention is shown, (a) is a conceptual diagram showing a configuration example and a usage example, and (b) is an explanatory diagram showing an operation example thereof.

符号の説明Explanation of symbols

CUNT カウンタ
CLK カウントソースクロック
OF オーバーフロー検出部
WG_BLK 警告信号生成部
INT_BLK 割り込み信号生成部
INT_PRG 割り込み処理部
CPU 中央処理ユニット
INT 割り込みコントローラ
WDT ウォッチドッグタイマ
WDT_OSC WDT用発振器
BUS バス
RAM 揮発性メモリ
ROM 不揮発性メモリ
PERI 各種機能ユニット
PSS プリスケーラ
CK_SEL カウントソースセレクタ
TMWD タイマモードレジスタ
TCSRWD タイマコントロール/ステータスレジスタ
TCWD タイマカウンタ
TWWD タイマワーニングレジスタ
WDTIC 割り込み制御レジスタ
CMP 比較回路
CUNT counter CLK count source clock OF overflow detection unit WG_BLK warning signal generation unit INT_BLK interrupt signal generation unit INT_PRG interrupt processing unit CPU central processing unit INT interrupt controller WDT watchdog timer WDT_OSC oscillator for WDT BUS bus RAM nonvolatile memory ROM non-volatile memory ROM Various functional units PSS Prescaler CK_SEL Count source selector TMWD Timer mode register TCSRWD Timer control / status register TCWD Timer counter TWWD Timer warning register WDTIC Interrupt control register CMP comparison circuit

Claims (5)

第1クロック信号に同期してカウント動作を行い、オーバーフローが発生した際に第1信号を出力するカウンタ回路と、
予め第1の値を設定可能であり、前記第1の値と前記カウンタ回路の値を比較し、その比較結果が一致した場合に第2信号を出力する第1回路と、
前記第2信号が割り込み要因として入力され、前記第2信号に対応した割り込み信号を出力する第2回路と、
前記割り込み信号が入力され、前記割り込み信号に応じた割り込み処理プログラムを動作させ、前記割り込み処理プログラムを用いて前記カウンタ回路の値を書き換える第3回路とを有することを特徴とする半導体集積回路装置。
A counter circuit that performs a counting operation in synchronization with the first clock signal and outputs the first signal when an overflow occurs;
A first circuit that can set a first value in advance, compares the first value with the value of the counter circuit, and outputs a second signal when the comparison result matches;
A second circuit that receives the second signal as an interrupt factor and outputs an interrupt signal corresponding to the second signal;
A semiconductor integrated circuit device comprising: a third circuit that receives the interrupt signal, operates an interrupt processing program corresponding to the interrupt signal, and rewrites the value of the counter circuit using the interrupt processing program.
請求項1記載の半導体集積回路装置において、
前記第1の値は、前記カウンタ回路の一部のビットに対応した値であることを特徴とする半導体集積回路装置。
The semiconductor integrated circuit device according to claim 1.
The semiconductor integrated circuit device according to claim 1, wherein the first value is a value corresponding to a part of bits of the counter circuit.
請求項1記載の半導体集積回路装置において、
前記第1の値は、前記カウンタ回路の全てのビットに対応した値であることを特徴とする半導体集積回路装置。
The semiconductor integrated circuit device according to claim 1.
The semiconductor integrated circuit device according to claim 1, wherein the first value is a value corresponding to all bits of the counter circuit.
請求項1記載の半導体集積回路装置において、
前記第2回路に対する前記第2信号の入力は、設定によって無効にすることが可能になっていることを特徴とする半導体集積回路装置。
The semiconductor integrated circuit device according to claim 1.
The semiconductor integrated circuit device, wherein the input of the second signal to the second circuit can be disabled by setting.
請求項1記載の半導体集積回路装置において、
前記第3回路は、CPUとメモリによって構成され、
前記CPUの動作クロック信号と前記第1クロック信号は、異なっていることを特徴とする半導体集積回路装置。
The semiconductor integrated circuit device according to claim 1.
The third circuit includes a CPU and a memory,
2. The semiconductor integrated circuit device according to claim 1, wherein an operation clock signal of the CPU is different from the first clock signal.
JP2006146129A 2006-05-26 2006-05-26 Semiconductor integrated circuit device Pending JP2007316961A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006146129A JP2007316961A (en) 2006-05-26 2006-05-26 Semiconductor integrated circuit device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006146129A JP2007316961A (en) 2006-05-26 2006-05-26 Semiconductor integrated circuit device

Publications (1)

Publication Number Publication Date
JP2007316961A true JP2007316961A (en) 2007-12-06

Family

ID=38850762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006146129A Pending JP2007316961A (en) 2006-05-26 2006-05-26 Semiconductor integrated circuit device

Country Status (1)

Country Link
JP (1) JP2007316961A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016021413A1 (en) * 2014-08-06 2016-02-11 ソニー株式会社 Solid-state image pickup element and solid-state image pickup device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016021413A1 (en) * 2014-08-06 2016-02-11 ソニー株式会社 Solid-state image pickup element and solid-state image pickup device

Similar Documents

Publication Publication Date Title
US8316174B2 (en) Microcontroller based flash memory digital controller system
US20140082346A1 (en) Method and System for Managing Basic Input/Output System (BIOS) Configuration Data of BIOS
JPH01232447A (en) Single chip microcomputer
JP2006251886A (en) Microcomputer
US6212134B1 (en) Watch dog timer system
JP2008033890A (en) Microcomputer system
JP6148129B2 (en) Information processing apparatus, firmware update method, and firmware update program
US20140095859A1 (en) Apparatus and method for managing register information in a processing system
KR100410557B1 (en) Microcontroller with program patching capability and method for operating the same
JP5561791B2 (en) Information processing apparatus, information processing method, and information processing program
JP5545250B2 (en) Control device
JP2007316961A (en) Semiconductor integrated circuit device
US6567930B1 (en) Method and apparatus for controlling writing of flash EEPROM by microcomputer
US20090187735A1 (en) Microcontroller having dual-core architecture
JP5434942B2 (en) Control device
JP4647276B2 (en) Semiconductor circuit device
JP2006079230A (en) Semiconductor circuit device and runaway detecting method
JP2677609B2 (en) Microcomputer
JP2988518B2 (en) Multiprocessor control method
JP7276755B2 (en) Processing speed matching circuit and microprocessor
KR100442290B1 (en) A circuit for controlling program counter
JP2006079180A (en) Microcomputer
JP4102735B2 (en) CPU device having erroneous setting function
JPH10247187A (en) One-chip microcomputer
CN112055846A (en) Executing instructions