JP2014068208A - Chattering removal circuit - Google Patents
Chattering removal circuit Download PDFInfo
- Publication number
- JP2014068208A JP2014068208A JP2012212380A JP2012212380A JP2014068208A JP 2014068208 A JP2014068208 A JP 2014068208A JP 2012212380 A JP2012212380 A JP 2012212380A JP 2012212380 A JP2012212380 A JP 2012212380A JP 2014068208 A JP2014068208 A JP 2014068208A
- Authority
- JP
- Japan
- Prior art keywords
- flip
- signal
- input
- output
- output 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.)
- Granted
Links
Images
Landscapes
- Manipulation Of Pulses (AREA)
Abstract
Description
本発明は、チャタリング除去回路に関し、詳しくは、電気信号のオン・オフなどのトグル時に発生するチャタリングの除去に関する。 The present invention relates to a chattering removal circuit, and more particularly to removal of chattering that occurs at the time of toggling an electrical signal.
機械的なオン・オフ接点を有するスイッチやリレーを用いて電気信号をオン・オフした場合、外部からの機械的な微細振動の影響を受けて接点が短時間内に高速で断続を繰り返すチャタリングが発生することがある。 When an electrical signal is turned on / off using a switch or relay with a mechanical on / off contact, chattering that repeats intermittent contact at high speed within a short time due to the influence of mechanical fine vibration from the outside. May occur.
デジタル回路のデジタル信号系統にチャタリングが発生すると、デジタル回路はチャタリングによるオン・オフも通常のデジタル信号と同様なオン・オフと認識してしまい、誤動作を生じることがある。 When chattering occurs in the digital signal system of the digital circuit, the digital circuit recognizes that on / off due to chattering is the same on / off as a normal digital signal, which may cause a malfunction.
そこで、たとえばクロックでサンプリングしてデジタル信号のパルス幅を測定しようとする場合には、このようなトグル時に発生するチャタリングに起因するデジタル回路の誤動作を防止するために、チャタリングを除去する回路が用いられる。 Therefore, for example, when trying to measure the pulse width of a digital signal by sampling with a clock, a circuit that removes chattering is used to prevent malfunction of the digital circuit due to chattering that occurs during toggle. It is done.
図11は入力信号のパルス幅測定回路の前段に設けられるロジック回路であり、図12はその動作を説明するタイミングチャートである。 FIG. 11 is a logic circuit provided in the preceding stage of the input signal pulse width measuring circuit, and FIG. 12 is a timing chart for explaining the operation thereof.
このロジック回路は、クロック同期動作によりパルス幅を測定するために、入力信号DをクロックCLKでサンプリングする。 This logic circuit samples the input signal D with the clock CLK in order to measure the pulse width by the clock synchronous operation.
入力信号Dにチャタリングが存在すると、出力信号Qはたとえば1)〜4)に示すような変化を取りうる。いずれのような変化になるかは、入力信号DとクロックCLKのタイミングに依存することから、予測不可能である。 When chattering exists in the input signal D, the output signal Q can take changes as shown in 1) to 4), for example. It is unpredictable which change will depend on the timing of the input signal D and the clock CLK.
図12の例では、1)の場合はクロック1周期分のパルス幅PW11のパルスとクロック7周期分のパルス幅PW12のパルスとの2つのパルスとして観測されることになり、2)のパルス幅はクロック9周期分のPW2になり、3)のパルス幅もクロック9周期分のPW3になり、4)のパルス幅はクロック7周期分のPW4になる。すなわち、パルス幅の最小はクロック1周期分のPW11から最大はクロック9周期分のPW2とPW3まで、測定結果はばらつくこととなる。 In the example of FIG. 12, in the case of 1), two pulses are observed, a pulse having a pulse width PW11 corresponding to one clock cycle and a pulse having a pulse width PW12 corresponding to seven clock cycles. Becomes PW2 for nine clock cycles, the pulse width of 3) becomes PW3 for nine clock cycles, and the pulse width of 4) becomes PW4 for seven clock cycles. That is, the measurement result varies from the minimum pulse width PW11 for one clock cycle to the maximum PW2 and PW3 for nine clock cycles.
5)はチャタリングを除去した信号であり、チャタリング開始時の最初のトグルを真の信号トグルとみなす考え方である。この5)の信号をクロックCLKでサンプリングするとその出力信号のパルス幅は6)に示すようにクロック9周期分のPW6となり、パルス幅測定結果がばらつくことはない。 5) is a signal from which chattering is removed, and is an idea that the first toggle at the start of chattering is regarded as a true signal toggle. When the signal 5) is sampled with the clock CLK, the pulse width of the output signal becomes PW6 corresponding to 9 cycles of the clock as shown in 6), and the pulse width measurement result does not vary.
図13は、5)のようなチャタリングが除去された信号を生成するために用いられる従来の回路例図である。2接点スイッチSWの接点a、bで発生するチャタリングを除去する一般的な回路であって、SRラッチの特性を用いることにより、出力信号Qからチャタリングが除去される。ここで、「~S」は接点aにおけるセット信号Sの反転信号を示し、「~R」は接点bにおけるリセット信号Rの反転信号を示している。 FIG. 13 is an example of a conventional circuit used for generating a signal from which chattering is removed as in 5). This is a general circuit that eliminates chattering generated at the contacts a and b of the two-contact switch SW, and chattering is removed from the output signal Q by using the characteristics of the SR latch. Here, “˜S” indicates an inverted signal of the set signal S at the contact a, and “˜R” indicates an inverted signal of the reset signal R at the contact b.
SRラッチは、2個のノアゲートNG1、NG2で構成されている。ノアゲートNG1の一方の入力端子aはスイッチSWの接点aに接続されるとともに1KΩの抵抗を介して+5Vの電源線に接続され、他方の入力端子bはノアゲートNG2の出力端子cに接続されている。ノアゲートNG2の一方の入力端子aはノアゲートNG1の出力端子cに接続され、他方の入力端子bはスイッチSWの接点bに接続されるとともに1KΩの抵抗を介して+5Vの電源線に接続されている。 The SR latch is composed of two NOR gates NG1 and NG2. One input terminal a of the NOR gate NG1 is connected to the contact a of the switch SW and is connected to the + 5V power line through a 1 KΩ resistor, and the other input terminal b is connected to the output terminal c of the NOR gate NG2. . One input terminal a of the NOR gate NG2 is connected to the output terminal c of the NOR gate NG1, and the other input terminal b is connected to the contact b of the switch SW and connected to the + 5V power supply line through a 1 KΩ resistor. .
図14は、図13の動作を説明するタイミングチャートである。図14において、スイッチSWが接点aからbに切り替わると接点b側にチャタリングが発生し、接点bからaに切り替わると接点a側にチャタリングが発生する。 FIG. 14 is a timing chart for explaining the operation of FIG. In FIG. 14, chattering occurs on the contact b side when the switch SW is switched from the contact a to b, and chattering occurs on the contact a side when the switch SW is switched from the contact b to a.
接点b側にチャタリングが発生する直前のタイムスロット(a)では~S=1、~R=1であり、出力Qは現状を維持する。接点b側にチャタリングが発生した直後のタイムスロット(b)では~S=1、~R=0であり、出力Qは「0」に遷移する。接点b側にチャタリングが発生中のタイムスロット(c)では~S=1、~R=1であって、出力Qは現状を維持する。接点b側のチャタリングが終息したタイムスロット(d)では~S=1、~R=0になることから、出力Qは「0」になる。 In the time slot (a) immediately before chattering occurs on the contact b side, ~ S = 1 and ~ R = 1, and the output Q maintains the current state. In the time slot (b) immediately after chattering occurs on the contact b side, ~ S = 1 and ~ R = 0, and the output Q transitions to “0”. In the time slot (c) in which chattering is occurring on the contact b side, ˜S = 1 and ˜R = 1, and the output Q maintains the current state. In the time slot (d) when the chattering on the contact b side ends, ~ S = 1 and ~ R = 0, so the output Q becomes "0".
接点a側にチャタリングが発生する直前のタイムスロット(e)では~S=1、~R=1であり、出力Qは現状を維持する。接点a側にチャタリングが発生した直後のタイムスロット(f)では~S=0、~R=1であり、出力Qは「1」に遷移する。接点a側にチャタリングが発生中のタイムスロット(g)では~S=1、~R=1であって、出力Qは現状を維持する。接点a側にチャタリングが発生中のタイムスロット(h)では~S=0、~R=1になることから、出力Qは「1」になる。接点a側にチャタリングが発生中のタイムスロット(i)では~S=1、~R=1であって、出力Qは現状を維持する。接点a側のチャタリングが終息したタイムスロット(j)では~S=0、~R=1になることから、出力Qは「1」になる。 In the time slot (e) immediately before chattering occurs on the contact a side, ~ S = 1 and ~ R = 1, and the output Q maintains the current state. In the time slot (f) immediately after chattering occurs on the contact a side, ~ S = 0 and ~ R = 1, and the output Q transitions to “1”. In the time slot (g) in which chattering is occurring on the contact a side, ~ S = 1 and ~ R = 1, and the output Q maintains the current state. In the time slot (h) in which chattering is occurring on the contact a side, since ~ S = 0 and ~ R = 1, the output Q becomes “1”. In the time slot (i) in which chattering is occurring on the contact a side, ~ S = 1 and ~ R = 1, and the output Q maintains the current state. In the time slot (j) at which the chattering on the side of the contact a ends, ˜S = 0 and ˜R = 1, so the output Q becomes “1”.
図15はSRラッチを用いた図13の変形回路であり、2接点スイッチに限らず一般的な信号に適用できるように変更したものである。図15において、アンドゲートAG1とAG2の一方の入力端子aは共通にDフリップフロップ回路LC2の出力端子に接続され、他方の入力端子bには共通に入力信号Dが入力される。 FIG. 15 shows a modified circuit of FIG. 13 using an SR latch, which is not limited to a two-contact switch and is modified so that it can be applied to general signals. In FIG. 15, one input terminal a of the AND gates AG1 and AG2 is commonly connected to the output terminal of the D flip-flop circuit LC2, and the input signal D is commonly input to the other input terminal b.
アンドゲートAG1の出力端子はSRラッチを構成するアンドゲートAG3の一方の入力端子aに接続され、アンドゲートAG2の出力端子はSRラッチを構成するアンドゲートAG4の他方の入力端子bに接続されている。アンドゲートAG3の他方の入力端子bはアンドゲートAG4の出力端子と接続され、アンドゲートAG3の出力端子はアンドゲートAG4の一方の入力端子aに接続されている。 The output terminal of the AND gate AG1 is connected to one input terminal a of the AND gate AG3 constituting the SR latch, and the output terminal of the AND gate AG2 is connected to the other input terminal b of the AND gate AG4 constituting the SR latch. Yes. The other input terminal b of the AND gate AG3 is connected to the output terminal of the AND gate AG4, and the output terminal of the AND gate AG3 is connected to one input terminal a of the AND gate AG4.
そして、アンドゲートAG4の出力端子は出力信号Qを出力するとともにDフリップフロップ回路LC1の入力端子に接続され、Dフリップフロップ回路LC1の出力端子はDフリップフロップ回路LC2の入力端子に接続されている。すなわち、これらアンドゲートAG1、AG2、SRラッチ、Dフリップフロップ回路LC1、LC2は、ループ状に接続されている。 The output terminal of the AND gate AG4 outputs the output signal Q and is connected to the input terminal of the D flip-flop circuit LC1, and the output terminal of the D flip-flop circuit LC1 is connected to the input terminal of the D flip-flop circuit LC2. . That is, the AND gates AG1, AG2, SR latch, and D flip-flop circuits LC1, LC2 are connected in a loop.
図16は、図15の動作を説明するタイミングチャートである。破線で囲まれた一方の領域(a)ではDフリップフロップ回路LC2の出力信号vth_2が「1」に固定されるとともに信号Sは「0」に固定されているので、(b)に示す信号Rの最初の立ち上がりで出力信号Qが「0」に遷移すると、出力信号Qは以降「0」が維持される。 FIG. 16 is a timing chart for explaining the operation of FIG. In one area (a) surrounded by a broken line, the output signal vth_2 of the D flip-flop circuit LC2 is fixed to “1” and the signal S is fixed to “0”. Therefore, the signal R shown in FIG. When the output signal Q transitions to “0” at the first rise of the output signal Q, the output signal Q is subsequently maintained at “0”.
これに対し、破線で囲まれた他方の領域(c)ではDフリップフロップ回路LC2の出力信号vth_2が「0」に固定されるとともに信号Rは「0」に固定されているので、(d)に示す信号Sの最初の立ち上がりで出力信号Qが「1」に遷移すると、出力信号Qは以降「1」が維持される。 On the other hand, in the other region (c) surrounded by a broken line, the output signal vth_2 of the D flip-flop circuit LC2 is fixed to “0” and the signal R is fixed to “0”. When the output signal Q transitions to “1” at the first rising edge of the signal S shown in FIG.
ところが、図15の回路構成によれば、ASICに実装しようとすると、以下のような問題点がある。
1)一般的なASICライブラリではSRラッチは使用できない。
2)一般的なASIC設計では禁止されている組み合わせ回路のループを含んでいる。
However, according to the circuit configuration of FIG. 15, there is the following problem when trying to mount on the ASIC.
1) SR latch cannot be used in a general ASIC library.
2) It contains a loop of combinational circuits that is prohibited in general ASIC design.
そこで、SRラッチを用いることなくチャタリング除去機能を実現する回路として、特許文献1に記載されている図17に示すような回路が提案されている。図17の回路の動作の概略について、図18のタイミングチャートを用いて説明する。
Therefore, as a circuit for realizing the chattering removal function without using the SR latch, a circuit as shown in FIG. 17 described in
211は入力端子、212はクロックパルスの入力端子、213は信号の出力端子であるが、以下の説明では入力信号を211とし、クロックパルスを212とし、出力信号を213とする。
Dフリップフロップ回路201は出力QをLにリセットするリセット端子Rを有するものであり、クロックCKの立ち上がりで入力D(この場合はH)を取り込む。OR回路202の一方の入力端子には出力端子213が接続され、他方の入力端子には信号の入力端子211が接続され、出力端子はDフリップフロップ201のクロック端子CKに接続されている。これらDフリップロップ回路201とOR回路202で第1のフリップフロップ回路203を構成する。
The D flip-
Dフリップロップ回路204は出力QをLにリセットするリセット端子Rを有するもので、クロックNCKの立ち下がりで入力D(この場合はH)を取り込む。AND回路205の一方の入力端子には信号の入力端子211が接続され、他方の入力端子には出力端子213が接続され、出力端子はDフリップフロップ204のクロック端子NCKに接続されている。これらDフリップロップ回路204とAND回路205で第2のフリップフロップ回路206を構成する。
The D flip-
Dフリップロップ回路207はクロックCKの立ち上がりで入力Dを取り込むもので、出力端子NQは入力端子Dに接続されている。OR回路208の一方の入力端子にはDフリップフロップ201の出力端子Qが接続され、他方の入力端子にはDフリップフロップ204の出力端子Qが接続され、出力端子はDフリップフロップ207のクロック端子CKに接続されている。これらDフリップロップ回路207とOR回路208で第3のフリップフロップ回路209を構成する。
The D flip-
第1のフリップフロップ回路203において、出力信号213が0(Lowレベル、以降Low)の時に入力信号211が立ち上がるとDフリップフロップ201の出力信号215が1(Highレベル、以降Hi)となる。出力信号215は一度Hiになると、クロックパルス212の立ち上がりによりLowに戻るまでの間はHiを維持する。すなわち、入力信号211が立ち上がってからクロックパルス212が立ち上がるまでは、入力信号211が何度トグルしても、出力信号215の立ち上がり(Low→Hi遷移)は1回である。
In the first flip-
出力信号213がHiの時には、入力信号211の立ち上がりに対しDフリップフロップ201の出力信号215はHiとならない。出力信号215がもともとHiだった場合は、Hiを維持する。
When the
第2のフリップフロップ回路206において、出力信号213がHiの時に入力信号211が立ち下がるとDフリップフロップ204の出力信号217がHiとなる。出力信号217は一度Hiになると、クロックパルス212の立ち上がりによりLowに戻るまでの間はHiを維持する。すなわち、入力信号211が立ち下がってからクロックパルス212が立ち上がるまでは、入力信号211が何度トグルしても、出力信号217の立ち上がり(Low→Hi遷移)は1回である。
In the second flip-
出力信号213がLowの時には入力信号211の立ち下がりに対しDフリップフロップ204の出力信号217はHiとならない。出力信号217がもともとHiだった場合は、Hiを維持する。
When the
Dフリップフロップ201の出力信号215またはDフリップフロップ204の出力信号217の立ち上がりにより出力信号213が反転する。
The
出力信号213がLowの時は、入力信号211の立ち上がりによりDフリップフロップ201の出力信号215が立ち上がるが、入力信号211の立ち下がりによりDフリップフロップ204の出力信号217が立ち上がることはない。また前述の通りクロックパルス212が立ち上がるまでは、入力信号211が何度トグルしても、Dフリップフロップ201の出力信号215の立ち上がりは1回である。この出力信号215の立ち上がりにより出力信号213は反転してHiとなる。
When the
出力信号213がHiの時は、入力信号211の立ち下がりによりDフリップフロップ204の出力信号217が立ち上がるが、入力信号211の立ち上がりによりDフリップフロップ201の出力信号215が立ち上がることはない。また前述の通りクロックパルス212が立ち上がるまでは、入力信号211が何度トグルしても、Dフリップフロップ204の出力信号217の立ち上がりは1回である。この出力信号217の立ち上がりにより出力信号213は反転してLowとなる。
When the
以上により、入力信号211がチャタリングを含んでいても、チャタリングの最初の信号トグルでのみ出力信号213が反転することにより、出力信号213はチャタリングが除去された信号となる。
As described above, even if the
クロックパルス212の立ち上がりにより、Dフリップフロップ201の出力信号215およびDフリップフロップ204の出力信号217はLowとなり、再び入力信号211の変化により立ち上がりができるようになる。
As the
このように、チャタリングが最初の信号トグルからクロックパルス212の立ち下がりまでの区間のチャタリングが除去されるが、クロックパルス212の立ち下がり以降まで長くチャタリングが継続した場合は、出力信号213は不正となる。
In this way, chattering in the section from the first signal toggle to the falling edge of the
しかし、図17の回路にも、以下のような問題点がある。
すなわち、図19のタイミングチャートに示すように、入力信号211におけるチャタリングの発生とクロックパルス212とのタイミング関係により、チャタリング除去可能な区間が変化することにより、タイミングによってはほとんどチャタリング除去ができない場合がある。
However, the circuit of FIG. 17 has the following problems.
That is, as shown in the timing chart of FIG. 19, chattering removal can be hardly performed depending on the timing due to a change in the section where chattering can be removed depending on the timing relationship between the occurrence of chattering in the
区間Aはクロックパルス212の間で入力信号211にチャタリングが発生している場合であり、出力信号213のレベルはチャタリングの影響を受けることなく一定に保たれている。これに対し、区間Bは、クロックパルス212を挟むタイミングで入力信号211にチャタリングが発生している場合であり、出力信号213のレベルは破線で囲んだ領域Cに示すようにチャタリングの影響を受けて変化している。
Section A is a case where chattering occurs in the
また、Dフリップフロップ201、204のリセット入力を制御するための信号212を必要とする。この信号212は、周期的にパルスが入力されることを前提とするものであり、一般的な候補としてはクロック信号がで考えられる。
Further, the
ところが、次の2点に基づく設計上の制約があることから、クロック信号を用いることは困難であり、この信号を生成するための特別な回路を外部に必要とする。 However, since there are design restrictions based on the following two points, it is difficult to use a clock signal, and a special circuit for generating this signal is required outside.
1)Dフリップフロップ201、204のクロック入力ではなくリセット入力に接続されることから、通常のクロックツリー合成を適用することができない。
2)信号212のデューティー比により回路の挙動が変わりうることからHi幅が狭いほうが好ましく、クロック信号波形に対する制約となる。
1) Since it is connected to the reset input instead of the clock input of the D flip-
2) Since the circuit behavior can be changed depending on the duty ratio of the
本発明は、これらの従来の問題点に着目したものであり、その目的は、ASIC設計との相性がよく、所定期間内のチャタリングを確実に除去することができ、チャタリング除去可能区間を容易に選択できるチャタリング除去回路を提供することにある。 The present invention pays attention to these conventional problems, and its purpose is to be compatible with ASIC design, to reliably eliminate chattering within a predetermined period, and to easily remove a chattering-removable section. An object of the present invention is to provide a chattering elimination circuit that can be selected.
このような課題を達成する請求項1の発明は、
入力部にゲートが設けられて出力部にフリップフロップが設けられ入力信号の立ち上がりを検出する立ち上がりエッジ検出部と、
入力部にゲートが設けられて出力部にフリップフロップが設けられ入力信号の立ち下がりを検出する立ち下がりエッジ検出部と、
複数のフリップフロップとこれらフリップフロップの出力信号が入力されるゲートとで構成され前記立ち上がりエッジ検出部の出力信号のエッジを検出して所定のパルスを生成しこのパルスを前記立ち上がりエッジ検出部のフリップフロップに帰還入力するHi信号生成部と、
複数のフリップフロップとこれらフリップフロップの出力信号が入力されるゲートとで構成され前記立ち下がりエッジ検出部の出力信号のエッジを検出して所定のパルスを生成しこのパルスを前記立ち下がりエッジ検出部のフリップフロップに帰還入力するLow信号生成部と、
これらHi信号生成部およびLow信号生成部から生成出力されるパルスに基づき状態が遷移する出力信号を生成し前記立ち上がりエッジ検出部および立ち下がりエッジ検出部の各ゲートに帰還入力するステートマシン部と、
前記Hi信号生成部を構成する複数のフリップフロップの出力信号が入力される第1のゲートと、前記Low信号生成部を構成する複数のフリップフロップの出力信号が入力される第2のゲートと、これら第1および第2のゲートの出力信号と前記ステートマシン部の出力信号に基づき出力信号を生成する第3のゲートとで構成された出力生成部、
からなるチャタリング除去回路である。
The invention of
A rising edge detector that includes a gate in the input unit and a flip-flop in the output unit to detect the rising edge of the input signal;
A falling edge detection unit for detecting a falling edge of an input signal in which a gate is provided in an input unit and a flip-flop is provided in an output unit;
It is composed of a plurality of flip-flops and gates to which the output signals of these flip-flops are input, detects an edge of the output signal of the rising edge detector, generates a predetermined pulse, and uses this pulse as a flip-flop of the rising edge detector Hi signal generator for feedback input to the
It comprises a plurality of flip-flops and a gate to which the output signals of these flip-flops are input, detects an edge of the output signal of the falling edge detector, generates a predetermined pulse, and generates this pulse as the falling edge detector Low signal generator for feedback input to the flip-flop,
A state machine unit that generates an output signal whose state transitions based on a pulse generated and output from the Hi signal generation unit and the Low signal generation unit and inputs the feedback to each gate of the rising edge detection unit and the falling edge detection unit,
A first gate to which output signals of a plurality of flip-flops constituting the Hi signal generation unit are input; a second gate to which output signals of a plurality of flip-flops constituting the Low signal generation unit are input; An output generation unit composed of an output signal of the first and second gates and a third gate for generating an output signal based on the output signal of the state machine unit;
Is a chattering elimination circuit.
請求項2の発明は、請求項1記載のチャタリング除去回路において、
前記Hi信号生成部およびLow信号生成部に接続されるフリップフロップの段数に応じてチャタリング除去可能区間が設定されることを特徴とする。
The invention of
A chattering-removable section is set according to the number of stages of flip-flops connected to the Hi signal generation unit and the Low signal generation unit.
請求項3の発明は、請求項1または請求項2記載のチャタリング除去回路において、
前記Hi信号生成部およびLow信号生成部に接続されるフリップフロップの段数を連動して切り替えることによりチャタリング除去可能区間を変更するセレクタを設けたことを特徴とする。
The invention of
A selector is provided that changes a chattering-removable section by interlockingly switching the number of stages of flip-flops connected to the Hi signal generation unit and the Low signal generation unit.
これらにより、ASIC設計が容易で、所定期間内のチャタリングを確実に除去でき、チャタリング除去可能区間を容易に選択できるチャタリング除去回路を実現できる。 Accordingly, it is possible to realize a chattering removal circuit that facilitates ASIC design, can reliably remove chattering within a predetermined period, and can easily select a chattering-removable section.
以下、本発明について、図面を用いて説明する。図1は本発明の一実施例を示すブロック図である。図1のチャタリング除去回路は、立ち上がりエッジ検出部1と、立ち下がりエッジ検出部2と、Hi信号生成部3と、Low信号生成部4と、ステートマシン部5と、出力生成部6とで構成されている。
Hereinafter, the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention. The chattering elimination circuit of FIG. 1 includes a rising
入力信号S1は、0(Lowレベル、以降Lowともいう)/1(Highレベル、以降Hiともいう)間のトグル時に、チャタリングが発生する場合があると想定する。この入力信号S1は立ち上がりエッジ検出部1を介してHi信号生成部3に入力されるとともに、立ち下がりエッジ検出部2を介してLow信号生成部4にも入力される。そして、Hi信号生成部3とLow信号生成部4は、ステートマシン部5に接続されるとともに出力生成部6にも接続されている。
It is assumed that chattering may occur when the input signal S1 is toggled between 0 (Low level, hereinafter also referred to as Low) / 1 (High level, hereinafter also referred to as Hi). The
これらにより、以下に説明するように、出力生成部6から、チャタリングが除去された出力信号S2が出力されることになる。
Accordingly, as described below, the output signal S2 from which chattering has been removed is output from the
立ち上がりエッジ検出部1はゲートG1とフリップフロップFF1とで構成され、立ち下がりエッジ検出部2はゲートG2とフリップフロップFF2とで構成され、Hi信号生成部3は3個のフリップフロップFF3〜FF5とゲートG3とで構成され、Low信号生成部4は3個のフリップフロップFF6〜FF8とゲートG4とで構成され、出力生成部6は3個のゲートG5〜G7で構成されている。
The rising
立ち上がりエッジ検出部1を構成するゲートG1の一方の入力端子には入力信号S1が入力されて、他方の入力端子にはステートマシン部5の出力信号S5が入力され、出力信号SG1はフリップフロップFF1のクロック端子に入力されている。フリップフロップFF1のデータ入力端子はHiレベルに固定されて、出力信号SF1はHi信号生成部3の入力端子に入力されるとともに出力生成部6を構成するゲートG5の第1の入力端子に入力され、非同期のリセット端子RはHi信号生成部3を構成するゲートG3の出力端子に接続されている。
The input signal S1 is input to one input terminal of the gate G1 constituting the rising
立ち下がりエッジ検出部2を構成するゲートG2の一方の入力端子には入力信号S1が入力され、他方の入力端子にはステートマシン部5の出力信号S5が入力され、出力信号SG2はフリップフロップFF2のクロック端子に入力されている。フリップフロップFF2のデータ入力端子はHiレベルに固定され、出力信号SF2はLow信号生成部4の入力端子に入力されるとともに出力生成部6を構成するゲートG6の第1の入力端子に入力され、非同期のリセット端子RはLow信号生成部4を構成するゲートG4の出力端子に接続されている。
The input signal S1 is input to one input terminal of the gate G2 constituting the falling
Hi信号生成部3を構成するフリップフロップFF3の出力信号SF3は、フリップフロップFF4およびFF5のデータ入力端子に入力されるとともに出力生成部6を構成するゲートG5の第2の入力端子に入力されている。フリップフロップFF4の出力信号SF4はゲートG3の一方の入力端子に入力され、フリップフロップFF5の出力信号SF5はゲートG3の他方の入力端子に入力されるとともに出力生成部6を構成するゲートG5の第3の入力端子に入力されている。
The output signal SF3 of the flip-flop FF3 constituting the Hi
Low信号生成部4を構成するフリップフロップFF6の出力信号SF6は、フリップフロップFF7およびFF8のデータ入力端子に入力されるとともに出力生成部6を構成するゲートG6の第2の入力端子に入力されている。フリップフロップFF7の出力信号SF7はゲートG4の一方の入力端子に入力され、フリップフロップFF8の出力信号SF8はゲートG4の他方の入力端子に入力されるとともに出力生成部6を構成するゲートG6の第3の入力端子に入力されている。
The output signal SF6 of the flip-flop FF6 that constitutes the Low
ステートマシン部5は、stat=0およびstat=1の2つの内部状態を持つものであり、クロックCLKの立ち上がりエッジで内部状態を更新する。状態stat=0の間は出力信号S5として0を出力し、状態stat=1の間は出力信号S5として1を出力する。
The
なお、出力信号S5は、出力生成部6を構成するゲートG7の第2の入力端子に入力されるとともに、前述のように立ち上がりエッジ検出部1を構成するゲートG1の他方の入力端子および立ち下がりエッジ検出部2を構成するゲートG2の他方の入力端子に入力されている。
The output signal S5 is input to the second input terminal of the gate G7 constituting the
状態stat=0のときにedger入力(信号SG3)が1になると状態stat=1に遷移し、状態stat=1の時にedgef入力(信号SG4)が1になると状態stat=0に遷移する。これ以外の状態/入力の組み合わせに対しては現状を維持する。 When the edger input (signal SG3) becomes 1 when the state stat = 0, the state stat = 1 transitions. When the edgef input (signal SG4) becomes 1 when the state stat = 1, the state stat = 0 transitions. The current state is maintained for other state / input combinations.
なお、Hi信号生成部3を構成する3個のフリップフロップFF3〜FF5のクロック端子と、Low信号生成部4を構成する3個のフリップフロップFF6〜FF8のクロック端子と、ステートマシン部5のクロック端子には、クロック発生部7からクロックCLKが入力されている。
The clock terminals of the three flip-flops FF3 to FF5 constituting the Hi
図2(A)は立ち上がりエッジ検出部1の動作を説明するタイミングチャート、(B)は立ち下がりエッジ検出部2の動作を説明するタイミングチャートである。
FIG. 2A is a timing chart for explaining the operation of the rising
(a)立ち上がりエッジ検出部1において、ステートマシン部5の出力信号S5がLowの時、入力信号S1の立ち上がりエッジによりフリップフロップFF1の出力信号SF1がHiに遷移する。
(b)以降、ゲートG3の出力信号SG3がHiになるまで、フリップフロップFF1の出力信号SF1はHiに固定される。
(c)ゲートG3の出力信号SG3がHiになると、フリップフロップFF1の出力信号SF1はLowに固定される。
(A) In the rising
(B) Thereafter, the output signal SF1 of the flip-flop FF1 is fixed to Hi until the output signal SG3 of the gate G3 becomes Hi.
(C) When the output signal SG3 of the gate G3 becomes Hi, the output signal SF1 of the flip-flop FF1 is fixed to Low.
(d)ゲートG3の出力信号SG3がLowに戻ると、再びステートマシン部5の出力信号S5がLowの時の入力信号S1の立ち上がりエッジを待機する状態となる。
(e)ステートマシン部5の出力信号S5がHiの時は、入力信号S1に立ち上がりエッジがあってもフリップフロップFF1の出力信号SF1は変化しない。
(D) When the output signal SG3 of the gate G3 returns to Low, the state again waits for the rising edge of the input signal S1 when the output signal S5 of the
(E) When the output signal S5 of the
(a)立ち下がりエッジ検出部2において、ステートマシン部5の出力信号S5がHiの時、入力信号S1の立ち下がりエッジによりフリップフロップFF2の出力信号SF2がHiに遷移する。
(b)以降、ゲートG4の出力信号SG4がHiになるまで、フリップフロップFF2の出力信号SF2はHiに固定される。
(c)ゲートG4の出力信号SG4がHiになると、フリップフロップFF2の出力信号SF2はLowに固定される。
(A) In the falling
(B) Thereafter, the output signal SF2 of the flip-flop FF2 is fixed to Hi until the output signal SG4 of the gate G4 becomes Hi.
(C) When the output signal SG4 of the gate G4 becomes Hi, the output signal SF2 of the flip-flop FF2 is fixed to Low.
(d)ゲートG4の出力信号SG4がLowに戻ると、再び信号S5がHiの時の入力信号S1の立ち下がりエッジによりHiに遷移するのを待機する状態となる。
(e)ステートマシン部5の出力信号S5がLowの時は、入力信号S1に立ち下がりエッジがあってもフリップフロップFF2の出力信号SF2は変化しない。
(D) When the output signal SG4 of the gate G4 returns to Low, the state again waits for transition to Hi due to the falling edge of the input signal S1 when the signal S5 is Hi.
(E) When the output signal S5 of the
図3は、Hi信号生成部3の動作を説明するタイミングチャートである。
(a)フリップフロップFF3,FF4はクロックCLKの立ち上がりエッジでその出力信号SF3,SF4を更新する。
(b)フリップフロップFF5はクロックCLKの立ち下がりエッジでその出力信号SF5を更新する。
(c)フリップフロップFF1の出力信号SF1はクロックCLKに対して非同期で変化する信号であるため、フリップフロップFF3はいわゆる同期化フリップフロップとして動作する。
FIG. 3 is a timing chart for explaining the operation of the Hi
(A) The flip-flops FF3 and FF4 update their output signals SF3 and SF4 at the rising edge of the clock CLK.
(B) The flip-flop FF5 updates its output signal SF5 at the falling edge of the clock CLK.
(C) Since the output signal SF1 of the flip-flop FF1 changes asynchronously with the clock CLK, the flip-flop FF3 operates as a so-called synchronized flip-flop.
(d)フリップフロップFF4,FF5およびゲートG3により、立ち上がりエッジを検出するためのパルス生成回路を構成する。ゲートG3の出力信号SG3には、フリップフロップFF1の出力信号SF1の立ち上がりに対して、クロックCLKの半周期の幅を有する1パルスが現れる。 (D) A flip-flop FF4, FF5 and gate G3 constitute a pulse generation circuit for detecting a rising edge. In the output signal SG3 of the gate G3, one pulse having a width of a half cycle of the clock CLK appears with respect to the rise of the output signal SF1 of the flip-flop FF1.
なお、Low信号生成部4は、入力信号と出力信号が異なるだけで動作はHi信号生成部3と同じであり、説明は省略する。
The operation of the Low
ステートマシン部5は、状態stat=0のときにedger入力(ゲートG3の出力信号SG3)が1になると状態stat=1に遷移する。また状態stat=1の時にedgef入力(ゲートG4の出力信号SG4)が1になると状態stat=0に遷移する。これ以外の状態/入力の組み合わせに対しては現状を維持する。
The
出力生成部6において、ゲートG5は、フリップフロップFF1の出力信号SF1、この信号SF1をクロックCLKの立ち上がりでサンプリングしたフリップフロップFF3の出力信号SF3およびこの信号SF3をクロックCLKの立ち下がりでサンプリングしたフリップフロップFF5の出力信号SF5の論理和信号SG5を出力する。
In the
一方、ゲートG6は、フリップフロップFF1の出力信号SF2、この信号SF2をクロックCLKの立ち上がりでサンプリングしたフリップフロップFF6の出力信号SF6およびこの信号SF6をクロックCLKの立ち下がりでサンプリングしたフリップフロップFF8の出力信号SF8の論理和信号SG6を出力する。 On the other hand, the gate G6 outputs the output signal SF2 of the flip-flop FF1, the output signal SF6 of the flip-flop FF6 obtained by sampling the signal SF2 at the rising edge of the clock CLK, and the output of the flip-flop FF8 obtained by sampling the signal SF6 at the falling edge of the clock CLK. A logical sum signal SG6 of the signal SF8 is output.
そして、ゲートG7は、ゲートG5の出力信号SG5、ゲートG6の出力信号SG6およびステートマシン部5の出力信号S5から出力信号S2を生成する。動作の詳細は後述する。
The gate G7 generates an output signal S2 from the output signal SG5 of the gate G5, the output signal SG6 of the gate G6, and the output signal S5 of the
図4は、図1の回路全体の動作を説明するタイミングチャートである。
はじめに、入力信号S1の立ち上がり時にチャタリングが含まれない例について説明する。
(a)ステートマシン部5の出力信号S5がLowの時、入力信号S1の立ち上がりエッジによりフリップフロップFF1の出力信号SF1がHiに遷移する。ステートマシン部5の出力信号S5がHiの時は、入力信号S1に立ち上がりエッジがあってもフリップフロップFF1の出力信号SF1は変化しない。
(b)フリップフロップFF1の出力信号SF1の立ち上がりエッジはHi信号生成部3により検出され、ゲートG3の出力信号SG3にHiパルスが表れる。
FIG. 4 is a timing chart for explaining the operation of the entire circuit of FIG.
First, an example in which chattering is not included when the input signal S1 rises will be described.
(A) When the output signal S5 of the
(B) The rising edge of the output signal SF1 of the flip-flop FF1 is detected by the
(c)ゲートG3の出力信号SG3のHiパルスが立ち下がるまでの間は、入力信号S1がどのように変化してもフリップフロップFF1の出力信号SF1に立ち上がりエッジは表れない。
(d)信号SG3のHiパルスがステートマシン部5に入力されることで、ステートマシン部5の出力信号S5がHiに遷移する。
(e)(a)の入力信号S1の立ち上がりからステートマシン部5の出力信号S5がHiに遷移するまでの間は、立ち下がりエッジ検出部2の出力であるフリップフロップFF2の出力信号SF2はLowに固定される。
(C) Until the Hi pulse of the output signal SG3 of the gate G3 falls, no rising edge appears in the output signal SF1 of the flip-flop FF1 regardless of how the input signal S1 changes.
(D) When the Hi pulse of the signal SG3 is input to the
(E) From the rise of the input signal S1 in (a) until the output signal S5 of the
(f)ゲートG5の出力信号SG5は、フリップフロップFF3,FF4,FF5の出力信号SF3,SF4,SF5の論理和として生成される。出力信号S2は、ゲートG5の出力信号SG5およびステートマシン部5の出力信号S5により、ゲートG6の出力信号SG6がHiに遷移まではHiレベルに保持される。
(g)これら(c),(e),(f)から明らかなように、(a)に示す入力信号S1の立ち上がりからステートマシン部5の出力信号S5がHiに遷移するまでの間は、入力信号S1がいくらトグルしても、すなわちチャタリングしている状態となっても、出力信号S2はトグルしない。
(F) The output signal SG5 of the gate G5 is generated as a logical sum of the output signals SF3, SF4, SF5 of the flip-flops FF3, FF4, FF5. The output signal S2 is held at the Hi level until the output signal SG6 of the gate G6 transitions to Hi by the output signal SG5 of the gate G5 and the output signal S5 of the
(G) As is clear from these (c), (e), and (f), from the rising of the input signal S1 shown in (a) until the output signal S5 of the
次に、入力信号S1の立ち下がり時にチャタリングが含まれない例について説明する。
(h)ステートマシン部5の出力信号S5がHiの時、入力信号S1の立ち下がりエッジによりフリップフロップFF2の出力信号SF2がHiに遷移する。ステートマシン部5の出力信号S5がLowの時は、入力信号S1に立ち下がりエッジがあってもフリップフロップFF2の出力信号SF2は変化しない。
(i)フリップフロップFF2の出力信号SF2の立ち上がりエッジはLow信号生成部4により検出され、ゲートG4の出力信号SG4にHiパルスが表れる。
(j)ゲートG4の出力信号SG4のHiパルスが立ち下がるまでの間は、入力信号S1がどのように変化しても、フリップフロップFF2の出力信号SF2には立ち上がりエッジは表れない。
Next, an example in which chattering is not included when the input signal S1 falls will be described.
(H) When the output signal S5 of the
(I) The rising edge of the output signal SF2 of the flip-flop FF2 is detected by the Low
(J) No rising edge appears in the output signal SF2 of the flip-flop FF2 until the Hi pulse of the output signal SG4 of the gate G4 falls, no matter how the input signal S1 changes.
(k)ゲートG4の出力信号SG4のHiパルスがステートマシン部5に入力されることで、ステートマシン部5の出力信号S5がLowに遷移する。
(l)(h)に示す入力信号S1の立ち上がりからステートマシン部5の出力信号S5がLowに遷移するまでの間は、立ち上がりエッジ検出部1の出力であるフリップフロップFF1の出力信号SF1はLowに固定される。
(m)ゲートG6の出力信号SG6は、フリップフロップFF6,FF7,FF8の出力信号SF6,SF7,SF8の論理和として生成される。出力信号S2は、ゲートG6の出力信号SG6およびステートマシン部5の出力信号S5により、ゲートG5の出力信号SG5がHiに遷移するまではLowレベルを保持する。
(n)これら(j),(l),(m)から明らかなように、(h)に示す入力信号S1の立ち下がりからステートマシン部5の出力信号S5がLowに遷移するまでの間は、入力信号S1がいくらトグルしても、すなわちチャタリングしている状態となっても、出力信号S2はトグルしない。
(K) When the Hi pulse of the output signal SG4 of the gate G4 is input to the
(L) From the rising edge of the input signal S1 shown in (h) until the output signal S5 of the
(M) The output signal SG6 of the gate G6 is generated as a logical sum of the output signals SF6, SF7, SF8 of the flip-flops FF6, FF7, FF8. The output signal S2 is kept at the low level until the output signal SG5 of the gate G5 transits to Hi due to the output signal SG6 of the gate G6 and the output signal S5 of the
(N) As is clear from these (j), (l), and (m), from the falling edge of the input signal S1 shown in (h) until the output signal S5 of the
図5は、入力信号S1の立ち上がり時にチャタリングが含まれる例の動作を説明するタイミングチャートである。符号(a)〜(g)を付した部分の動作は図4と同様であり、それらの説明は省略する。 FIG. 5 is a timing chart for explaining the operation of an example in which chattering is included when the input signal S1 rises. The operations of the parts denoted by reference numerals (a) to (g) are the same as those in FIG.
入力信号S1はチャタリングを含んでいるが、(g)の区間に注目すると、以下のようになっている。
1)立ち上がりエッジ検出部1のフリップフロップFF1の出力信号SF1は一度立ち上がるとHi信号生成部3を構成するゲートG3の出力信号SG3のHiパルスが立ち下がるまでの間は再び立ち上がることはない
2)立ち下がりエッジ検出部2のフリップフロップFF2の出力信号SF2はステートマシン部5の出力信号S5がHi信号生成部3を構成するゲートG3の出力信号SG3のHiパルスが立ち下がるまでの間はLowに固定されていることから立ち上がることはない
The input signal S1 includes chattering, but attention is paid to the section (g) as follows.
1) Once the output signal SF1 of the flip-flop FF1 of the rising
よって、この区間は、最初に入力信号S1が立ち上がり、それによりゲートG5の出力信号SG5が立ち上がった以降は、入力信号S1が何回トグルしても、すなわちチャタリングが発生しても、ステートマシン部5の出力信号S5、ゲートG5の出力信号SG5およびゲートG6の出力信号SG6は変化しない。 Therefore, in this section, after the input signal S1 rises first and the output signal SG5 of the gate G5 rises, the state machine unit no matter how many times the input signal S1 toggles, that is, no chattering occurs. 5, the output signal S5 of 5, the output signal SG5 of the gate G5, and the output signal SG6 of the gate G6 do not change.
ゲートG3の出力信号SG3におけるHiパルスの立ち下がりは、入力信号S1の立ち上がりからクロックCLKの2つ目の立ち上がりエッジで発生することから、入力信号S1のトグルから数えてクロックCLKの2つ目の立ち上がりエッジまでの区間がチャタリング除去期間となることがわかる。 Since the fall of the Hi pulse in the output signal SG3 of the gate G3 occurs at the second rising edge of the clock CLK from the rise of the input signal S1, the second of the clock CLK counted from the toggle of the input signal S1. It can be seen that the period up to the rising edge is the chattering removal period.
(o)チャタリング除去期間が過ぎた後、入力信号S1がトグルした場合、ステートマシン部5の出力信号S5がHiになっていることから、今度は立ち下がりエッジ検出部2のフリップフロップFF2の出力SF2が立ち上がる。このように、チャタリング除去区間を過ぎた後の入力信号S1のトグルに対して出力信号S2が追従して変化する。
(O) When the input signal S1 toggles after the chattering removal period has passed, the output signal S5 of the
これら(g),(n),(o)から、次のことがいえる。
1)入力信号S1の定常状態が続いた後の最初のトグルから数えてクロックCLKの2つ目の立ち上がりエッジまでの間がチャタリング除去区間となる。
2)入力信号S1の最初のトグルにより出力信号S2がトグルする。それ以降は入力信号S1がトグルしても(チャタリングがあっても)、チャタリング除去区間中は出力信号S2はトグルしない。
From these (g), (n), and (o), the following can be said.
1) The chattering elimination period is from the first toggle after the steady state of the input signal S1 to the second rising edge of the clock CLK.
2) The output signal S2 toggles with the first toggle of the input signal S1. Thereafter, even if the input signal S1 is toggled (even if chattering is present), the output signal S2 is not toggled during the chattering elimination period.
3)チャタリング除去区間経過後は、再び入力信号S1のトグルにより出力信号S2がトグルする。
4)チャタリング除去区間の長さは、クロックCLKと入力信号S1の最初のトグルとのタイミング関係により、最短でクロックCLKの1周期の長さ、最長でクロックCLKの2周期の長さとなる。
3) After the chattering elimination period has elapsed, the output signal S2 toggles again by the toggle of the input signal S1.
4) The length of the chattering elimination period is as short as one cycle of the clock CLK and as long as two cycles of the clock CLK, depending on the timing relationship between the clock CLK and the first toggle of the input signal S1.
図6は、本発明に基づくチャタリング除去区間を説明するタイミングチャートである。図6において、出力信号S2が入力信号S1のチャタリングの最初のエッジによりトグルされる時刻t1までは定常状態である。出力信号S2がトグルされる時刻t1からクロックCLKの2つ目のエッジが立ち上がる時刻t2までの時間はチャタリング除去可能区間内であり、この区間内では入力信号S1がトグルしても出力信号S2はトグルされない。 FIG. 6 is a timing chart for explaining the chattering elimination section according to the present invention. In FIG. 6, it is in a steady state until time t1 when the output signal S2 is toggled by the first edge of chattering of the input signal S1. The time from the time t1 when the output signal S2 is toggled to the time t2 when the second edge of the clock CLK rises is within the chattering elimination interval, and the output signal S2 does not change even if the input signal S1 is toggled within this interval. Not toggled.
時刻t2以降はチャタリング除去可能区間外になり、時刻t3で入力信号S1が立ち下がると出力信号S2はトグルされ、これが最初のエッジになる。そして、出力信号S2がトグルされる時刻t3からクロックCLKの2つ目のエッジが立ち上がる時刻t4までの時間が再びチャタリング除去可能区間内になり、この区間内では入力信号S1がトグルしても出力信号S2はトグルされない。 After time t2, it is outside the chattering-removable section, and when the input signal S1 falls at time t3, the output signal S2 is toggled, and this becomes the first edge. Then, the time from the time t3 when the output signal S2 is toggled to the time t4 when the second edge of the clock CLK rises again falls within the chattering elimination interval, and the output is performed even if the input signal S1 is toggled within this interval. Signal S2 is not toggled.
図7は、本発明に基づくチャタリング除去区間の長短を説明するタイミングチャートである。図7において、出力信号S2が入力信号S1のチャタリングの最初のエッジによりトグルされる時刻t1からクロックCLKの2つ目のエッジが立ち上がる時刻t2までのチャタリング除去可能区間Aは、クロックCLKの立ち上がりエッジの直後に入力信号S1のチャタリングの最初のエッジが立ち上がってトグルが発生している例である。このチャタリング除去区間AはクロックCLKの2周期の長さで最長になる。 FIG. 7 is a timing chart for explaining the length of the chattering elimination section according to the present invention. In FIG. 7, the chattering elimination interval A from time t1 when the output signal S2 is toggled by the first edge of chattering of the input signal S1 to time t2 when the second edge of the clock CLK rises is the rising edge of the clock CLK. This is an example in which the first edge of the chattering of the input signal S1 rises immediately after the occurrence of toggle. This chattering elimination section A is the longest in the length of two periods of the clock CLK.
これに対し、出力信号S2が入力信号S1のチャタリングの最初のエッジによりトグルされる時刻t3からクロックCLKの2つ目のエッジが立ち上がる時刻t4までのチャタリング除去可能区間Bは、クロックCLKの立ち上がりエッジの直前に入力信号S1のチャタリングの最初のエッジが立ち下がってトグルが発生している例である。このチャタリング除去区間BはクロックCLKの1周期の長さで最短になる。 On the other hand, the chattering elimination interval B from the time t3 when the output signal S2 is toggled by the first edge of the chattering of the input signal S1 to the time t4 when the second edge of the clock CLK rises is the rising edge of the clock CLK. This is an example in which the first edge of the chattering of the input signal S1 falls immediately before the occurrence of toggle. This chattering elimination section B is the shortest in the length of one cycle of the clock CLK.
このような構成によれば、入力信号S1のトグルを起点として、クロックCLKの所定周期数の期間、入力信号S1をマスクする制御信号を生成することから、一定期間内のチャタリングを確実に除去することができる。 According to such a configuration, since the control signal for masking the input signal S1 is generated for a period of a predetermined number of cycles of the clock CLK starting from the toggle of the input signal S1, chattering within a certain period is reliably removed. be able to.
そして、SRラッチは使用せず、外部からの特別な信号入力も不要で一般的なクロックで動作可能でクロックツリー生成とも相性が良いことから、ASICへの実装設計も容易に行える。 Since the SR latch is not used, no special signal input from the outside is required, the operation can be performed with a general clock, and the compatibility with the clock tree generation is easy, so that the mounting design to the ASIC can be easily performed.
図8は本発明の他の実施例を示すブロック図であり、図1と共通する部分には同一の符号を付けている。図8において、Hi信号生成部3を構成するフリップフロップFF3の後段にフリップフロップFF9を追加し、Low信号生成部4を構成するフリップフロップFF6の後段にフリップフロップFF10を追加し、出力生成部6を構成するゲートG5,G6を3入力から4入力に変更している。
FIG. 8 is a block diagram showing another embodiment of the present invention, and the same reference numerals are given to portions common to FIG. In FIG. 8, a flip-flop FF9 is added after the flip-flop FF3 constituting the Hi
フリップフロップFF9の出力信号SF9は、フリップフロップFF4およびFF5のデータ入力端子に入力されるとともに出力生成部6を構成するゲートG5の第3の入力端子に入力されている。
The output signal SF9 of the flip-flop FF9 is input to the data input terminals of the flip-flops FF4 and FF5, and is also input to the third input terminal of the gate G5 constituting the
フリップフロップFF10の出力信号SF10は、フリップフロップFF7およびFF8のデータ入力端子に入力されるとともに出力生成部6を構成するゲートG6の第3の入力端子に入力されている。
The output signal SF10 of the flip-flop FF10 is input to the data input terminals of the flip-flops FF7 and FF8, and is also input to the third input terminal of the gate G6 that constitutes the
図9は、図8の動作を説明するタイミングチャートである。図8のように構成することにより、チャタリング除去可能区間を図1の構成に比べて1クロック延長できる。 FIG. 9 is a timing chart for explaining the operation of FIG. With the configuration shown in FIG. 8, the chattering-removable section can be extended by one clock compared to the configuration shown in FIG.
図9において、出力信号S2が入力信号S1のチャタリングの最初のエッジによりトグルされる時刻t1からクロックCLKの3つ目のエッジが立ち上がる時刻t2までのチャタリング除去可能区間Cは、クロックCLKの立ち上がりエッジの直後に入力信号S1のチャタリングの最初のエッジが立ち上がってトグルが発生している例である。このチャタリング除去区間CはクロックCLKの3周期の長さで最長になる。 In FIG. 9, the chattering elimination interval C from time t1 when the output signal S2 is toggled by the first edge of chattering of the input signal S1 to time t2 when the third edge of the clock CLK rises is the rising edge of the clock CLK. This is an example in which the first edge of the chattering of the input signal S1 rises immediately after the occurrence of toggle. This chattering elimination section C is the longest with the length of three periods of the clock CLK.
これに対し、出力信号S2が入力信号S1のチャタリングの最初のエッジによりトグルされる時刻t3からクロックCLKの3つ目のエッジが立ち上がる時刻t4までのチャタリング除去可能区間Dは、クロックCLKの立ち上がりエッジの直前に入力信号S1のチャタリングの最初のエッジが立ち下がってトグルが発生している例である。このチャタリング除去区間DはクロックCLKの2周期の長さで最短になる。 On the other hand, the chattering elimination interval D from the time t3 when the output signal S2 is toggled by the first edge of the chattering of the input signal S1 to the time t4 when the third edge of the clock CLK rises is the rising edge of the clock CLK. This is an example in which the first edge of the chattering of the input signal S1 falls immediately before the occurrence of toggle. This chattering elimination section D is the shortest in the length of two periods of the clock CLK.
図8のブロック図および図9のタイミングチャートに示すように、フリップフロップFF3とフリップフロップFF4の間およびフリップフロップFF6とフリップフロップFF7の間に直列接続するフリップフロップの段数分に応じて、チャタリング除去可能区間が延長される。これら直列接続するフリップフロップの段数は、設定したいチャタリング除去可能区間に応じて0,1,2,3,…と任意に選定すればよい。 As shown in the block diagram of FIG. 8 and the timing chart of FIG. 9, chattering elimination is performed according to the number of flip-flops connected in series between the flip-flops FF3 and FF4 and between the flip-flops FF6 and FF7. The possible section is extended. The number of flip-flops connected in series may be arbitrarily selected as 0, 1, 2, 3,... According to the chattering-removable section to be set.
なお、出力生成部6のゲートG5,G6の入力端子数も直列接続するフリップフロップの段数に合わせて変更する必要がある。
Note that the number of input terminals of the gates G5 and G6 of the
また、上記各実施例では、出力生成部6のゲートG5としてオアゲートを用いる例を示しているが、これに限るものではなく、入力信号S1の立ち上がりエッジからステートマシン部5の出力信号S5がHiに切り替わるまでの間、出力信号S2のHi状態を出力できれば他のゲートの組み合わせであってもよい。
In each of the above embodiments, an example in which an OR gate is used as the gate G5 of the
同様に、出力生成部6のゲートG6としてオアゲートを用いる例を示しているが、これに限るものではなく、入力信号S1の立ち下がりエッジからステートマシン部5の出力信号S5がLowに切り替わるまでの間、出力信号S2のLow状態を出力できれば他のゲートの組み合わせであってもよい。
Similarly, an example in which an OR gate is used as the gate G6 of the
Hi信号生成部3のフリップフロップFF4,FF5、ゲートG3およびLow信号生成部4のフリップフロップ FF7, FF8、ゲートG4はそれぞれ立ち上がり検出パルス生成回路を構成しているが、フリップフロップFF1,FF2の出力信号SF1,SF2の立ち上がりエッジを検出してパルスを生成する回路であれば、どのような構成でもよく、パルス生成のレイテンシおよびパルス幅も任意に設定できる。
The flip-flops FF4 and FF5 of the Hi
ただし、レイテンシおよびパルス幅により、チャタリング除去可能区間が変化する。具体的には、フリップフロップFF1,FF2の出力信号SF1,SF2からの同期化フリップフロップFF3,FF6を含めたレイテンシ+パルス幅がチャタリング除去可能区間となる。 However, the chattering elimination interval varies depending on the latency and the pulse width. Specifically, the latency + pulse width including the synchronized flip-flops FF3 and FF6 from the output signals SF1 and SF2 of the flip-flops FF1 and FF2 is a chattering-removable section.
ステートマシン部5は、次の動作に沿う限り、実装方法や内部状態数は問わない。
1)クロックCLKの立ち上がりエッジで内部状態を更新する。
2)出力信号S5として状態stat=0の間はLowを出力し、状態stat=1の間はHiを出力する。
3)状態stat=0のときにedger入力(ゲートG3の出力信号SG3)がHiになると状態stat=1に遷移し、状態stat=1の時にedgef入力(ゲートG4の出力信号SG4)がHiになると状態stat=0に遷移し、これ以外の状態/入力の組み合わせに対しては現状を維持する。
As long as the
1) Update the internal state at the rising edge of the clock CLK.
2) Output signal S5 outputs Low during state stat = 0, and outputs Hi during state stat = 1.
3) When edger input (output signal SG3 of gate G3) becomes Hi when state stat = 0, transition to state stat = 1, and when edge stat = 1, edgef input (output signal SG4 of gate G4) becomes Hi Then, the state transits to stat = 0, and the current state is maintained for other state / input combinations.
上記各実施例では、立ち上がりエッジ検出部1を構成するフリップフロップFF1および立ち下がり検出部2を構成するフリップフロップFF2のデータ入力端子はHiレベルに固定されているが、Lowレベル固定でもよい。その場合は、データ入力がLowレベルに固定されているとすると、フリップフロップFF1,FF2のクロックの立ち上がりにより、Hi→Lowのレベル変化が発生する。この状態をLowに戻すためには非同期リセット入力ではなく非同期セット入力を用いる。そして、Hi→Lowのレベル変化を検出するために立ち下がり検出パルス生成回路を用いる。
In the above embodiments, the data input terminals of the flip-flop FF1 constituting the rising
図10も本発明の他の実施例を示すブロック図であり、図8と共通する部分には同一の符号を付けている。図10において、Hi信号生成部3を構成するフリップフロップFF9の後段にフリップフロップFF3の出力信号SF3とフリップフロップFF9の出力信号SF9を選択してフリップフロップFF4およびFF5のデータ入力端子に入力するセレクタSEL1を設け、Low信号生成部4を構成するフリップフロップFF10の後段にフリップフロップFF6の出力信号SF6とフリップフロップFF10の出力信号SF10を選択してフリップフロップFF7およびFF8のデータ入力端子に入力するセレクタSEL2を設けたものである。
FIG. 10 is also a block diagram showing another embodiment of the present invention, and the same reference numerals are given to portions common to FIG. In FIG. 10, the selector that selects the output signal SF3 of the flip-flop FF3 and the output signal SF9 of the flip-flop FF9 at the subsequent stage of the flip-flop FF9 constituting the Hi
これらセレクタSEL1,SEL2はセレクト信号Sselに応じて連動駆動され、それぞれいずれかのフリップフロップの出力信号を選択して後段に出力する。すなわち、セレクタSEL1はフリップフロップFF3の出力信号SF3またはフリップフロップFF9の出力信号SF9を選択してフリップフロップFF4およびFF5のデータ入力端子に入力し、セレクタSEL2はフリップフロップFF6の出力信号SF6またはフリップフロップFF10の出力信号SF10を選択してフリップフロップFF7およびFF8のデータ入力端子に入力する。 These selectors SEL1 and SEL2 are driven in response to a select signal Ssel, and select the output signal of any flip-flop and output it to the subsequent stage. That is, the selector SEL1 selects the output signal SF3 of the flip-flop FF3 or the output signal SF9 of the flip-flop FF9 and inputs it to the data input terminals of the flip-flops FF4 and FF5, and the selector SEL2 selects the output signal SF6 or flip-flop of the flip-flop FF6. The output signal SF10 of the FF10 is selected and input to the data input terminals of the flip-flops FF7 and FF8.
セレクタSEL1がフリップフロップFF3の出力信号SF3を選択してフリップフロップFF4およびFF5のデータ入力端子に入力し、セレクタSEL2がフリップフロップFF6の出力信号SF6を選択してフリップフロップFF7およびFF8のデータ入力端子に入力する状態は実質的に図1の実施例回路と等しくなる。したがって、図7のタイミングチャートで示したように、クロックCLKの2周期の長さを有する最長のチャタリング除去区間Aと、クロックCLKの1周期の長さを有する最短のチャタリング除去区間Bを設定できる。 The selector SEL1 selects the output signal SF3 of the flip-flop FF3 and inputs it to the data input terminals of the flip-flops FF4 and FF5. The selector SEL2 selects the output signal SF6 of the flip-flop FF6 and the data input terminals of the flip-flops FF7 and FF8. The state input to is substantially the same as that of the embodiment circuit of FIG. Therefore, as shown in the timing chart of FIG. 7, the longest chattering removal section A having the length of two periods of the clock CLK and the shortest chattering removal section B having the length of one period of the clock CLK can be set. .
セレクタSEL1がフリップフロップFF9の出力信号SF9を選択してフリップフロップFF4およびFF5のデータ入力端子に入力し、セレクタSEL2がフリップフロップFF10の出力信号SF10を選択してフリップフロップFF7およびFF8のデータ入力端子に入力する状態は実質的に図8の実施例回路と等しくなる。したがって、図9のタイミングチャートで示したように、クロックCLKの3周期の長さを有する最長のチャタリング除去区間Cと、クロックCLKの2周期の長さを有する最短のチャタリング除去区間Dを設定できる。 The selector SEL1 selects the output signal SF9 of the flip-flop FF9 and inputs it to the data input terminals of the flip-flops FF4 and FF5, and the selector SEL2 selects the output signal SF10 of the flip-flop FF10 and the data input terminals of the flip-flops FF7 and FF8. The state input to is substantially the same as that of the embodiment circuit of FIG. Therefore, as shown in the timing chart of FIG. 9, the longest chattering removal section C having the length of three periods of the clock CLK and the shortest chattering removal section D having the length of two periods of the clock CLK can be set. .
このように、セレクト信号Sselの切替に応じてHi信号生成部3およびLow信号生成部4内における立ち上がり検出パルス生成のレイテンシが変化することになり、セレクト信号Sselの切替に応じてチャタリング除去可能区間の長さを制御できる。
In this manner, the rise detection pulse generation latency in the Hi
図10の実施例によれば、入力信号S1の状況に応じて、チャタリング除去可能区間の長さを切替調整できる。 According to the embodiment of FIG. 10, the length of the chattering-removable section can be switched and adjusted according to the state of the input signal S1.
なお、Hi信号生成部3およびLow信号生成部4内のフリップフロップの段数およびセレクタSEL1,SEL2の入力端子数は必要に応じて増減すればよく、チャタリング除去可能区間の選択肢を2以上に拡張することが可能である。
Note that the number of flip-flops in the Hi
以上説明したように、本発明によれば、ASIC設計との相性がよく、所定期間内のチャタリングを確実に除去することができ、さらにチャタリング除去区間を容易に選択できるチャタリング除去回路を提供することができ、たとえばトグル時に発生するチャタリングに起因するデジタル回路の誤動作防止手段として好適である。 As described above, according to the present invention, there is provided a chattering removal circuit that is compatible with ASIC design, can reliably remove chattering within a predetermined period, and can easily select a chattering removal section. For example, it is suitable as a means for preventing malfunction of a digital circuit caused by chattering that occurs during toggle.
1 立ち上がりエッジ検出部
2 立ち下がりエッジ検出部
3 Hi信号生成部
4 Low信号生成部
5 ステートマシン部
6 出力生成部
7 クロック発生部
DESCRIPTION OF
Claims (3)
入力部にゲートが設けられて出力部にフリップフロップが設けられ入力信号の立ち下がりを検出する立ち下がりエッジ検出部と、
複数のフリップフロップとこれらフリップフロップの出力信号が入力されるゲートとで構成され前記立ち上がりエッジ検出部の出力信号のエッジを検出して所定のパルスを生成しこのパルスを前記立ち上がりエッジ検出部のフリップフロップに帰還入力するHi信号生成部と、
複数のフリップフロップとこれらフリップフロップの出力信号が入力されるゲートとで構成され前記立ち下がりエッジ検出部の出力信号のエッジを検出して所定のパルスを生成しこのパルスを前記立ち下がりエッジ検出部のフリップフロップに帰還入力するLow信号生成部と、
これらHi信号生成部およびLow信号生成部から生成出力されるパルスに基づき状態が遷移する出力信号を生成し前記立ち上がりエッジ検出部および立ち下がりエッジ検出部の各ゲートに帰還入力するステートマシン部と、
前記Hi信号生成部を構成する複数のフリップフロップの出力信号が入力される第1のゲートと、前記Low信号生成部を構成する複数のフリップフロップの出力信号が入力される第2のゲートと、これら第1および第2のゲートの出力信号と前記ステートマシン部の出力信号に基づき出力信号を生成する第3のゲートとで構成された出力生成部、
からなるチャタリング除去回路。 A rising edge detector that includes a gate in the input unit and a flip-flop in the output unit to detect the rising edge of the input signal;
A falling edge detection unit for detecting a falling edge of an input signal in which a gate is provided in an input unit and a flip-flop is provided in an output unit;
It is composed of a plurality of flip-flops and gates to which the output signals of these flip-flops are input, detects an edge of the output signal of the rising edge detector, generates a predetermined pulse, and uses this pulse as a flip-flop of the rising edge detector Hi signal generator for feedback input to the
It comprises a plurality of flip-flops and a gate to which the output signals of these flip-flops are input, detects an edge of the output signal of the falling edge detector, generates a predetermined pulse, and generates this pulse as the falling edge detector Low signal generator for feedback input to the flip-flop,
A state machine unit that generates an output signal whose state transitions based on a pulse generated and output from the Hi signal generation unit and the Low signal generation unit and inputs the feedback to each gate of the rising edge detection unit and the falling edge detection unit,
A first gate to which output signals of a plurality of flip-flops constituting the Hi signal generation unit are input; a second gate to which output signals of a plurality of flip-flops constituting the Low signal generation unit are input; An output generation unit composed of an output signal of the first and second gates and a third gate for generating an output signal based on the output signal of the state machine unit;
Chattering elimination circuit consisting of
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012212380A JP5910827B2 (en) | 2012-09-26 | 2012-09-26 | Chattering removal circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012212380A JP5910827B2 (en) | 2012-09-26 | 2012-09-26 | Chattering removal circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014068208A true JP2014068208A (en) | 2014-04-17 |
JP5910827B2 JP5910827B2 (en) | 2016-04-27 |
Family
ID=50744199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012212380A Active JP5910827B2 (en) | 2012-09-26 | 2012-09-26 | Chattering removal circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5910827B2 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS52125263A (en) * | 1976-04-14 | 1977-10-20 | Hitachi Ltd | Chattering prevention circuit |
JPS62216120A (en) * | 1986-03-10 | 1987-09-22 | 富士通株式会社 | Circuit for preventing chattering of switch |
JPH0583094A (en) * | 1991-09-19 | 1993-04-02 | Nec Corp | Filter circuit |
JPH08139576A (en) * | 1994-11-11 | 1996-05-31 | Nec Eng Ltd | Contact point noise elimination circuit |
JPH10126231A (en) * | 1996-10-18 | 1998-05-15 | Matsushita Electric Ind Co Ltd | Chattering removing circuit |
JP2000183704A (en) * | 1998-12-16 | 2000-06-30 | Fujitsu Ltd | Changing signal detection circuit |
JP2003134179A (en) * | 2001-10-25 | 2003-05-09 | Canon Inc | Synchronizing signal shaping circuit, image processor and defect inspection device |
-
2012
- 2012-09-26 JP JP2012212380A patent/JP5910827B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS52125263A (en) * | 1976-04-14 | 1977-10-20 | Hitachi Ltd | Chattering prevention circuit |
JPS62216120A (en) * | 1986-03-10 | 1987-09-22 | 富士通株式会社 | Circuit for preventing chattering of switch |
JPH0583094A (en) * | 1991-09-19 | 1993-04-02 | Nec Corp | Filter circuit |
JPH08139576A (en) * | 1994-11-11 | 1996-05-31 | Nec Eng Ltd | Contact point noise elimination circuit |
JPH10126231A (en) * | 1996-10-18 | 1998-05-15 | Matsushita Electric Ind Co Ltd | Chattering removing circuit |
JP2000183704A (en) * | 1998-12-16 | 2000-06-30 | Fujitsu Ltd | Changing signal detection circuit |
JP2003134179A (en) * | 2001-10-25 | 2003-05-09 | Canon Inc | Synchronizing signal shaping circuit, image processor and defect inspection device |
Also Published As
Publication number | Publication date |
---|---|
JP5910827B2 (en) | 2016-04-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4750564B2 (en) | Reset signal generation circuit | |
US7672393B2 (en) | Single-wire asynchronous serial interface | |
JP2007086960A (en) | Clock switching circuit | |
KR20150064873A (en) | Semiconduct memory device | |
JP2008059193A (en) | Clock switching circuit | |
JP6103825B2 (en) | Semiconductor integrated circuit, information processing device | |
JP2001332961A (en) | Clock-switching circuit | |
JP5910827B2 (en) | Chattering removal circuit | |
JP4854258B2 (en) | Data output time adjustment method for synchronous memory device | |
KR20160076214A (en) | Semiconductor Apparatus | |
JP5154901B2 (en) | Signal generation circuit | |
JP4704184B2 (en) | Test apparatus and test method | |
KR100266691B1 (en) | Hold/reset mode selection counter | |
JP2005518685A (en) | Method and apparatus for clock circuit | |
KR100635873B1 (en) | Embedded system for eliminating a glich | |
JP2007304073A (en) | Semiconductor device and method for executing test of semiconductor device | |
RU2718827C1 (en) | Device for anticipatory time shift of pulses (versions) | |
KR20140023559A (en) | Cas latency setting circuit and semiconductor memory apparatus including the same | |
JP2013036960A (en) | Delay scan test method, semiconductor device, and semiconductor device design method | |
US10928850B2 (en) | First in and first out apparatus and driving method thereof | |
JP2006525750A (en) | Waveform glitch prevention method | |
JP2013156073A (en) | Semiconductor device | |
JP2008109577A (en) | Delay signal generator and method of controlling delay amount | |
KR20110046878A (en) | Self-Refresh Test Circuit of a Semiconductor Memory Apparatus | |
JP5250745B2 (en) | Clock switching circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150608 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160209 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20160302 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160315 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5910827 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |