JP2014132251A - Counter circuit - Google Patents
Counter circuit Download PDFInfo
- Publication number
- JP2014132251A JP2014132251A JP2013000700A JP2013000700A JP2014132251A JP 2014132251 A JP2014132251 A JP 2014132251A JP 2013000700 A JP2013000700 A JP 2013000700A JP 2013000700 A JP2013000700 A JP 2013000700A JP 2014132251 A JP2014132251 A JP 2014132251A
- Authority
- JP
- Japan
- Prior art keywords
- counter
- counters
- circuit
- control circuit
- signal
- 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
Links
Images
Abstract
Description
本発明は、カウンタ回路に関する。 The present invention relates to a counter circuit.
半導体集積回路においてカウンタ回路は広く利用されている。カウンタ回路の異常は半導体集積回路の動作不良の原因となるため、カウンタ回路の異常を検出することは重要である。特に車載用の電子制御装置の場合、安全性確保の観点から、カウンタ回路の異常を検出することは非常に重要である。 Counter circuits are widely used in semiconductor integrated circuits. Since an abnormality of the counter circuit causes a malfunction of the semiconductor integrated circuit, it is important to detect the abnormality of the counter circuit. In particular, in the case of an on-vehicle electronic control device, it is very important to detect an abnormality in the counter circuit from the viewpoint of ensuring safety.
特許文献1(特開2004−29992号公報)は、2つのカウンタ回路を並列に動作させることによってクロック異常を検出する技術を開示している。より詳細には、監視CPUは、自身に入力されるクロック信号に基づいて一定周期でトリガ信号を生成し、そのトリガ信号を制御CPUに送信する。制御CPUは、自身に入力されるクロック信号に基づいて第1カウンタ回路を動作させ、且つ、監視CPUより入力されるトリガ信号に基づいて第2カウンタ回路を動作させる。そして、第1カウンタ回路と第2カウンタ回路のカウント値の差分を2つの異なるタイミングで比較し、その比較結果からクロック異常を検出する。 Japanese Patent Laid-Open No. 2004-29992 discloses a technique for detecting a clock abnormality by operating two counter circuits in parallel. More specifically, the monitoring CPU generates a trigger signal at a constant period based on a clock signal input to itself, and transmits the trigger signal to the control CPU. The control CPU operates the first counter circuit based on the clock signal input to itself, and operates the second counter circuit based on the trigger signal input from the monitoring CPU. Then, the difference between the count values of the first counter circuit and the second counter circuit is compared at two different timings, and a clock abnormality is detected from the comparison result.
特許文献2(特開平10−206508号公報)は、カウンタ回路が正常に動作するか否かを判断するテストに関する技術を開示している。より詳細には、通常動作とは異なるテスト時、テスト回路は、カウンタ回路を第1カウンタ回路と第2カウンタ回路とに分割し、クロック信号をそれら第1、第2カウンタ回路のそれぞれに入力する。そして、テスト回路は、第1カウンタ回路の出力信号と第2カウンタ回路の出力信号とを比較し、両信号が一致しているか否かにより、カウンタ回路が正常に動作しているか否かを判断する。 Japanese Patent Laid-Open No. 10-206508 discloses a technique related to a test for determining whether or not a counter circuit operates normally. More specifically, during a test different from the normal operation, the test circuit divides the counter circuit into a first counter circuit and a second counter circuit, and inputs a clock signal to each of the first and second counter circuits. . Then, the test circuit compares the output signal of the first counter circuit and the output signal of the second counter circuit, and determines whether the counter circuit is operating normally based on whether the two signals match. To do.
上記の関連技術では、カウント動作の最中に異常が検出された場合に、カウント動作を継続させることができない。このことは、カウンタが搭載された半導体集積回路の動作信頼性の低下を招く。 In the related art, when an abnormality is detected during the counting operation, the counting operation cannot be continued. This leads to a decrease in operation reliability of the semiconductor integrated circuit on which the counter is mounted.
その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるだろう。 Other problems and novel features will become apparent from the description of the specification and the accompanying drawings.
カウンタ回路は、L個のカウンタと、L個のカウンタに接続された制御回路と、を備える。L個のカウンタの各々は、N/Mビットカウンタであり、入力信号に基づいてN/Mビットカウントする度に桁上がりを示す結果信号を出力する。ここで、Nは2以上の整数であり、Mは2以上の整数であり、LはM以上の整数である。制御回路は、L個のカウンタの各々について、入力信号がクロック信号あるいは他のカウンタの結果信号となるように接続関係を制御する機能と、カウント動作中に異常検知処理を行う機能と、を備える。異常検知処理において、制御回路は、L個のカウンタのうち2以上を比較対象カウンタとして選択し、比較対象カウンタに対して同じ信号が入力信号として入力されるように接続関係を設定し、更に、比較対象カウンタからの結果信号を比較することによって比較対象カウンタの中に異常カウンタが含まれているか否かを判定する。 The counter circuit includes L counters and a control circuit connected to the L counters. Each of the L counters is an N / M bit counter and outputs a result signal indicating a carry each time N / M bits are counted based on an input signal. Here, N is an integer greater than or equal to 2, M is an integer greater than or equal to 2, and L is an integer greater than or equal to M. The control circuit has a function of controlling a connection relationship so that an input signal becomes a clock signal or a result signal of another counter for each of the L counters, and a function of performing an abnormality detection process during the counting operation. . In the abnormality detection process, the control circuit selects two or more of the L counters as comparison target counters, sets the connection relationship so that the same signal is input as an input signal to the comparison target counter, It is determined whether or not an abnormality counter is included in the comparison target counter by comparing result signals from the comparison target counter.
制御回路は、N/Mビットのカウント毎に異常検知処理を行う。第1のN/Mビットのカウントに対する異常検知処理の結果、制御回路は、比較対象カウンタのうち異常カウンタ以外の少なくとも1つを、第1のN/Mビットのカウントを担当する第1カウンタとして設定する。第1のN/Mビットに続く第2のN/Mビットのカウントに対する異常検知処理において、制御回路は、第1カウンタ以外のカウンタから比較対象カウンタを選択し、比較対象カウンタに対して第1カウンタからの結果信号が入力信号として入力されるように接続関係を設定する。 The control circuit performs an abnormality detection process every count of N / M bits. As a result of the abnormality detection processing for the first N / M bit count, the control circuit sets at least one of the comparison target counters other than the abnormality counter as a first counter in charge of the first N / M bit count. Set. In the abnormality detection processing for the second N / M bit count subsequent to the first N / M bit, the control circuit selects a comparison target counter from counters other than the first counter, and the first comparison target counter is first selected. The connection relationship is set so that the result signal from the counter is input as an input signal.
本開示によれば、カウント動作の最中に異常が検出された場合でも、カウント動作を継続させることが可能である。カウント動作が停止しないため、カウンタ回路が搭載された半導体集積回路の動作信頼性が向上する。 According to the present disclosure, even when an abnormality is detected during the counting operation, the counting operation can be continued. Since the count operation does not stop, the operation reliability of the semiconductor integrated circuit on which the counter circuit is mounted is improved.
添付図面を参照して、実施の形態に係るカウンタ回路を説明する。 A counter circuit according to an embodiment will be described with reference to the accompanying drawings.
1.第1の実施の形態
1−1.構成
図1は、第1の実施の形態に係るカウンタ回路1の構成を示すブロック図である。カウンタ回路1は、Nビット(2Nカウント)のカウント値を得るための回路である。ここで、Nは2以上の整数である。
1. 1. First embodiment 1-1. Configuration FIG. 1 is a block diagram showing a configuration of a
本実施の形態に係るカウンタ回路1は、L個のカウンタ10(カウンタ10−1〜カウンタ10−L)を備えている。各々のカウンタ10はN/Mビットカウンタであり、M個のカウンタ10をつなぐことによってNビットのカウントが可能となる。ここで、Mは2以上且つN以下の整数であり、LはM以上の整数である(L≧M)。例えば、N=12、M=3、L=4の場合、12ビットカウントのために4ビットカウンタが4個設けられる。この場合、1個の4ビットカウンタは予備となる。このようにLがMより大きい場合(L>M)、予備のカウンタが発生するが、これは必須ではない。本実施の形態は、LがMと同じである場合(L=M)も含む。
The
各々のカウンタ10は、入力信号に基づいてN/Mビットのカウント動作を行う。そして、各カウンタ10は、N/Mビットカウントする度に、“桁上がり”を示す結果信号Dを出力する。以下の説明において、カウンタ10−i(i=1〜L)から出力される結果信号は、Diと参照される。
Each
各カウンタ10に入力される入力信号は、任意に設定可能である。そのために、カウンタ10−1〜10−Lの前段にスイッチ20−1〜20−Lがそれぞれ設けられている。例えば、あるカウンタ10−iとスイッチ20−iを考える(iは1〜Lのいずれか)。スイッチ20−iは、発振器30から出力されるクロック信号CLKと、カウンタ10−i以外のカウンタ10−j(j=1〜L、j≠i)から出力される結果信号Djを受け取る。そして、スイッチ20−iは、スイッチ制御信号SWに応じて、クロック信号CLKと結果信号Djの中から1つを選択し、その選択信号をカウンタ10−iに出力する。すなわち、カウンタ10−iに対する入力信号は、クロック信号CLKあるいは他のカウンタ10−jからの結果信号Djであり、それはスイッチ制御信号SWにより動的に制御可能である。
The input signal input to each counter 10 can be arbitrarily set. For this purpose, switches 20-1 to 20-L are provided in front of the counters 10-1 to 10-L, respectively. For example, consider a counter 10-i and a switch 20-i (i is any one of 1 to L). The switch 20-i receives the clock signal CLK output from the
そのようなスイッチ制御信号SWを生成するのが制御回路40である。制御回路40は、カウンタ10−1〜10−L及びスイッチ20−1〜20−Lに接続されている。この制御回路40は、スイッチ制御信号SWをスイッチ20−1〜20−Lのそれぞれに出力することによって、カウンタ10−1〜10−Lのそれぞれへの入力信号を動的に制御する。これは、制御回路40が、カウンタ10−1〜10−Lの接続関係を動的に制御することと等価である。すなわち、制御回路40は、カウンタ10−1〜10−Lの接続関係を動的に制御する機能を備えている。
The
更に、制御回路40は、カウンタ回路1がカウント動作を行っている最中に「異常検知処理」を行う機能を備えている。異常検知処理において、制御回路40は、カウンタ10−1〜10−Lの中に異常カウンタが含まれているか否かを判定する。ここで、異常カウンタとは、ノイズや回路劣化等の要因により正常なカウント動作ができなくなったカウンタ10のことである。
Further, the
より詳細には、異常検知処理において、制御回路40は、L個のカウンタ10−1〜10−Lのうち2以上を「比較対象カウンタ10−S」として選択する。そして、制御回路40は、選択した比較対象カウンタ10−Sに対して同じ信号が入力信号として入力されるように、接続関係を設定する。また、制御回路40は、比較対象カウンタ10−Sのそれぞれから結果信号DSを受け取る。そして、制御回路40は、比較対象カウンタ10−Sのそれぞれからの結果信号DS同士を比較することによって、比較対象カウンタ10−Sの中に異常カウンタが含まれているか否かを判定する。例えば、第1の比較対象カウンタ10−S1からの結果信号DS1が“桁上がり”を示しているが、第2の比較対象カウンタ10−S2からの結果信号DS2が“桁上がり”を示していない場合、第2の比較対象カウンタ10−S2は異常カウンタであると判定される。尚、この異常検知処理については、後に具体例を用いて詳細に説明する。
More specifically, in the abnormality detection process, the
制御回路40は、出力信号OUTを出力する。出力信号OUTの例としては、カウント結果を示すカウント値データ、異常カウンタを検知した場合のエラー信号、CPUへの割り込み信号等が挙げられる。
The
1−2.動作例
1−2−1.第1の動作例
まず、図2A〜図2Dを参照して、異常カウンタが無い場合を説明する。
1-2. Example of operation 1-2-1. First Operation Example First, a case where there is no abnormality counter will be described with reference to FIGS.
図2Aは、最初のN/Mビットのカウント動作(同時に1回目の異常検知処理)を説明するための概念図である。制御回路40は、カウンタ10−1〜10−Lを比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−1〜10−Lに対してクロック信号CLKが入力信号として入力されるように、接続関係を設定する。
FIG. 2A is a conceptual diagram for explaining the first N / M bit count operation (simultaneously the first abnormality detection process). The
クロック信号CLKが供給されると、カウンタ10−1〜10−Lの各々は、そのクロック信号CLKに基づいてカウント動作を行う。そして、カウンタ10−1〜10−Lの各々は、N/Mビットのカウントが完了すると結果信号Dを出力する。 When the clock signal CLK is supplied, each of the counters 10-1 to 10-L performs a counting operation based on the clock signal CLK. Each of the counters 10-1 to 10-L outputs the result signal D when the N / M bit count is completed.
N/Mビットのカウントが完了するタイミングにおいて、制御回路40は、カウンタ10−1〜10−Lのそれぞれからの出力される結果信号D1〜DL同士を比較する(1回目の比較処理)。この比較処理により、カウンタ10−1〜10−Lの中に異常カウンタが存在するか否かが判定される。本例において、異常カウンタは存在しない。
In the count is completed timing of N / M bits, the
続いて、制御回路40は、カウンタ10−1〜10−L(比較対象カウンタ)のうち少なくとも1つを、N/Mビットのカウントを担当するカウンタとして設定する。本例において、制御回路40は、カウンタ10−1を、N/Mビットのカウントを担当するカウンタとして設定するとする。その後、次の2N/Mビットのカウント動作に移行する。
Subsequently, the
図2Bは、2N/Mビットのカウント動作(同時に2回目の異常検知処理)を説明するための概念図である。制御回路40は、N/Mビットのカウントを担当するカウンタ10−1以外のカウンタ10から、比較対象カウンタ10−Sを選択する。例えば、制御回路40は、カウンタ10−2〜10−Lを比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−1に対してクロック信号CLKが入力信号として入力され、且つ、カウンタ10−2〜10−Lに対して「カウンタ10−1からの結果信号D1」が入力信号として入力されるように、接続関係を設定する。桁上がりを示す結果信号D1が入力されることにより、カウンタ10−2〜10−Lの各々のカウント値は“1”となる。
FIG. 2B is a conceptual diagram for explaining a 2N / M-bit counting operation (simultaneously the second abnormality detection process). The
続いて、2N/Mビットのカウント動作が開始する。クロック信号CLKが供給されると、カウンタ10−1は、そのクロック信号CLKに基づいてカウント動作を行う。そして、カウンタ10−1は、N/Mビットのカウントが完了する度に結果信号D1を出力する。カウンタ10−2〜10−L(比較対象カウンタ)の各々は、その結果信号D1を受け取り、その結果信号D1に基づいてカウント動作を行う。そして、カウンタ10−2〜10−Lの各々は、N/Mビットのカウントが完了すると結果信号Dを出力する。 Subsequently, a count operation of 2N / M bits starts. When the clock signal CLK is supplied, the counter 10-1 performs a counting operation based on the clock signal CLK. The counter 10-1 outputs a result signal D 1 each time the N / M bits of the count is completed. Each of the counters 10-2 to 10-L (comparative counter), the result receives signals D 1, performs a count operation based on the result signal D 1. Then, each of the counters 10-2 to 10-L outputs a result signal D when the count of N / M bits is completed.
2N/Mビットのカウントが完了するタイミングにおいて、制御回路40は、カウンタ10−2〜10−Lのそれぞれからの出力される結果信号D2〜DL同士を比較する(2回目の比較処理)。この比較処理により、カウンタ10−2〜10−Lの中に異常カウンタが存在するか否かが判定される。本例において、異常カウンタは存在しない。
In the count is completed timing of 2N / M bits, the
続いて、制御回路40は、カウンタ10−2〜10−L(比較対象カウンタ)のうち少なくとも1つを、2N/Mビットのカウントを担当するカウンタとして設定する。本例において、制御回路40は、カウンタ10−2を、2N/Mビットのカウントを担当するカウンタとして設定するとする。その後、次の3N/Mビットのカウント動作に移行する。
Subsequently, the
図2Cは、3N/Mビットのカウント動作(同時に3回目の異常検知処理)を説明するための概念図である。制御回路40は、カウンタ10−1、10−2以外のカウンタ10から、比較対象カウンタ10−Sを選択する。例えば、制御回路40は、カウンタ10−3〜10−Lを比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−1に対してクロック信号CLKが入力信号として入力され、カウンタ10−2に対して「カウンタ10−1からの結果信号D1」が入力信号として入力され、且つ、カウンタ10−3〜10−Lに対して「カウンタ10−2からの結果信号D2」が入力信号として入力されるように、接続関係を設定する。桁上がりを示す結果信号D2が入力されることにより、カウンタ10−3〜10−Lの各々のカウント値は“1”となる。
FIG. 2C is a conceptual diagram for explaining a 3N / M-bit counting operation (simultaneous third abnormality detection processing). The
続いて、3N/Mビットのカウント動作が開始する。クロック信号CLKが供給されると、カウンタ10−1は、そのクロック信号CLKに基づいてカウント動作を行う。そして、カウンタ10−1は、N/Mビットのカウントが完了する度に結果信号D1を出力する。カウンタ10−2は、その結果信号D1を受け取り、その結果信号D1に基づいてカウント動作を行う。そして、カウンタ10−2は、N/Mビットのカウントが完了する度に結果信号D2を出力する。カウンタ10−3〜10−L(比較対象カウンタ)の各々は、その結果信号D2を受け取り、その結果信号D2に基づいてカウント動作を行う。そして、カウンタ10−3〜10−Lの各々は、N/Mビットのカウントが完了すると結果信号Dを出力する。 Subsequently, a count operation of 3N / M bits starts. When the clock signal CLK is supplied, the counter 10-1 performs a counting operation based on the clock signal CLK. The counter 10-1 outputs a result signal D 1 each time the N / M bits of the count is completed. Counter 10-2, the result receives signals D 1, performs a count operation based on the result signal D 1. The counter 10-2 outputs a result signal D 2 each time the N / M bits of the count is completed. Each counter 10-3~10-L (comparative counter), the result receives signals D 2, performs a count operation based on the result signal D 2. Each of the counters 10-3 to 10-L outputs the result signal D when the N / M bit count is completed.
3N/Mビットのカウントが完了するタイミングにおいて、制御回路40は、カウンタ10−3〜10−Lのそれぞれからの出力される結果信号D3〜DL同士を比較する(3回目の比較処理)。この比較処理により、カウンタ10−3〜10−Lの中に異常カウンタが存在するか否かが判定される。本例において、異常カウンタは存在しない。
In the count is completed timing of 3N / M bits, the
続いて、制御回路40は、カウンタ10−3〜10−L(比較対象カウンタ)のうち少なくとも1つを、3N/Mビットのカウントを担当するカウンタとして設定する。本例において、制御回路40は、カウンタ10−3を、3N/Mビットのカウントを担当するカウンタとして設定するとする。
Subsequently, the
同様の処理が、N/Mビットのカウント毎に繰り返し実行される。 Similar processing is repeatedly executed for each N / M bit count.
図2Dは、最後のNビットのカウント動作(同時にM回目の異常検知処理)を説明するための概念図である。制御回路40は、カウンタ10−M〜10−Lを比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−1に対してクロック信号CLKが入力信号として入力され、カウンタ10−k(k=2〜M)に対して「カウンタ10−(k−1)からの結果信号D(k−1)」が入力信号として入力されるように、接続関係を設定する。
FIG. 2D is a conceptual diagram for explaining the last N-bit counting operation (simultaneously, the M-th abnormality detection process). The
Nビットのカウントが完了するタイミングにおいて、制御回路40は、カウンタ10−M〜10−Lのそれぞれからの出力される結果信号DM〜DL同士を比較する(M回目の比較処理)。この比較処理により、カウンタ10−M〜10−Lの中に異常カウンタが存在するか否かが判定される。
At the timing when the N-bit count is completed, the
このように、制御回路40は、N/Mビットのカウント毎に、異常検知処理を繰り返し実行する。そして、制御回路40は、異常検知処理をM回繰り返すことによって、N/Mビット毎にカウントを担当するカウンタ10を決定する。尚、制御回路40は、どのカウンタ10がどのN/Mビットのカウンタを担当するかに関する情報(割り当てテーブル等)を保持していてもよい。その情報は、カウンタ回路1の外部から参照可能なように制御回路40内に格納される。
In this way, the
次に、異常カウンタが有る場合を説明する。例えば、上記図2Aで示された1回目の異常検知処理の結果、カウンタ10−1が異常カウンタであることが判明したとする。 Next, a case where there is an abnormality counter will be described. For example, it is assumed that the counter 10-1 is an abnormality counter as a result of the first abnormality detection process shown in FIG. 2A.
この場合、図3に示されるように、制御回路40は、カウンタ10−1〜10−L(比較対象カウンタ)のうち異常カウンタ10−1以外の少なくとも1つを、N/Mビットのカウントを担当するカウンタとして設定する。例えば、制御回路40は、カウンタ10−2を、N/Mビットのカウントを担当するカウンタとして設定する。
In this case, as shown in FIG. 3, the
続いて、制御回路40は、異常カウンタ10−1とカウンタ10−2以外のカウンタ10から、比較対象カウンタ10−Sを選択する。例えば、制御回路40は、カウンタ10−3〜10−Lを比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−2に対してクロック信号CLKが入力信号として入力され、且つ、カウンタ10−3〜10−Lに対して「カウンタ10−2からの結果信号D2」が入力信号として入力されるように、接続関係を設定する。その後の処理は、図2A〜図2Dの場合と同様である。
Subsequently, the
このように、カウント動作の最中に異常カウンタが検出された場合、制御回路40は、その異常カウンタを除外することにより、カウント動作を継続させる。尚、異常カウンタが検出された場合にNビットのカウントを完了するためには、その異常カウンタの代わりとなる予備のカウンタが必要である。この点では、LがMより大きいことが好適である。但し、LがMと同じであってもよい(L=M)。この場合、制御回路40は、異常カウンタを回避しつつ、可能な限り大きいビットまでカウント動作を継続させることができる。
In this way, when an abnormal counter is detected during the counting operation, the
1−2−2.第2の動作例
上記第1の動作例では、比較対象カウンタ10−Sを1つずつ減らしていくような制御が行われている。しかし、制御方式はそれに限られない。異常検知処理とカウント動作の継続が実現されさえすれば、どのような制御方式でも構わない。図4A〜図4Dを参照して、第2の動作例を説明する。尚、異常カウンタは無いとする。
1-2-2. Second Operation Example In the first operation example, control is performed such that the comparison target counter 10-S is decreased one by one. However, the control method is not limited thereto. Any control method may be used as long as the abnormality detection process and the continuation of the count operation are realized. A second operation example will be described with reference to FIGS. 4A to 4D. It is assumed that there is no abnormality counter.
図4Aは、最初のN/Mビットのカウント動作(同時に1回目の異常検知処理)を説明するための概念図である。制御回路40は、カウンタ10−1、10−2を比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−1、10−2に対してクロック信号CLKが入力信号として入力されるように、接続関係を設定する。その後、N/Mビットのカウント動作が開始する。
FIG. 4A is a conceptual diagram for explaining the first N / M bit count operation (simultaneously the first abnormality detection process). The
N/Mビットのカウントが完了するタイミングにおいて、制御回路40は、カウンタ10−1、10−2のそれぞれからの出力される結果信号D1、D2を比較する(1回目の比較処理)。この比較処理により、カウンタ10−1、10−2の中に異常カウンタが存在するか否かが判定される。本例において、異常カウンタは存在しない。制御回路40は、カウンタ10−1、10−2を、N/Mビットのカウントを担当するカウンタとして設定する。その後、次の2N/Mビットのカウント動作に移行する。
At the timing when the N / M bit count is completed, the
図4Bは、2N/Mビットのカウント動作(同時に2回目の異常検知処理)を説明するための概念図である。制御回路40は、カウンタ10−3〜10−6を比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−1、10−2に対してクロック信号CLKが入力信号として入力され、且つ、カウンタ10−3〜10−Lに対して結果信号D2が入力信号として入力されるように、接続関係を設定する。桁上がりを示す結果信号D2が入力されることにより、カウンタ10−3〜10−6の各々のカウント値は“1”となる。その後、2N/Mビットのカウント動作が開始する。
FIG. 4B is a conceptual diagram for explaining a 2N / M-bit counting operation (simultaneously the second abnormality detection process). The
2N/Mビットのカウントが完了するタイミングにおいて、制御回路40は、カウンタ10−3〜10−6のそれぞれからの出力される結果信号D3〜D6同士を比較する(2回目の比較処理)。この比較処理により、カウンタ10−3〜10−6の中に異常カウンタが存在するか否かが判定される。本例において、異常カウンタは存在しない。制御回路40は、カウンタ10−3、10−4を、2N/Mビットのカウントを担当するカウンタとして設定する。その後、次の3N/Mビットのカウント動作に移行する。
At the timing when the 2N / M bit count is completed, the
図4Cは、3N/Mビットのカウント動作(同時に3回目の異常検知処理)を説明するための概念図である。制御回路40は、カウンタ10−5、10−6を比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−1、10−2に対してクロック信号CLKが入力信号として入力され、カウンタ10−3、10−4に対して結果信号D2が入力信号として入力され、且つ、カウンタ10−5、10−6に対して結果信号D4が入力信号として入力されるように、接続関係を設定する。桁上がりを示す結果信号D4が入力されることにより、カウンタ10−5、10−6の各々のカウント値は“1”となる。その後、3N/Mビットのカウント動作が開始する。
FIG. 4C is a conceptual diagram for explaining a 3N / M-bit counting operation (simultaneous third abnormality detection processing). The
3N/Mビットのカウントが完了するタイミングにおいて、制御回路40は、カウンタ10−5、10−6のそれぞれからの出力される結果信号D5、D6同士を比較する(3回目の比較処理)。この比較処理により、カウンタ10−5、10−6の中に異常カウンタが存在するか否かが判定される。本例において、異常カウンタは存在しない。制御回路40は、カウンタ10−6を、3N/Mビットのカウントを担当するカウンタとして設定する。その後、次の4N/Mビットのカウント動作に移行する。
At the timing when the count of 3N / M bits is completed, the
図4Dは、4N/Mビットのカウント動作(同時に4回目の異常検知処理)を説明するための概念図である。制御回路40は、カウンタ10−3、10−5を比較対象カウンタ10−Sとして選択する。また、制御回路40は、カウンタ10−1、10−2に対してクロック信号CLKが入力信号として入力され、カウンタ10−4に対して結果信号D2が入力信号として入力され、カウンタ10−6に対して結果信号D4が入力信号として入力され、且つ、カウンタ10−3、10−5に対して結果信号D6が入力信号として入力されるように、接続関係を設定する。桁上がりを示す結果信号D6が入力されることにより、カウンタ10−3、10−5の各々のカウント値は“1”となる。その後、4N/Mビットのカウント動作が開始する。
FIG. 4D is a conceptual diagram for explaining a 4N / M-bit counting operation (simultaneously the fourth abnormality detection process). The
4N/Mビットのカウントが完了するタイミングにおいて、制御回路40は、カウンタ10−3、10−5のそれぞれからの出力される結果信号D3、D5同士を比較する(4回目の比較処理)。この比較処理により、カウンタ10−3、10−5の中に異常カウンタが存在するか否かが判定される。
At the timing when the 4N / M bit count is completed, the
その後、同様の処理が、N/Mビットのカウント毎に繰り返し実行される。 Thereafter, the same processing is repeatedly executed every count of N / M bits.
1−3.効果
以上に説明されたように、本実施の形態によれば、カウンタ回路1がカウント動作を行っている最中に、異常検知処理が実施される。具体的には、Nビットのカウント動作のために複数のN/Mビットカウンタ10が設けられ、それら複数のN/Mビットカウンタ10のうち2以上の比較対象カウンタ10−Sに対して同じ入力信号が入力される。そして、比較対象カウンタ10−Sのそれぞれからの結果信号DS同士を比較することによって、異常カウンタの有無が判定される。
1-3. Effect As described above, according to the present embodiment, the abnormality detection process is performed while the
また、本実施の形態によれば、異常カウンタを検出するために必要なカウンタ面積(カウンタビット数)を削減することができる。それは、カウント回路1の構成要素であるN/Mビットカウンタ10を利用して異常検知処理が実施されるからである。上記の特許文献1のようにカウント回路1を2セット用意して、それら2つのカウント回路1を並列に動作させる必要はない。従って、回路面積削減の効果が得られる。すなわち、本実施の形態によれば、回路面積の増大を抑えつつ、カウンタ回路1の異常を検出することが可能となる。
Further, according to the present embodiment, it is possible to reduce the counter area (counter bit number) necessary for detecting an abnormal counter. This is because the abnormality detection process is performed using the N / M bit counter 10 which is a component of the
更に、カウント動作の最中に異常カウンタが検出された場合、制御回路40は、その異常カウンタを除外することにより、カウント動作を継続させる。カウント動作が停止しないため、カウンタ回路1が搭載された半導体集積回路の動作信頼性が向上する。
Further, when an abnormal counter is detected during the counting operation, the
尚、異常カウンタが検出された場合にNビットのカウントを最後まで完了するためには、その異常カウンタの代わりとなる予備のカウンタが必要である。この点では、LがMより大きいことが好適である。但し、LがMと同じであってもよい(L=M)。この場合、制御回路40は、異常カウンタを回避しつつ、可能な限り大きいビットまでカウント動作を継続させることができる。これによっても、動作信頼性向上の効果は、ある程度得られる。また、異常カウンタの数が予備のカウンタの数を超える場合も同様であり、可能な限り大きいビットまでカウント動作を継続させることができる。
In order to complete the N-bit counting to the end when an abnormal counter is detected, a spare counter is required instead of the abnormal counter. In this respect, L is preferably larger than M. However, L may be the same as M (L = M). In this case, the
車載用の電子制御装置の分野においては、回路面積削減と動作信頼性向上は重要な課題である。従って、本実施の形態に係るカウンタ回路1は、車載用の電子制御装置に対して特に有効である。もちろん、汎用的な半導体集積回路においても、本実施の形態に係るカウンタ回路1は有用である。
In the field of in-vehicle electronic control devices, circuit area reduction and operational reliability improvement are important issues. Therefore, the
2.第2の実施の形態
制御回路40は、図5に示されるようなアラーム回路50を搭載していてもよい。アラーム回路50は、ロジック回路51及びSPI(Serial Peripheral Interface)通信回路55を備えている。
2. Second Embodiment The
ロジック回路51は、上述の比較処理の結果を受け取る。異常カウンタが検出された場合、ロジック回路51は、アラーム信号を外部に出力する。また、ロジック回路51は、カウンタ10−1〜10−Lのそれぞれの状態(正常/異常)を示す情報が格納されるアラームレジスタ52を有していてもよい。ロジック回路51は、上述の比較処理の結果に応じて、アラームレジスタ52の内容を更新する。アラームレジスタ52の内容は、SPI通信回路55を介して外部から参照することができる。
The
図6は、アラームレジスタ52の一例を示す概念図である。アラームレジスタ52は、カウンタ10−1〜10−Lのそれぞれに関連付けられたレジスタ53−1〜53−Lを有している。レジスタ53−1〜53−Lには、カウンタ10−1〜10−Lのそれぞれの状態(正常/異常)を示すフラグが格納される。例えば、正常の場合、フラグは“0”に設定され、異常の場合、フラグは“1”に設定される。
FIG. 6 is a conceptual diagram illustrating an example of the
図7は、アラームレジスタ52の他の例を示す概念図である。図6で示された例と比較して、バックアップビット54が追加されている。バックアップビット54は、L>Mの場合に、予備のカウンタ10の残存状況を示す。例えば、予備のカウンタ10が無くなった場合、バックアップビット54は“1”に設定される。これをSPI通信回路55を介して参照することにより、早期の対応が可能となる。
FIG. 7 is a conceptual diagram showing another example of the
3.第3の実施の形態
上述の実施の形態に係るカウンタ回路1の一適用例として、ボーレートジェネレータが考えられる。図8を参照して、カウンタ回路1がボーレートジェネレータに適用される場合を説明する。
3. Third Embodiment As an application example of the
プリスケーラ60は、発振器30からクロック信号CLK(周波数:fPRS)を受け取る。プリスケーラ60は、クロック信号CLKの分周を行い、分周後のクロック信号CLK(周波数:fCLK)を出力する。ここで、分周比は可変に設定可能である。
The
ボーレートジェネレータ70は、カウンタ回路1と一致検出回路71を備えている。カウンタ回路1は、プリスケーラ60から出力されるクロック信号CLK(周波数:fCLK)に基づいてカウント動作を行う。つまり、ボーレートジェネレータ70は、カウンタ回路1を用いてクロック信号CLK(周波数:fCLK)のカウントを行う。
The baud rate generator 70 includes a
ボーレートジェネレータコントロールレジスタ80は、所望のボーレートに対応する目標カウント値(1/2ビット期間に相当するクロック数の理論値)を保持する。この目標カウント値の設定は変更可能である。
The baud rate
一致検出回路71は、カウンタ回路1によるカウント値と目標カウント値との比較を行う。そして、一致検出回路71は、カウンタ回路1によるカウント値が目標カウント値に一致するタイミングで、一致検出信号をI/Oインタフェース90に出力する。一致検出信号は、I/Oインタフェース90の内部で分周回路によって分周され、それにより、データ送受信に必要なクロック信号(サンプリングクロック、シフトクロック)が生成される。
The coincidence detection circuit 71 compares the count value from the
このように、ボーレートジェネレータ70は、カウンタ回路1を用いることにより、データ送受信のボーレートの設定を行う。
As described above, the baud rate generator 70 uses the
ここで、カウンタ回路1のカウンタ10−1〜10−Lに異常カウンタが含まれており、カウンタ回路1が目標カウント値までカウントできない場合を考える。この場合であっても、カウント回路1は、上述の通り、異常カウンタを回避しつつ、可能な限り大きいビットまでカウント動作を継続させる。本実施の形態によれば、このような特徴を活かすため、最大カウント数の減少が発生した場合であってもボーレートの設定が継続するような制御が行われる。具体的には、ボーレートジェネレータ70は、目標カウント値を減少させ、また、それに応じて、プリスケーラ60における分周比を増加させる。これにより、ボーレートの設定精度は低下するものの、ボーレートの設定(補正)処理自体は継続させることが可能となる。
Here, let us consider a case where the counters 10-1 to 10-L of the
具体例として、目標ボーレート=19200bps、fPRS=20MHz、N=12、M=L=4(12ビットカウンタを4個の3ビットカウンタ10−1〜10−4で構成する)の場合を考える。 As a specific example, consider a case where the target baud rate = 19200 bps, f PRS = 20 MHz, N = 12, and M = L = 4 (a 12-bit counter is composed of four 3-bit counters 10-1 to 10-4).
異常カウンタが無い場合の設定は、次の通りである。
・分周比=23
・fCLK=fPRS/23=2.5MHz
・目標カウント値=65
この場合、設定ボーレートは19230bpsとなり、設定誤差は0.156%となった。
The setting when there is no abnormality counter is as follows.
・ Division ratio = 2 3
・ F CLK = f PRS / 2 3 = 2.5 MHz
・ Target count value = 65
In this case, the set baud rate was 19230 bps and the setting error was 0.156%.
次に、異常カウンタが2個発生した場合を考える。この場合、設定は次のように変更される。
・分周比=25
・fCLK=fPRS/25=625kHz
・目標カウント値=16
この場合、設定ボーレートは19531bpsとなり、設定誤差は1.724%となった。このように、ボーレートの設定精度は低下するものの、ボーレート設定処理は2個のカウンタ10を用いて継続させることが可能となる。
Next, consider a case where two abnormal counters occur. In this case, the setting is changed as follows.
・ Division ratio = 2 5
・ F CLK = f PRS / 2 5 = 625 kHz
・ Target count value = 16
In this case, the set baud rate was 19531 bps and the setting error was 1.724%. Thus, although the baud rate setting accuracy is reduced, the baud rate setting process can be continued using the two counters 10.
以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。 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.
1 カウンタ回路
10、10−1〜10−L カウンタ
10−S 比較対象カウンタ
20、20−1〜20−L スイッチ
30 発振器
40 制御回路
50 アラーム回路
51 ロジック回路
52 アラームレジスタ
53 レジスタ
54 バックアップビット
55 SPI通信回路
60 プリスケーラ
70 ボーレートジェネレータ
71 一致検出回路
80 ボーレートジェネレータコントロールレジスタ
90 I/Oインタフェース
CLK クロック信号
D、D1〜DL 結果信号
SW スイッチ制御信号
OUT 出力信号
1
Claims (4)
前記L個のカウンタに接続された制御回路と
を備え、
前記L個のカウンタの各々は、N/Mビットカウンタであり、入力信号に基づいてN/Mビットカウントする度に桁上がりを示す結果信号を出力し、
Nは2以上の整数であり、
Mは2以上の整数であり、
LはM以上の整数であり、
前記制御回路は、
前記L個のカウンタの各々について、前記入力信号がクロック信号あるいは他のカウンタの前記結果信号となるように接続関係を制御する機能と、
カウント動作中に異常検知処理を行う機能と
を備え、
前記異常検知処理において、前記制御回路は、前記L個のカウンタのうち2以上を比較対象カウンタとして選択し、前記比較対象カウンタに対して同じ信号が前記入力信号として入力されるように前記接続関係を設定し、更に、前記比較対象カウンタからの前記結果信号を比較することによって前記比較対象カウンタの中に異常カウンタが含まれているか否かを判定し、
前記制御回路は、N/Mビットのカウント毎に前記異常検知処理を行い、
第1のN/Mビットのカウントに対する前記異常検知処理の結果、前記制御回路は、前記比較対象カウンタのうち前記異常カウンタ以外の少なくとも1つを、前記第1のN/Mビットのカウントを担当する第1カウンタとして設定し、
前記第1のN/Mビットに続く第2のN/Mビットのカウントに対する前記異常検知処理において、前記制御回路は、前記第1カウンタ以外のカウンタから前記比較対象カウンタを選択し、前記比較対象カウンタに対して前記第1カウンタからの前記結果信号が前記入力信号として入力されるように前記接続関係を設定する
カウンタ回路。 L counters,
A control circuit connected to the L counters;
Each of the L counters is an N / M bit counter, and outputs a result signal indicating a carry each time N / M bits are counted based on an input signal,
N is an integer greater than or equal to 2,
M is an integer greater than or equal to 2,
L is an integer greater than or equal to M,
The control circuit includes:
For each of the L counters, a function of controlling connection relation so that the input signal becomes a clock signal or the result signal of another counter;
With an abnormality detection process during counting operation,
In the abnormality detection process, the control circuit selects two or more of the L counters as comparison target counters, and the connection relationship is such that the same signal is input as the input signal to the comparison target counters. Further, it is determined whether or not an abnormality counter is included in the comparison target counter by comparing the result signal from the comparison target counter,
The control circuit performs the abnormality detection process every N / M bit count,
As a result of the abnormality detection processing for the first N / M bit count, the control circuit is responsible for counting the first N / M bit for at least one of the comparison target counters other than the abnormality counter. Set as the first counter to
In the abnormality detection process for the second N / M bit count following the first N / M bit, the control circuit selects the comparison target counter from counters other than the first counter, and the comparison target A counter circuit that sets the connection relationship such that the result signal from the first counter is input as the input signal to the counter.
前記制御回路は、前記異常検知処理をM回繰り返すことによって、N/Mビット毎にカウントを担当するカウンタを決定する
カウンタ回路。 The counter circuit according to claim 1,
The control circuit determines a counter in charge of counting every N / M bits by repeating the abnormality detection process M times.
目標カウント値を保持するコントロールレジスタと、
前記分周後のクロック信号のカウント値と前記目標カウント値を比較することによってボーレートの設定を行うボーレートジェネレータと
を備え、
前記ボーレートジェネレータは、請求項1又は2に記載のカウンタ回路を備え、前記カウンタ回路を用いて前記分周後のクロック信号のカウントを行う
半導体集積回路。 A prescaler that variably sets the division ratio of the clock signal and outputs the divided clock signal;
A control register that holds the target count value;
A baud rate generator that sets a baud rate by comparing the count value of the divided clock signal with the target count value;
The baud rate generator includes the counter circuit according to claim 1, and counts the divided clock signal using the counter circuit.
前記カウンタ回路の前記L個のカウンタに前記異常カウンタが含まれており、前記カウンタ回路が前記目標カウント値までカウントできなくなった場合、前記ボーレートジェネレータは、前記分周比を増加させ、且つ、前記目標カウント値を減少させることにより、ボーレートの設定を継続する
半導体集積回路。 The semiconductor integrated circuit according to claim 3,
When the abnormality counter is included in the L counters of the counter circuit and the counter circuit cannot count to the target count value, the baud rate generator increases the frequency division ratio and A semiconductor integrated circuit that continues to set the baud rate by decreasing the target count value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013000700A JP2014132251A (en) | 2013-01-07 | 2013-01-07 | Counter circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013000700A JP2014132251A (en) | 2013-01-07 | 2013-01-07 | Counter circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014132251A true JP2014132251A (en) | 2014-07-17 |
Family
ID=51411389
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013000700A Pending JP2014132251A (en) | 2013-01-07 | 2013-01-07 | Counter circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014132251A (en) |
-
2013
- 2013-01-07 JP JP2013000700A patent/JP2014132251A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105021972B (en) | aging detection circuit and method thereof | |
US20160179472A1 (en) | Random number generation device and method for generating random number | |
US8369477B2 (en) | Clock frequency divider circuit and clock frequency division method | |
TWI453427B (en) | Clock glitch detection circuit | |
US9081913B2 (en) | Integrated circuit and clock frequency control method of integrated circuit | |
EP2761516A1 (en) | Method and apparatus for low jitter distributed clock calibration | |
US9453881B2 (en) | Oscillation circuit, integrated circuit, and abnormality detection method | |
US8564355B2 (en) | Clock device | |
US8564336B2 (en) | Clock frequency divider circuit and clock frequency division method | |
US8248169B2 (en) | Semiconductor integrated circuit and abnormal oscillation detection method for semiconductor integrated circuit | |
JP6594309B2 (en) | Channel circuit and automatic test system | |
US8810321B2 (en) | Oscillator auto-trimming method and semiconductor device using the method | |
US8525597B2 (en) | Clock frequency overshoot detection circuit | |
US20170288677A1 (en) | Clock signal stop detection circuit | |
US8761332B2 (en) | Dynamic prescaling counters | |
JP2006172202A (en) | Semiconductor device | |
US10749510B2 (en) | Semiconductor device and control methods thereof | |
JP2014132251A (en) | Counter circuit | |
JP4819707B2 (en) | Redundant computing system and computing unit | |
US8645742B2 (en) | Semiconductor device operating according to an operation clock and having a serial communication interface performing external communications according to a unit transfer time based on the operation clock | |
CN107918442B (en) | Frequency adjusting device and method for adjusting frequency | |
CN113692562A (en) | Synchronous reset signal generating circuit and digital processing device | |
JP2020035205A (en) | Computation device, and mutual monitoring system | |
JP2017173068A (en) | Testing circuit | |
JP2523170B2 (en) | Burst error detection circuit |