Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5762116B2 - Asynchronous counter circuit and sampling correction method for asynchronous counter circuit - Google Patents
[go: Go Back, main page]

JP5762116B2 - Asynchronous counter circuit and sampling correction method for asynchronous counter circuit - Google Patents

Asynchronous counter circuit and sampling correction method for asynchronous counter circuit Download PDF

Info

Publication number
JP5762116B2
JP5762116B2 JP2011102117A JP2011102117A JP5762116B2 JP 5762116 B2 JP5762116 B2 JP 5762116B2 JP 2011102117 A JP2011102117 A JP 2011102117A JP 2011102117 A JP2011102117 A JP 2011102117A JP 5762116 B2 JP5762116 B2 JP 5762116B2
Authority
JP
Japan
Prior art keywords
flip
sampling
counter
clock
flop
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.)
Active
Application number
JP2011102117A
Other languages
Japanese (ja)
Other versions
JP2012235290A (en
Inventor
ウィン チャイヴィバース
ウィン チャイヴィバース
正純 丸谷
正純 丸谷
山崎 大輔
大輔 山崎
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.)
Fujitsu Ltd
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Ltd
Fujitsu Semiconductor Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd, Fujitsu Semiconductor Ltd filed Critical Fujitsu Ltd
Priority to JP2011102117A priority Critical patent/JP5762116B2/en
Publication of JP2012235290A publication Critical patent/JP2012235290A/en
Application granted granted Critical
Publication of JP5762116B2 publication Critical patent/JP5762116B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Manipulation Of Pulses (AREA)
  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)

Description

この出願で言及する実施例は、カウンタ回路およびカウンタ回路のサンプリング補正方法に関する。   The embodiment referred to in this application relates to a counter circuit and a sampling correction method for the counter circuit.

近年、カウンタ回路は、様々なシステムで利用されており、例えば、無線回路システムやプロセッサなどのクロックとして、或いは、クロックデータリカバリシステムや基準周波数を必要とする様々なシステムに利用されている。   In recent years, the counter circuit is used in various systems, for example, as a clock for a wireless circuit system or a processor, or used in various systems that require a clock data recovery system or a reference frequency.

また、カウンタ回路は、回路のキャリブレーションや補正システムにも利用されている。具体的に、例えば、オールデジタルPLL(ADPLL)において、より高い周波数で動作させるには、それに対応した高周波数のカウンタ回路が不可欠になっている。   The counter circuit is also used for circuit calibration and correction systems. Specifically, for example, in an all-digital PLL (ADPLL), in order to operate at a higher frequency, a high-frequency counter circuit corresponding thereto is indispensable.

ところで、従来、カウンタ回路としては、様々なものが提案されている。   By the way, conventionally, various counter circuits have been proposed.

特開平06−197012号公報Japanese Patent Laid-Open No. 06-197012 特開2007−215213号公報JP 2007-215213 A 特開昭61−164332号公報JP 61-164332 A 特開昭63−010914号公報Japanese Patent Laid-Open No. 63-010914

従来、カウンタ回路としては、同期式カウンタ回路および非同期式カウンタ回路の2種類が知られている。   Conventionally, two types of counter circuits are known: a synchronous counter circuit and an asynchronous counter circuit.

同期式カウンタ回路の出力は、クロックと同期しているため、その出力のサンプリングは、同期したクロックでサンプリングすれば問題は生じない。   Since the output of the synchronous counter circuit is synchronized with the clock, there is no problem if the output is sampled with the synchronized clock.

しかしながら、同期式カウンタ回路において、一番長い信号経路(クリティカルパス:critical path)は、例えば、カウントするフリップフロップの段数に従って延びるため、高い周波数の動作には向いていない。さらに、全てのクロックを一番高い周波数のクロックでドライブするために、消費電力が大きくなり、また、電源ノイズも大きくなる。   However, in the synchronous counter circuit, the longest signal path (critical path) extends according to, for example, the number of flip-flops to count, and thus is not suitable for high-frequency operation. Further, since all the clocks are driven by the clock having the highest frequency, the power consumption increases and the power supply noise also increases.

一方、非同期式カウンタ回路では、上述したような同期式カウンタ回路における問題は存在しない。しかしながら、例えば、各段(フリップフロップ)が前段の出力をクロックとして使用するため、遅延が各段により積分されることになる。そして、遅延が大きくなると、レース(race)の問題が生じる。このレースの状態が生じると、各段の出力を正しくサンプリングすることが困難になる。   On the other hand, in the asynchronous counter circuit, there is no problem in the synchronous counter circuit as described above. However, for example, since each stage (flip-flop) uses the output of the previous stage as a clock, the delay is integrated by each stage. As the delay increases, a race problem arises. When this race condition occurs, it becomes difficult to correctly sample the output of each stage.

一実施形態によれば、カウンタクロックに従ってカウントし、前記カウンタクロックに非同期のカウント値を算出するカウンタ部と、サンプリング部と、判定部と、を有することを特徴とする非同期式カウンタ回路が提供される。 According to an embodiment, there is provided an asynchronous counter circuit comprising: a counter unit that counts according to a counter clock and calculates a count value asynchronous with the counter clock ; a sampling unit; and a determination unit. The

前記サンプリング部は、前記カウント値を、少なくとも3つのサンプリングクロックで取り込む。前記判定部は、前記少なくとも3つのサンプリングクロックで取り込まれた少なくとも3つのサンプリング値を、前記少なくとも3つのサンプリングクロックにおけるタイミングのずれにより判定する。   The sampling unit captures the count value with at least three sampling clocks. The determination unit determines at least three sampling values captured by the at least three sampling clocks based on timing shifts in the at least three sampling clocks.

開示のカウンタ回路およびカウンタ回路のサンプリング補正方法は、遅延が積分されてレースが生じても、正しいカウント値を出力することができるという効果を奏する。   The disclosed counter circuit and the sampling correction method of the counter circuit have an effect that a correct count value can be output even if a delay is integrated and a race occurs.

同期式カウンタ回路の一例を示す図である。It is a figure which shows an example of a synchronous counter circuit. 図1のカウンタ回路の動作を説明するためのタイミング図である。FIG. 2 is a timing diagram for explaining the operation of the counter circuit of FIG. 1. 非同期式カウンタ回路の一例を示す図である。It is a figure which shows an example of an asynchronous counter circuit. 図3のカウンタ回路の動作を説明するためのタイミング図である。FIG. 4 is a timing chart for explaining the operation of the counter circuit of FIG. 3. 本実施例のカウンタ回路を示す図である。It is a figure which shows the counter circuit of a present Example. 図5のカウンタ回路の動作を説明するためのタイミング図(その1)である。FIG. 6 is a timing diagram (part 1) for explaining the operation of the counter circuit of FIG. 5; 図5のカウンタ回路の動作を説明するためのタイミング図(その2)である。FIG. 6 is a timing diagram (part 2) for explaining the operation of the counter circuit of FIG. 5; 本実施例のカウンタ回路におけるサンプリング補正処理の一例を示すフローチャートである。It is a flowchart which shows an example of the sampling correction process in the counter circuit of a present Example. 本実施例のカウンタ回路におけるサンプリング補正処理の他の例を示すフローチャートである。It is a flowchart which shows the other example of the sampling correction process in the counter circuit of a present Example. 本実施例のカウンタ回路におけるサンプリング補正処理のさらに他の例を示すフローチャートである。It is a flowchart which shows the further another example of the sampling correction | amendment process in the counter circuit of a present Example. 本実施例のカウンタ回路を適用したADPLLの一例を示すブロック図である。It is a block diagram which shows an example of ADPLL to which the counter circuit of a present Example is applied.

まず、カウンタ回路およびカウンタ回路のサンプリング補正方法の実施例を詳述する前に、同期式カウンタ回路および非同期式カウンタ回路、並びに、それらの問題点を図1〜図4を参照して説明する。   First, before describing embodiments of the counter circuit and the sampling correction method of the counter circuit in detail, the synchronous counter circuit and the asynchronous counter circuit and their problems will be described with reference to FIGS.

図1は、同期式カウンタ回路の一例を示す図であり、また、図2は、図1のカウンタ回路の動作を説明するためのタイミング図である。なお、説明を簡略化するために、図1では、Q0〜Q3を示しているが、図2では、Q0〜Q2のみを示している。   FIG. 1 is a diagram showing an example of a synchronous counter circuit, and FIG. 2 is a timing diagram for explaining the operation of the counter circuit of FIG. In order to simplify the explanation, FIG. 1 shows Q0 to Q3, but FIG. 2 shows only Q0 to Q2.

図1に示されるように、同期式カウンタ回路は、カウンタ部111およびサンプラ部112を有し、カウンタ部111でカウントした値をサンプラ部112でサンプリングして出力するようになっている。   As shown in FIG. 1, the synchronous counter circuit includes a counter unit 111 and a sampler unit 112, and the sampler unit 112 samples and outputs the value counted by the counter unit 111.

カウンタ部111は、フリップフロップU0,U1,U2,U3、エクスクルーシブオアゲートEXOR1,EXOR2,EXOR3、並びに、アンドゲートAND2,AND3を有する。ここで、フリップフロップU0〜U3のクロック入力CKには、カウンタクロックCK−DCOが供給されている。   The counter unit 111 includes flip-flops U0, U1, U2, and U3, exclusive OR gates EXOR1, EXOR2, and EXOR3, and AND gates AND2 and AND3. Here, the counter clock CK-DCO is supplied to the clock input CK of the flip-flops U0 to U3.

カウンタ部111において、初段のフリップフロップU0のD入力には、そのフリップフロップU0のNQ出力(Q出力の反転)が供給され、また、2段目のフリップフロップU1のD入力には、EXOR1の出力が供給されている。EXOR1は、U0のQ出力(Q0)およびU1のQ出力(Q1)を受け取り、それらの排他的論理和を出力する。   In the counter unit 111, the NQ output (inverted Q output) of the flip-flop U0 is supplied to the D input of the first flip-flop U0, and the EX input of the EXOR1 is supplied to the D input of the second flip-flop U1. Output is supplied. EXOR1 receives the Q output (Q0) of U0 and the Q output (Q1) of U1, and outputs an exclusive OR of them.

さらに、カウンタ部111において、3段目および4段目のフリップフロップU2,U3のD入力には、それぞれEXOR2,EXOR3の出力が供給されている。各EXOR2,EXOR3は、それぞれU2,U3のQ出力(Q2,Q3)およびAND2,AND3の出力を受け取り、それらの排他的論理和を出力する。   Further, in the counter unit 111, the outputs of EXOR2 and EXOR3 are supplied to the D inputs of the third-stage and fourth-stage flip-flops U2 and U3, respectively. Each EXOR2, EXOR3 receives the Q output (Q2, Q3) of U2, U3 and the output of AND2, AND3, respectively, and outputs their exclusive OR.

ここで、AND2は、U0のQ出力(Q0)およびU1のQ出力(Q1)を受け取り、それらの論理積を出力し、また、AND3は、AND2の出力およびU2のQ出力(Q2)を受け取り、それらの論理積を出力する。   Here, AND2 receives the Q output (Q0) of U0 and the Q output (Q1) of U1, and outputs a logical product of them, and AND3 receives the output of AND2 and the Q output (Q2) of U2. , Output the logical product of them.

サンプラ部112は、フリップフロップV0,V1,V2,V3を有し、カウンタ部111の各フリップフロップU0,U1,U2,U3のQ出力(Q0,Q1,Q2,Q3)を、対応するフリップフロップV0,V1,V2,V3のD入力で受け取る。   The sampler unit 112 includes flip-flops V0, V1, V2, and V3. The Q outputs (Q0, Q1, Q2, and Q3) of the flip-flops U0, U1, U2, and U3 of the counter unit 111 are converted into corresponding flip-flops. Received at D input of V0, V1, V2, V3.

ここで、V0〜V3のクロック入力CKには、サンプリングクロックRef−CKが供給され、このRef−CKによりそれぞれQ0〜Q3を取り込んで、V0〜V3のQ出力からサンプリング出力S0〜S3を出力するようになっている。   Here, the sampling clock Ref-CK is supplied to the clock input CK of V0 to V3, Q0 to Q3 are taken in by the Ref-CK, and the sampling outputs S0 to S3 are output from the Q outputs of V0 to V3. It is like that.

図1のカウンタ部111において、太い実線で示す各フリップフロップU0〜U3に対するカウンタクロックCK−DCOの経路は、正しくサンプリングを行うために、カウントするフリップフロップを通るのに必要な遅延パスを示す。   In the counter unit 111 of FIG. 1, the path of the counter clock CK-DCO for each of the flip-flops U0 to U3 indicated by the thick solid line indicates a delay path necessary for passing through the counting flip-flop in order to perform sampling correctly.

また、破線で示すU0→AND2→AND3→EXOR3→U3の経路は、データ信号のクリティカルパスに相当し、サンプリングクロックRef−CKの1周期以内に最終段のフリップフロップU3に到達する必要がある。   A path U0 → AND2 → AND3 → EXOR3 → U3 indicated by a broken line corresponds to a critical path of the data signal, and needs to reach the final stage flip-flop U3 within one cycle of the sampling clock Ref-CK.

さらに、一点鎖線で示す経路は、最終段のフリップフロップU3に対してカウンタクロックCK−DCOが供給される一番早い信号パスを示す。そして、サンプラ部112において、二点鎖線で示す経路は、最終段のフリップフロップV3に対するサンプリングクロックRef−CKのパスを示す。   Further, the path indicated by the alternate long and short dash line indicates the earliest signal path through which the counter clock CK-DCO is supplied to the final flip-flop U3. In the sampler unit 112, a path indicated by a two-dot chain line indicates a path of the sampling clock Ref-CK to the flip-flop V3 at the final stage.

図1に示されるように、同期式カウンタ回路では、カウンタ部111におけるフリップフロップU0〜U3のクロック入力CKには、全てカウンタクロックCK−DCOが供給されている。   As shown in FIG. 1, in the synchronous counter circuit, the counter clock CK-DCO is supplied to all the clock inputs CK of the flip-flops U0 to U3 in the counter unit 111.

そのため、図2に示されるように、例えば、サンプリングクロックRef−CKの立ち上がりタイミングでU0〜U2のQ出力(Q0〜Q2)を取り込むと、最上位ビット(MSB)から『0,0,0』になるサンプリング出力S0〜S2が得られる。   Therefore, as shown in FIG. 2, for example, when the Q outputs (Q0 to Q2) of U0 to U2 are taken in at the rising timing of the sampling clock Ref-CK, “0, 0, 0” from the most significant bit (MSB) Sampling outputs S0 to S2 are obtained.

しかしながら、同期式カウンタ回路において、一番長い信号経路(クリティカルパス:図1中の破線で示すU0→AND2→AND3→EXOR3→U3の経路)は、カウントするフリップフロップの段数に従って延びるため、高い周波数の動作には向いていない。   However, in the synchronous counter circuit, the longest signal path (critical path: the path U0 → AND2 → AND3 → EXOR3 → U3 shown by the broken line in FIG. 1) extends according to the number of flip-flops to be counted, and therefore has a high frequency. Not suitable for operation.

すなわち、図1中の破線で示すクリティカルパスは、Ref−CKの1周期以内に最終段のフリップフロップU3に到達する必要があるが、フリップフロップの段数が増加すると、Ref−CKの1周期以内に最終段のフリップフロップに到達しなくなってしまう。   That is, the critical path indicated by a broken line in FIG. 1 needs to reach the final flip-flop U3 within one cycle of Ref-CK. However, when the number of flip-flops increases, the critical path is within one cycle of Ref-CK. Will not reach the final flip-flop.

さらに、同期式カウンタ回路は、全てのクロックを一番高い周波数のクロックでドライブするため、消費電力が大きくなり、また、電源ノイズも大きくなるという課題がある。   Furthermore, since the synchronous counter circuit drives all clocks with the highest frequency clock, there is a problem that power consumption increases and power supply noise also increases.

図3は、非同期式カウンタ回路の一例を示す図であり、また、図4は、図3のカウンタ回路の動作を説明するためのタイミング図である。なお、説明を簡略化するために、図3では、Q0〜Q3を示しているが、図4では、Q0〜Q2のみを示している。   FIG. 3 is a diagram showing an example of the asynchronous counter circuit, and FIG. 4 is a timing diagram for explaining the operation of the counter circuit of FIG. In order to simplify the explanation, FIG. 3 shows Q0 to Q3, but FIG. 4 shows only Q0 to Q2.

図3に示されるように、非同期式カウンタ回路は、カウンタ部211およびサンプラ部212を有し、カウンタ部211でカウントした値をサンプラ部212でサンプリングして出力するようになっている。   As shown in FIG. 3, the asynchronous counter circuit includes a counter unit 211 and a sampler unit 212, and the sampler unit 212 samples and outputs the value counted by the counter unit 211.

カウンタ部211は、フリップフロップU0,U1,U2,U3を有し、また、サンプラ部212は、フリップフロップV0,V1,V2,V3を有する。   The counter unit 211 includes flip-flops U0, U1, U2, and U3, and the sampler unit 212 includes flip-flops V0, V1, V2, and V3.

ここで、カウンタ部211において、初段のフリップフロップU0のクロック入力CKには、カウンタクロックCK−DCOが供給され、また、フリップフロップU1のクロック入力CKには、前段のフリップフロップU0のNQ出力が供給されている。   Here, in the counter unit 211, the counter clock CK-DCO is supplied to the clock input CK of the first flip-flop U0, and the NQ output of the previous flip-flop U0 is supplied to the clock input CK of the flip-flop U1. Have been supplied.

同様に、フリップフロップU2のクロック入力CKには、前段のフリップフロップU1のNQ出力が供給され、そして、フリップフロップU3のクロック入力CKには、前段のフリップフロップU2のNQ出力が供給されている。   Similarly, the NQ output of the preceding flip-flop U1 is supplied to the clock input CK of the flip-flop U2, and the NQ output of the preceding flip-flop U2 is supplied to the clock input CK of the flip-flop U3. .

ここで、各段のフリップフロップU0〜U3において、D入力には、そのフリップフロップU0〜U3のNQ出力が供給されている。   Here, in the flip-flops U0 to U3 of each stage, the NQ outputs of the flip-flops U0 to U3 are supplied to the D input.

サンプラ部212は、図1のサンプラ部112と同様に、カウンタ部211の各フリップフロップU0,U1,U2,U3のQ出力(Q0,Q1,Q2,Q3)を、対応するフリップフロップV0,V1,V2,V3のD入力で受け取るようになっている。   Similar to the sampler unit 112 in FIG. 1, the sampler unit 212 outputs the Q outputs (Q0, Q1, Q2, Q3) of the flip-flops U0, U1, U2, U3 of the counter unit 211 to the corresponding flip-flops V0, V1. , V2 and V3 are received by D input.

また、V0〜V3のクロック入力CKには、サンプリングクロックRef−CKが供給され、このRef−CKによりそれぞれQ0〜Q3を取り込んで、V0〜V3のQ出力からサンプリング出力S0〜S3を出力するようになっている。   The sampling clock Ref-CK is supplied to the clock input CK of V0 to V3, and Q0 to Q3 are taken in by the Ref-CK, respectively, and the sampling outputs S0 to S3 are output from the Q outputs of V0 to V3. It has become.

図3のカウンタ部211において、太い実線で示す各フリップフロップU0〜U3に対するカウンタクロックCK−DCOの経路は、正しくサンプリングを行うために、カウントするフリップフロップを通るのに必要な遅延パスを示す。   In the counter unit 211 of FIG. 3, the path of the counter clock CK-DCO for each of the flip-flops U0 to U3 indicated by thick solid lines indicates a delay path necessary for passing through the counting flip-flop in order to perform sampling correctly.

すなわち、この遅延パスは、2段目以降のフリップフロップU1,U2,U3において、前段のフリップフロップU0,U1,U2の各NQ出力からU1,U2,U3の各クロック入力CKへのパスになる。   That is, this delay path becomes a path from each NQ output of the preceding flip-flops U0, U1, U2 to each clock input CK of U1, U2, U3 in the second and subsequent flip-flops U1, U2, U3. .

また、破線で示すフリップフロップU0のNQ出力→U0のD入力の経路は、データ信号のクリティカルパスに相当し、サンプリングクロックRef−CKの1周期以内にそのフリップフロップU0のNQ出力からD入力に到達する必要がある。なお、このパスは、各フリップフロップU0〜U3において形成されることになる。   The path from the NQ output of the flip-flop U0 to the D input of the U0 indicated by a broken line corresponds to a critical path of the data signal, and the NQ output of the flip-flop U0 is connected to the D input within one cycle of the sampling clock Ref-CK. Need to reach. This path is formed in each flip-flop U0-U3.

さらに、一点鎖線で示す経路は、初段のフリップフロップU0のクロック入力CKに対してカウンタクロックCK−DCOが供給される一番早い信号パスを示す。そして、サンプラ部212において、二点鎖線で示す経路は、最終段のフリップフロップV3に対するサンプリングクロックRef−CKのパスを示す。このように、非同期式カウンタ回路では、前述したような同期式カウンタ回路における問題は存在しない。   Further, the path indicated by the alternate long and short dash line indicates the earliest signal path through which the counter clock CK-DCO is supplied to the clock input CK of the first-stage flip-flop U0. In the sampler unit 212, a path indicated by a two-dot chain line indicates a path of the sampling clock Ref-CK to the flip-flop V3 at the final stage. Thus, in the asynchronous counter circuit, there is no problem in the synchronous counter circuit as described above.

図3に示されるように、非同期式カウンタ回路は、カウンタ部211において、初段のフリップフロップU0のクロック入力CKにはCK−DCOが供給されるが、2段目以降のU1〜U3のクロック入力CKには、前段のU0〜U2のNQ出力が供給されている。   As shown in FIG. 3, in the asynchronous counter circuit, in the counter unit 211, the clock input CK-DCO is supplied to the clock input CK of the first stage flip-flop U0, but the clock inputs of U1 to U3 in the second and subsequent stages. The NQ outputs of U0 to U2 in the previous stage are supplied to CK.

すなわち、各段(フリップフロップ)が前段の出力をクロックとして使用するため、遅延が各段により積分(順に加算)されることになるため、遅延が大きくなると、レース(race)の問題が生じる。このレースの状態が生じると、各段の出力を正しくサンプリングすることが困難になる。   That is, since each stage (flip-flop) uses the output of the previous stage as a clock, the delay is integrated (added in order) by each stage. Therefore, when the delay increases, a race problem occurs. When this race condition occurs, it becomes difficult to correctly sample the output of each stage.

ここで、各段の遅延時間tdは、フリップフロップU0〜U2により順に加算される。具体的に、例えば、フリップフロップU0のQ出力(Q0)がtdの遅延を含んでいたのが、U1のQ出力(Q1)は、2tdの遅延を含み、さらに、U2のQ出力(Q2)は、3tdの遅延を含むことになる。   Here, the delay time td of each stage is sequentially added by the flip-flops U0 to U2. Specifically, for example, the Q output (Q0) of the flip-flop U0 includes a delay of td, but the Q output (Q1) of U1 includes a delay of 2td, and further, the Q output (Q2) of U2 Will include a delay of 3 td.

すなわち、図4に示されるように、サンプラ部212のフリップフロップV0〜V2が、Ref−CKの立ち上がりタイミングでQ0〜Q2を取り込むとき、順に加算された遅延時間td,2td,3tdに起因して正しいカウント値を取り込むことができない。   That is, as shown in FIG. 4, when the flip-flops V0 to V2 of the sampler unit 212 take in Q0 to Q2 at the rising timing of Ref-CK, the delay times td, 2td, and 3td are added in order. The correct count value cannot be imported.

これは、入力クロックから遠いフリップフロップの方か積分された遅延が多いため、通常、入力クロックから遠いフリップフロップの出力にエラーが生じる虞が高くなる。すなわち、図3および図4の例では、例えば、カウンタ部211のフリップフロップU2の方がCK−DCOが入力されるU0やU1よりも遠いため、積分された遅延が多くなり、出力Q2の方が出力Q0やQ1よりもレースが起こり易くなる。   This is because there is more delay integrated from the flip-flop far from the input clock, and therefore there is usually a high possibility that an error will occur in the output of the flip-flop far from the input clock. That is, in the example of FIGS. 3 and 4, for example, the flip-flop U2 of the counter unit 211 is farther than U0 and U1 to which CK-DCO is input, so that the integrated delay increases and the output Q2 However, a race is more likely to occur than the outputs Q0 and Q1.

具体的に、図4の場合には、MSBから『0,0,0』になるべきサンプリング出力S0〜S2が『1,1,0』になっている。これは、遅延が各段により積分されてレースが生じ、サンプリング出力S0〜S2が誤ったものになっている。   Specifically, in the case of FIG. 4, the sampling outputs S0 to S2 to be “0, 0, 0” from the MSB are “1, 1, 0”. This is because the delay is integrated by each stage to cause a race, and the sampling outputs S0 to S2 are incorrect.

以下、カウンタ回路およびカウンタ回路のサンプリング補正方法の実施例を、添付図面を参照して詳述する。図5は、本実施例のカウンタ回路を示す図である。図5において、参照符号11はカウンタ部を示し、また、12はサンプラ部を示し、そして、13は判定部を示す。   Hereinafter, embodiments of a counter circuit and a sampling correction method of the counter circuit will be described in detail with reference to the accompanying drawings. FIG. 5 is a diagram showing the counter circuit of this embodiment. In FIG. 5, reference numeral 11 indicates a counter unit, 12 indicates a sampler unit, and 13 indicates a determination unit.

図5に示されるように、本実施例のカウンタ回路は、非同期式カウンタ回路であり、カウンタ部11,サンプラ部12および判定部13を有し、また、カウンタ部11は、フリップフロップU0,U1,U2,…,UN-1を有する。   As shown in FIG. 5, the counter circuit of the present embodiment is an asynchronous counter circuit, and includes a counter unit 11, a sampler unit 12, and a determination unit 13, and the counter unit 11 includes flip-flops U0 and U1. , U2, ..., UN-1.

ここで、初段のフリップフロップU0のクロック入力CKには、カウンタクロックCK−DCOが供給され、また、フリップフロップU1のクロック入力CKには、前段のフリップフロップU0のNQ出力が供給されている。   Here, the counter clock CK-DCO is supplied to the clock input CK of the first flip-flop U0, and the NQ output of the previous flip-flop U0 is supplied to the clock input CK of the flip-flop U1.

同様に、フリップフロップU2,U3,…,UN-1のクロック入力CKには、それぞれ前段のフリップフロップU1,U2,…,UN-2のNQ出力が供給されている。ここで、各段のフリップフロップU0〜UN-1において、D入力には、そのフリップフロップU0〜UN-1のNQ出力が供給されている。   Similarly, the NQ outputs of the preceding flip-flops U1, U2,..., UN-2 are supplied to the clock inputs CK of the flip-flops U2, U3,. Here, in the flip-flops U0 to UN-1 of each stage, the NQ outputs of the flip-flops U0 to UN-1 are supplied to the D input.

サンプラ部12は、フリップフロップW0,W1,W2、VA0〜VAN-1、VB0〜VBN-1、および、VC0〜VCN-1を有する。ここで、フリップフロップW0,W1,W2は、サンプリングクロックRef−CK[0],Ref−CK[1],Ref−CK[2]を生成するためのものである。   The sampler unit 12 includes flip-flops W0, W1, and W2, VA0 to VAN-1, VB0 to VBN-1, and VC0 to VCN-1. Here, the flip-flops W0, W1, and W2 are for generating sampling clocks Ref-CK [0], Ref-CK [1], and Ref-CK [2].

すなわち、フリップフロップW0のD入力には、サンプリングクロックRef−CKが供給され、また、W0のクロック入力CKには、カウンタクロックCK−DCOが供給されている。   That is, the sampling clock Ref-CK is supplied to the D input of the flip-flop W0, and the counter clock CK-DCO is supplied to the clock input CK of W0.

また、フリップフロップW1のD入力には、フリップフロップW0のQ出力が供給され、また、フリップフロップW2のD入力には、フリップフロップW1のQ出力が供給されている。なお、W1およびW2のクロック入力CKには、カウンタクロックCK−DCOが供給されている。   Further, the Q output of the flip-flop W0 is supplied to the D input of the flip-flop W1, and the Q output of the flip-flop W1 is supplied to the D input of the flip-flop W2. A counter clock CK-DCO is supplied to the clock inputs CK of W1 and W2.

ここで、フリップフロップW0のQ出力は、フリップフロップVA0〜VAN-1に対する第1サンプリングクロックRef−CK[0]として使用され、また、W1のQ出力は、VB0〜VBN-1に対する第2サンプリングクロックRef−CK[1]として使用される。さらに、W2のQ出力は、VC0〜VCN-1に対する第3サンプリングクロックRef−CK[2]として使用される。   Here, the Q output of the flip-flop W0 is used as the first sampling clock Ref-CK [0] for the flip-flops VA0 to VAN-1, and the Q output of W1 is the second sampling for the VB0 to VBN-1. Used as clock Ref-CK [1]. Further, the Q output of W2 is used as the third sampling clock Ref-CK [2] for VC0 to VCN-1.

なお、第1,第2および第3サンプリングクロックRef−CK[0],Ref−CK[1]およびRef−CK[2]は、カウンタクロックCK−DCOの周期に同期した立ち上がりタイミングを有する連続した3つのサンプリングクロックになっている。   Note that the first, second, and third sampling clocks Ref-CK [0], Ref-CK [1], and Ref-CK [2] are continuous with rising timings synchronized with the cycle of the counter clock CK-DCO. There are three sampling clocks.

すなわち、第1サンプリングクロックRef−CK[0]と第2サンプリングクロックRef−CK[1]のタイミング(立ち上がりタイミング)は、カウンタクロックCK−DCOの1周期分だけずれている。また、第2サンプリングクロックRef−CK[1]と第3サンプリングクロックRef−CK[2]のタイミングも、カウンタクロックCK−DCOの1周期分だけずれている。   That is, the timing (rise timing) of the first sampling clock Ref-CK [0] and the second sampling clock Ref-CK [1] is shifted by one cycle of the counter clock CK-DCO. The timings of the second sampling clock Ref-CK [1] and the third sampling clock Ref-CK [2] are also shifted by one cycle of the counter clock CK-DCO.

このように、サンプラ部12は、第1〜第3サンプリングクロックRef−CK[0]〜[2]がクロック入力CKに供給された第1〜第3サンプラユニット(フリップフロップ)VA0〜VAN-1,VB0〜VBN-1,VC0〜VCN-1を有する。   As described above, the sampler unit 12 includes the first to third sampler units (flip-flops) VA0 to VAN-1 in which the first to third sampling clocks Ref-CK [0] to [2] are supplied to the clock input CK. , VB0 to VBN-1, and VC0 to VCN-1.

各サンプラユニットVA0〜VAN-1,VB0〜VBN-1,VC0〜VCN-1は、前述した図1および図3に示すサンプラ部112および212に相当し、それぞれカウンタ部11のフリップフロップU0〜UN-1のQ出力(Q1〜QN-1)を取り込む。   The sampler units VA0 to VAN-1, VB0 to VBN-1, VC0 to VCN-1 correspond to the sampler units 112 and 212 shown in FIGS. 1 and 3, respectively, and are respectively flip-flops U0 to UN of the counter unit 11. -1 Q output (Q1 to QN-1) is captured.

すなわち、第1サンプラユニットにおけるVA0〜VAN-1のD入力は、カウンタ部11のU0〜UN-1のQ出力に接続され、第1サンプリングクロックRef−CK[0]の立ち上がりタイミングでデータQ1〜QN-1を取り込む。   That is, the D inputs of VA0 to VAN-1 in the first sampler unit are connected to the Q outputs of U0 to UN-1 of the counter unit 11, and the data Q1 to Q1 at the rising timing of the first sampling clock Ref-CK [0]. Capture QN-1.

また、第2サンプラユニットにおけるVB0〜VBN-1のD入力は、カウンタ部11のU0〜UN-1のQ出力に接続され、第2サンプリングクロックRef−CK[1]の立ち上がりタイミングでデータQ1〜QN-1を取り込む。   In addition, the D inputs of VB0 to VBN-1 in the second sampler unit are connected to the Q outputs of U0 to UN-1 of the counter unit 11, and the data Q1 to Q2 at the rising timing of the second sampling clock Ref-CK [1]. Capture QN-1.

さらに、第3サンプラユニットにおけるVC0〜VCN-1のD入力は、カウンタ部11のU0〜UN-1のQ出力に接続され、第3サンプリングクロックRef−CK[2]の立ち上がりタイミングでデータQ1〜QN-1を取り込む。   Further, the D inputs of VC0 to VCN-1 in the third sampler unit are connected to the Q outputs of U0 to UN-1 of the counter unit 11, and the data Q1 to Q1 are output at the rising timing of the third sampling clock Ref-CK [2]. Capture QN-1.

なお、第1サンプリングクロックRef−CK[0],第2サンプリングクロックRef−CK[1]および第3サンプリングクロックRef−CK[2]は、カウンタクロックCK−DCOの周期に同期した連続する3つのサンプリングクロックになっている。   Note that the first sampling clock Ref-CK [0], the second sampling clock Ref-CK [1], and the third sampling clock Ref-CK [2] are three consecutive in synchronization with the cycle of the counter clock CK-DCO. Sampling clock.

判定部13は、第1サンプラユニットのサンプリング出力SA0〜SAN-1,第2サンプラユニットのサンプリング出力SB0〜SBN-1および第3サンプラユニットのサンプリング出力SC0〜SCN-1を受け取り、後述する判定を行って出力OUTを出力する。 Determining unit 13, a sampling output SA 0 -SA N-1 of the first sampler unit, the sampling output SC 0 to SC N-1 sampling output SB 0 to SB N-1 and the third sampler unit of the second sampler unit The output OUT is output after performing the determination described later.

なお、判定部13は、サンプリング出力SA0〜SAN-1,SB0〜SBN-1およびSC0〜SCN-1だけでなく、後に、図7を参照して説明するように、サンプリング出力SD0〜SDN-1等を受け取ることもある。 Note that the determination unit 13 performs sampling as described later with reference to FIG. 7 in addition to the sampling outputs SA 0 to SA N−1 , SB 0 to SB N−1, and SC 0 to SC N−1 . The outputs SD 0 to SD N-1 may be received.

ここで、カウンタクロックCK−DCOが入力するフリップフロップU0に対して、より遠くのフリップフロップ(UN-1に近いフリップフロップ:最上位ビット(MSB)側のフリップフロップ)の方か積分された遅延が多くなる。そのため、MSB側のフリップフロップ程、その出力に誤り(レース)が生じ易い。   Here, with respect to the flip-flop U0 to which the counter clock CK-DCO is input, a farther flip-flop (a flip-flop closer to UN-1: a flip-flop on the most significant bit (MSB) side) or an integrated delay Will increase. Therefore, an error (race) is likely to occur in the output of the flip-flop on the MSB side.

また、通常、非同期カウンタはバイナリーカウンタになるため、MSB側のフリップフロップ程、その出力が変化する確率は小さくなる。このフリップフロップの出力(Q0〜QN-1)の変化確率は、バイナリの場合、1/2kになる。ここで、kは、カウンタ部11におけるフリップフロップの位置である。   In general, since the asynchronous counter is a binary counter, the probability that the output of the flip-flop on the MSB side changes is smaller. The change probability of the output (Q0 to QN-1) of this flip-flop is 1 / 2k in the case of binary. Here, k is the position of the flip-flop in the counter unit 11.

さらに、例えば、レースが生じても、全ての出力データの値が誤っている訳ではなく、サンプラ部12におけるサンプリングの瞬間に、その出力データの値が積分された遅延に関わらず変化しなければ、レースがあっても問題はない。   Further, for example, even if a race occurs, the values of all output data are not wrong, and the value of the output data must not change at the sampling instant in the sampler unit 12 regardless of the integrated delay. No problem even if there is a race.

具体的に、後述する図6の例では、サイクル『0』のQ2,Q3、サイクル『4』のQ2、サイクル『8』のQ2,Q3、並びに、サイクル『12』のQ2の値が誤っている。すなわち、これら全てのエラーは、積分された遅延によって、Q2とQ3の値の変化するタイミングがずれたことにより生じているのが分かる。   Specifically, in the example of FIG. 6 to be described later, the values of Q2 and Q3 of cycle “0”, Q2 of cycle “4”, Q2 and Q3 of cycle “8”, and Q2 of cycle “12” are erroneously set. Yes. That is, it can be seen that all these errors are caused by the timing at which the values of Q2 and Q3 change due to the integrated delay.

従って、本実施例では、カウンタ部11の出力(Q0〜QN-1)を、サンプラ部12で1回のサンプリングクロックで取り込むのではなく、複数回(少なくとも3回)のサンプリングクロックで取り込んで、正しいカウント値を求めるようになっている。   Therefore, in this embodiment, the output (Q0 to QN-1) of the counter unit 11 is not captured by the sampler unit 12 with one sampling clock, but is captured with a plurality of sampling clocks (at least three times). The correct count value is calculated.

なお、図5では、3つのサンプリングクロックで制御される3つのサンプラユニットが設けられているが、これは、1つのサンプラユニットに対して複数の異なるタイミングのサンプリングクロックを供給してもよいのはもちろんである。   In FIG. 5, three sampler units controlled by three sampling clocks are provided. However, this may supply a plurality of sampling clocks at different timings to one sampler unit. Of course.

図6および図7は、図5のカウンタ回路の動作を説明するためのタイミング図である。なお、図5のカウンタ回路は、Nビットを処理するようになっているが、図6および図7では、説明を簡略化するために、Q0〜Q3の4ビットのみを示している。   6 and 7 are timing charts for explaining the operation of the counter circuit of FIG. Although the counter circuit of FIG. 5 processes N bits, FIGS. 6 and 7 show only 4 bits of Q0 to Q3 in order to simplify the description.

図5に示されるように、例えば、フリップフロップU0〜U3のQ出力(Q0〜Q3)は、3つのサンプラユニット(VA0〜VA3,VB0〜VB3,VC0〜VC3)に取り込まれ、それぞれサンプリング出力として出力される。   As shown in FIG. 5, for example, the Q outputs (Q0 to Q3) of the flip-flops U0 to U3 are taken into three sampler units (VA0 to VA3, VB0 to VB3, VC0 to VC3), and are respectively used as sampling outputs. Is output.

図6の例では、連続する3つのサイクル『8』,『9』,『10』において、サンプリングクロックRef−CK[0],[1],[2]により3つのサンプラユニットで出力Q0〜Q3を取り込む。   In the example of FIG. 6, in three consecutive cycles “8”, “9”, and “10”, outputs Q0 to Q3 are output by three sampler units by sampling clocks Ref-CK [0], [1], and [2]. Capture.

すなわち、図6に示されるように、第1サンプラユニットのサンプリング出力SA3〜SA0は、フリップフロップVA3〜VA0のQ出力になり、MSBから『0,1,0,0』になる。 That is, as shown in FIG. 6, the sampling outputs SA 3 to SA 0 of the first sampler unit become Q outputs of the flip-flops VA3 to VA0 and become “ 0 , 1 , 0 , 0 ” from the MSB.

また、第2サンプラユニットのサンプリング出力SB3〜SB0は、フリップフロップVB3〜VB0のQ出力になり、MSBから『1,0,0,1』になる。さらに、第3サンプラユニットのサンプリング出力SC3〜SC0は、フリップフロップVC3〜VC0のQ出力になり、MSBから『1,0,1,0』になる。 Further, the sampling outputs SB 3 to SB 0 of the second sampler unit become Q outputs of the flip-flops VB 3 to VB 0 and become “1, 0 , 0 , 1 ” from the MSB. Further, the sampling outputs SC 3 to SC 0 of the third sampler unit become Q outputs of the flip-flops VC 3 to VC 0 and become “1, 0 , 1 , 0 ” from the MSB.

ところで、前述したように、後段のカウンタ(フリップフロップ)の出力ほど、1段の遅延時間tdが順に加算(積分)されて遅延が大きくなるが、レースが生じた場合でも、全ての信号(サンプリング出力)が間違っている訳ではない。   By the way, as described above, the delay time td is sequentially added (integrated) as the output of the counter (flip-flop) in the subsequent stage increases the delay, but even if a race occurs, all signals (sampling) The output is not wrong.

具体的に、上述した連続する3つのサンプリングクロックRef−CK[0],[1],[2]による3つのサンプリング出力において、『1,0,0,1』のサンプリング出力SB3〜SB0と、『1,0,1,0』のサンプリング出力SC3〜SC0は連続している。 Specifically, in the three sampling outputs by the above-described three consecutive sampling clocks Ref-CK [0], [1], [2], the sampling outputs SB 3 to SB 0 of “1, 0, 0, 1”. The sampling outputs SC 3 to SC 0 of “1, 0, 1, 0” are continuous.

すなわち、サンプリング出力SB3〜SB0の『1,0,0,1』に対して『1』を加えたものがサンプリング出力SC3〜SC0の『1,0,1,0』になっている。従って、この場合、サンプリング出力SA3〜SA0の『0,1,0,0』には、レースによる誤りが含まれていると判断し、サンプリング出力SB3〜SB0およびSC3〜SC0による値を正しいカウント値として使用する。 That is, “1, 0 , 0 , 1” of sampling outputs SB 3 to SB 0 plus “1” becomes “1, 0 , 1, 0 ” of sampling outputs SC 3 to SC 0. Yes. Therefore, in this case, it is determined that “ 0 , 1 , 0 , 0 ” of the sampling outputs SA 3 to SA 0 includes errors due to the race, and the sampling outputs SB 3 to SB 0 and SC 3 to SC 0 are detected. Use the value from as the correct count value.

具体的に、サンプリング出力SB3〜SB0の値『1,0,0,1』が正しいカウント値なので、例えば、正しいサンプリング出力SA3〜SA0の値として、SB3〜SB0の値『1,0,0,1』から『1』を引いた『1,0,0,0』を出力する。 Specifically, since the value "1, 0, 0, 1" is correct count value of the sampling output SB 3 to SB 0, for example, as the value of the correct sampling output SA 3 -SA 0, the value of SB 3 to SB 0 " “1,0,0,0” obtained by subtracting “1” from “1,0,0,1” is output.

ここで、図示の値とは異なるが、例えば、SA3〜SA0が『1,0,0,0』、SB3〜SB0が『0,0,0,1』、SC3〜SC0が『1,0,1,0』の場合、Ref−CK[0]と[2]はCK−DCOの2周期分ずれているので、正しいカウント値と判断する。 Here, different from the values shown, for example, SA 3 -SA 0 is "1,0,0,0", SB 3 to SB 0 is "0,0,0,1", SC 3 to SC 0 Is “1, 0, 1, 0”, Ref-CK [0] and [2] are shifted by two cycles of CK-DCO, and thus are determined to be correct count values.

すなわち、サンプリング出力SA3〜SA0の『1,0,0,0』に対して『2』を加えたものがサンプリング出力SC3〜SC0の『1,0,1,0』になっているため、SA3〜SA0およびSC3〜SC0による値を正しいカウント値として使用することになる。このとき、サンプリング出力SA3〜SA0の値『1,0,0,0』を出力することになる。 That is, “ 1 , 0 , 0 , 0 ” of sampling outputs SA 3 to SA 0 plus “2” becomes “ 1 , 0 , 1 , 0 ” of sampling outputs SC 3 to SC 0. Therefore, the values of SA 3 to SA 0 and SC 3 to SC 0 are used as correct count values. At this time, the values “ 1 , 0 , 0 , 0 ” of the sampling outputs SA 3 to SA 0 are output.

ここで、図5および図6の例では、3回のサンプリングを行う場合を示しているが、このサンプリングの回数は、例えば、遅延の保証必要範囲により規定される。ただし、サンプリングを複数回行った場合、少なくとも2つの正しいサンプリング出力を得るためには、サンプリング回数を少なくとも3回に設定するのが好ましい。   Here, in the example of FIG. 5 and FIG. 6, the case where the sampling is performed three times is shown, but the number of times of the sampling is defined by, for example, a guaranteed delay range. However, when sampling is performed a plurality of times, in order to obtain at least two correct sampling outputs, it is preferable to set the number of samplings to at least three.

次に、図7に示されるように、第1サンプラユニットのサンプリング出力SA3〜SA0は、フリップフロップVA3〜VA0のQ出力になり、MSBから『0,1,1,0』になる。 Next, as shown in FIG. 7, the sampling outputs SA 3 to SA 0 of the first sampler unit become the Q outputs of the flip-flops VA3 to VA0 and become “ 0 , 1, 1, 0 ” from the MSB.

また、第2サンプラユニットのサンプリング出力SB3〜SB0は、フリップフロップVB3〜VB0のQ出力になり、MSBから『1,0,0,1』になる。さらに、第3サンプラユニットのサンプリング出力SC3〜SC0は、フリップフロップVC3〜VC0のQ出力になり、MSBから『1,0,1,0』になる。 Further, the sampling outputs SB 3 to SB 0 of the second sampler unit become Q outputs of the flip-flops VB 3 to VB 0 and become “1, 0 , 0 , 1 ” from the MSB. Further, the sampling outputs SC 3 to SC 0 of the third sampler unit become Q outputs of the flip-flops VC 3 to VC 0 and become “1, 0 , 1 , 0 ” from the MSB.

なお、図7では、さらに、第4サンプリングクロックRef−CK[3]により駆動される第4サンプラユニット(図示しない)を考え、この第4サンプラユニットのサンプリング出力(SD3〜SD0)を示している。具体的に、第4サンプラユニットのサンプリング出力SD3〜SD0は、フリップフロップ(VD3〜VD0)のQ出力になり、MSBから『1,0,1,1』になる。 In FIG. 7, a fourth sampler unit (not shown) driven by the fourth sampling clock Ref-CK [3] is further considered, and sampling outputs (SD 3 to SD 0 ) of the fourth sampler unit are shown. ing. Specifically, the sampling outputs SD 3 to SD 0 of the fourth sampler unit are Q outputs of the flip-flops (VD3 to VD0), and become “1, 0, 1, 1” from the MSB.

従って、上述した連続する4つのサンプリングクロックRef−CK[0]〜[3]による4つのサンプリング出力において、『1,0,0,1』、『1,0,1,0』および『1,0,1,1』のサンプリング出力が正しいカウント値であることが分かる。すなわち、サンプリング出力SB3〜SB0,SC3〜SC0およびSD3〜SD0による値を正しいカウント値として使用することになる。 Accordingly, in the four sampling outputs by the four consecutive sampling clocks Ref-CK [0] to [3] described above, “1, 0, 0, 1”, “1, 0, 1, 0” and “1, It can be seen that the sampling output of “0, 1, 1” is the correct count value. That is, the values based on the sampling outputs SB 3 to SB 0 , SC 3 to SC 0 and SD 3 to SD 0 are used as correct count values.

ここで、図7の例では、サイクル『0』,『1』,『4』,『8』,『12』のQ0,Q1,Q2,Q3の値が誤っている。   Here, in the example of FIG. 7, the values of Q0, Q1, Q2, and Q3 of cycles “0”, “1”, “4”, “8”, and “12” are incorrect.

すなわち、サンプリング出力SB3〜SB0の値『1,0,0,1』が正しいカウント値なので、例えば、正しいサンプリング出力SA3〜SA0の値として、SB3〜SB0の値『1,0,0,1』から『1』を引いた『1,0,0,0』を出力する。 That is, since the values “1, 0 , 0 , 1” of the sampling outputs SB 3 to SB 0 are correct count values, for example, as the values of the correct sampling outputs SA 3 to SA 0 , the values “1, 3 of SB 3 to SB 0 are set. “1,0,0,0” obtained by subtracting “1” from “0,0,1” is output.

なお、例えば、SA3〜SA0の値とSC3〜SC0の値がCK−DCOの2周期に相当する『2』だけずれている場合、或いは、SA3〜SA0の値とSD3〜SD0の値がCK−DCOの3周期に相当する『3』だけずれている場合も正しいカウント値と判断する。 For example, when the values of SA 3 to SA 0 and the values of SC 3 to SC 0 are shifted by “2” corresponding to two cycles of CK-DCO, or the values of SA 3 to SA 0 and SD 3 When the value of .about.SD 0 is shifted by “3” corresponding to three cycles of CK-DCO, it is determined that the count value is correct.

ここで、サンプリングクロックRef−CKは、必ずしもカウンタクロックCK−DCOの1周期ごとに変化する必要はない。例えば、サンプリングクロックRef−CKがカウンタクロックCK−DCOの2周期ごとに変化する場合、その連続するサンプリングクロックにより取り込まれたカウント値が『2』だけ異なるものを正しいカウント値と判断する。   Here, the sampling clock Ref-CK does not necessarily need to change every cycle of the counter clock CK-DCO. For example, when the sampling clock Ref-CK changes every two cycles of the counter clock CK-DCO, it is determined that the count value taken by the successive sampling clocks is different by “2” as the correct count value.

具体的に、図6において、Ref−CK[1]と[2]の立ち上がりタイミングが、CK−DCOの2周期ずれている場合、SB3〜SB0がMSBから『1,0,0,1』のとき、SC3〜SC0がMSBから『1,0,1,1』ならば、正しいカウント値と判断する。すなわち、『2』だけずれていれば正しいことになる。 Specifically, in FIG. 6, when the rising timings of Ref-CK [1] and [2] are shifted by two cycles of CK-DCO, SB 3 to SB 0 are changed to “1, 0, 0, 1 If SC 3 to SC 0 are “1, 0 , 1, 1” from the MSB, it is determined that the count value is correct. That is, it is correct if it is shifted by “2”.

このとき、サンプリング出力SB3〜SB0の値『1,0,0,1』が正しいカウント値なので、例えば、正しいサンプリング出力SA3〜SA0の値として、SB3〜SB0の値『1,0,0,1』から『1』を引いた『1,0,0,0』を出力する。 At this time, since the values “1, 0 , 0 , 1” of the sampling outputs SB 3 to SB 0 are correct count values, for example, as the values of the correct sampling outputs SA 3 to SA 0 , the values “1” of SB 3 to SB 0 are set. , 0, 0, 1 ”minus“ 1 ”is output.

このように、カウンタ部11のカウント出力(Q0〜QN-1)を取り込むサンプリングクロックRef−CKの数は3つ以上であればよく、また、Ref−CKの間隔は、CK−DCOの任意の周期でよい。なお、Ref−CKにより取り込まれたサンプリング値は、Ref−CKの間隔により規定されるカウント値の差を有する場合に正しいカウント値と判断されることになる。   As described above, the number of sampling clocks Ref-CK for capturing the count output (Q0 to QN-1) of the counter unit 11 may be three or more, and the interval of Ref-CK is an arbitrary value of CK-DCO. Period may be sufficient. Note that the sampling value taken in by Ref-CK is determined to be a correct count value when it has a difference in count value defined by the interval of Ref-CK.

図8は、本実施例のカウンタ回路における処理の一例を示すフローチャートである。ここで、参照符号SAは、図5におけるサンプリング出力SA0〜SAN-1、或いは、図6および図7におけるSA0〜SA3に対応し、また、SBは、図5におけるSB0〜SBN-1、或いは、図6および図7におけるSB0〜SB3に対応する。さらに、参照符号SCは、図5におけるSC0〜SCN-1、或いは、図6および図7におけるSC0〜SC3に対応する。 FIG. 8 is a flowchart showing an example of processing in the counter circuit of this embodiment. Here, the reference symbol SA corresponds to the sampling outputs SA 0 to SA N-1 in FIG. 5 or SA 0 to SA 3 in FIGS. 6 and 7, and SB is SB 0 to SB in FIG. N-1 or SB 0 to SB 3 in FIGS. 6 and 7. Furthermore, reference signs the SC, SC 0 to SC N-1 in FIG. 5, or, corresponding to the SC 0 to SC 3 in FIGS.

図8に示されるように、カウンタ回路のサンプリング補正処理の一例が開始すると、ステップST11において、SAとSBが連続しているかどうかを判定する。すなわち、例えば、SAのサンプリングクロックRef−CK[0]とSBのRef−CK[1]がカウンタクロックCK−DCOの1周期分の差異を有している場合、SBから『1』を減算したものがSAになっているかどうかを判定する。   As shown in FIG. 8, when an example of the sampling correction processing of the counter circuit starts, it is determined in step ST11 whether SA and SB are continuous. That is, for example, when the SA sampling clock Ref-CK [0] and the SB Ref-CK [1] have a difference of one cycle of the counter clock CK-DCO, “1” is subtracted from the SB. Determine if the thing is SA.

ステップST11において、SAとSBが連続していると判定すると、ステップST12に進んで、SAの値を出力(OUT=SA)する。また、ステップST11において、SAとSBが連続していないと判定すると、ステップST13に進んで、SC−SAが『2』になっているかどうかを判定する。   If it is determined in step ST11 that SA and SB are continuous, the process proceeds to step ST12, and the value of SA is output (OUT = SA). If it is determined in step ST11 that SA and SB are not continuous, the process proceeds to step ST13 to determine whether SC-SA is “2”.

すなわち、ステップST13では、例えば、SAのRef−CK[0]とSCのRef−CK[2]がCK−DCOの2周期分の差異を有している場合、SCから『2』を減算したものがSAになっているかどうかを判定する。   That is, in step ST13, for example, when Ref-CK [0] of SA and Ref-CK [2] of SC have a difference of two cycles of CK-DCO, “2” is subtracted from SC. Determine if the thing is SA.

ステップST13において、SC−SA=2であると判定すると、ステップST12に進んで、SAの値を出力(OUT=SA)する。また、ST13において、SC−SA=2ではないと判定すると、ステップST14に進む。   If it is determined in step ST13 that SC-SA = 2, the process proceeds to step ST12, and the value of SA is output (OUT = SA). If it is determined in ST13 that SC-SA = 2 is not satisfied, the process proceeds to step ST14.

ステップST14では、SBとSCが連続しているかどうかを判定する。すなわち、前述したステップST11におけるSAとSBが連続しているかどうかの判定と同様に、SBとSCが連続しているかどうかの判定を行う。   In step ST14, it is determined whether SB and SC are continuous. That is, whether or not SB and SC are continuous is determined in the same manner as the determination of whether SA and SB are continuous in step ST11 described above.

ステップST14において、SBとSCが連続していると判定すると、すなわち、SCから『1』を減算したものがSBになっていると判定すると、ステップST15に進み、SBから『1』を減算したものを出力(OUT=SB−1)する。   If it is determined in step ST14 that SB and SC are continuous, that is, if it is determined that the value obtained by subtracting "1" from SC is SB, the process proceeds to step ST15, and "1" is subtracted from SB. Output (OUT = SB-1).

なお、ステップST14において、SBとSCが連続していないと判定すると、ステップST16に進んで、出力をデフォルト値(OUT=DefVal)として処理を終了する。通常、処理がステップST12またはST15で終了し、ステップST16まで進まないように設計する。   If it is determined in step ST14 that SB and SC are not continuous, the process proceeds to step ST16, where the output is set to a default value (OUT = DefVal) and the process is terminated. Normally, the design is such that the process ends at step ST12 or ST15 and does not proceed to step ST16.

図9は、本実施例のカウンタ回路におけるサンプリング補正処理の他の例を示すフローチャートであり、図8の処理を一般化したものに相当する。ここで、上述した図8におけるSA,SB,SCは、例えば、S[0],S[1],S[2]に対応する。   FIG. 9 is a flowchart showing another example of the sampling correction process in the counter circuit of this embodiment, which corresponds to a generalized process of FIG. Here, SA, SB, and SC in FIG. 8 described above correspond to, for example, S [0], S [1], and S [2].

図9に示されるように、カウンタ回路のサンプリング補正処理の他の例が開始すると、ステップST21において、Mod(S[n]−S[n-i],N)=iが成立するかどうかを判定する。   As shown in FIG. 9, when another example of the sampling correction processing of the counter circuit starts, it is determined in step ST21 whether Mod (S [n] -S [ni], N) = i is satisfied. .

すなわち、ステップST21では、S[n]−S[n-i]をNで割った余りがiに等しいかどうかを判定する。ここで、Mod(fun,N)は、fun≧0ならば、Mod(fun,N)=funになり、また、fun<0ならば、Mod(fun,N)=N+funになる。   That is, in step ST21, it is determined whether or not the remainder obtained by dividing S [n] -S [n-i] by N is equal to i. Here, Mod (fun, N) is Mod (fun, N) = fun if fun ≧ 0, and Mod (fun, N) = N + fun if fun <0.

ここで、Mod(fun,N)の値は、常に、0〜Nの間に存在する。また、初期条件として、n=1,i=1とする。さらに、Nは、カウンタの最大カウント値であり、例えば、図7の例では、0〜15サイクルで1つずつインクリメントするN=24=16となる。 Here, the value of Mod (fun, N) always exists between 0 and N. As initial conditions, n = 1 and i = 1. Further, N is the maximum count value of the counter. For example, in the example of FIG. 7, N = 2 4 = 16 incremented one by one in 0 to 15 cycles.

具体的に、ステップST21では、初期条件がn=1,i=1、例としてN=16を考えると、カウンタの出力S[0]=16,S[1]=1なので、Mod(S[n]−S[n-i],N)は、Mod(S[1]−S[0],N)=Mod(1−16,16)=1=iとなる。   Specifically, in step ST21, if the initial conditions are n = 1, i = 1, and N = 16 as an example, the counter output S [0] = 16, S [1] = 1, so Mod (S [ n] −S [ni], N) is Mod (S [1] −S [0], N) = Mod (1-16, 16) = 1 = i.

この場合、ステップST21において、Mod(S[n]−S[n-i],N)=iが成立すると判定し、ステップST22に進んで、Mod(S[n]−n,N)の値を出力(OUT=Mod(S[n]−n,N))する。   In this case, in step ST21, it is determined that Mod (S [n] −S [ni], N) = i is established, and the process proceeds to step ST22 to output the value of Mod (S [n] −n, N). (OUT = Mod (S [n] -n, N)).

一方、ステップST21において、Mod(S[n]−S[n-i],N)=iが成立しないと判定すると、ステップST23に進んで、n=N−1が成立するかどうかを判定する。   On the other hand, if it is determined in step ST21 that Mod (S [n] −S [n−i], N) = i is not satisfied, the process proceeds to step ST23, where it is determined whether n = N−1 is satisfied.

ステップST23において、n=N−1が成立しないと判定すれば、nを『1』インクリメント(n=n+1)して、上述したステップST21に戻る。すなわち、ステップST21では、例えば、Mod(S[2]−S[1],N)が『1』であるかどうかを判定する。   If it is determined in step ST23 that n = N−1 is not satisfied, n is incremented by “1” (n = n + 1), and the process returns to step ST21 described above. That is, in step ST21, for example, it is determined whether Mod (S [2] −S [1], N) is “1”.

一方、ステップST23において、n=N−1が成立すると判定すれば、ステップST24に進み、i=N−1が成立するかどうかを判定し、i=N−1が成立しないと判定すれば、i=i+1,n=iとして、上述したステップST21に戻る。すなわち、ステップST21では、例えば、Mod(S[2]−S[0],N)が『2』であるかどうかを判定する。   On the other hand, if it is determined in step ST23 that n = N−1 is established, the process proceeds to step ST24, where it is determined whether i = N−1 is established, and if i = N−1 is not established, As i = i + 1 and n = i, the process returns to the above-described step ST21. That is, in step ST21, for example, it is determined whether Mod (S [2] −S [0], N) is “2”.

なお、ステップST24において、i=N−1が成立すると判定すれば、ステップST25に進んで、出力をデフォルト値(OUT=DefVal)として処理を終了する。通常、処理がステップST22で終了し、ステップST24まで進まないように設計する。   If it is determined in step ST24 that i = N−1 is established, the process proceeds to step ST25, where the output is set to the default value (OUT = DefVal), and the process is terminated. Normally, the design is such that the process ends at step ST22 and does not proceed to step ST24.

図10は、本実施例のカウンタ回路におけるサンプリング補正処理のさらに他の例を示すフローチャートであり、上述した図9のサンプリング補正処理において、kmat回だけカウント値が正しくなるかどうかを判定する処理を追加したものに相当する。   FIG. 10 is a flowchart showing still another example of the sampling correction process in the counter circuit of the present embodiment. In the sampling correction process of FIG. 9 described above, a process for determining whether the count value is correct only kmat times. It corresponds to the added one.

すなわち、図10の例は、サンプリング出力において、偶然に複数のエラーが重なった場合でも、カウント値がkmat回だけ正しいと判定される条件を追加することで、より正しい結果を得るようにしたものである。   That is, in the example of FIG. 10, even when a plurality of errors are accidentally overlapped in the sampling output, a more correct result is obtained by adding a condition that the count value is determined to be correct only kmat times. It is.

換言すると、図9の例は、iまたはnの値を変化させ、どちらかの条件が満たされれば、結果が出力されるのに対して、図10の例では、その条件がkmat回だけ満たされないと結果が出力されないようになっている。   In other words, the example of FIG. 9 changes the value of i or n, and if either condition is satisfied, the result is output, whereas in the example of FIG. 10, the condition is satisfied by kmat times. Otherwise, the result will not be output.

図10に示されるように、カウンタ回路のサンプリング補正処理のさらに他の例が開始すると、ステップST31において、Mod(S[n]−S[n-i],N)=iが成立するかどうかを判定する。ここで、初期条件として、n=1,i=1,k=0としている。従って、ステップST31では、Mod(S[1]−S[0],N)=iが成立するかどうかを判定する。   As shown in FIG. 10, when yet another example of the sampling correction processing of the counter circuit starts, it is determined in step ST31 whether Mod (S [n] −S [ni], N) = i is satisfied. To do. Here, n = 1, i = 1, and k = 0 are set as initial conditions. Therefore, in step ST31, it is determined whether Mod (S [1] −S [0], N) = i is satisfied.

ステップST31において、Mod(S[n]−S[n-i],N)=iが成立すると判定すると、ステップST32に進んで、kがkmatに等しい(k=kmat)かどうかを判定する。すなわち、ステップST31におけるMod(S[n]−S[n-i],N)=iがkmat回成立するかどうかを判定する。   If it is determined in step ST31 that Mod (S [n] −S [n−i], N) = i is established, the process proceeds to step ST32 to determine whether k is equal to kmat (k = kmat). That is, it is determined whether Mod (S [n] −S [n−i], N) = i in step ST31 is established kmat times.

ステップST32において、k=kmatが成立しない、すなわち、まだkmat回成立していないと判定すると、n=n+1として、ステップST31に戻る。すなわち、ステップST31では、例えば、Mod(S[2]−S[1],N)=iが成立するかどうかを判定する。   If it is determined in step ST32 that k = kmat is not satisfied, that is, kmat times have not yet been satisfied, n = n + 1 is set, and the process returns to step ST31. That is, in step ST31, for example, it is determined whether Mod (S [2] −S [1], N) = i is satisfied.

そして、ステップST32において、k=kmatが成立すると判定すると、ステップST33に進んで、Mod(S[n]−n,N)の値を出力(OUT=Mod(S[n]−n,N))する。   If it is determined in step ST32 that k = kmat is established, the process proceeds to step ST33, and the value of Mod (S [n] −n, N) is output (OUT = Mod (S [n] −n, N). )

一方、ステップST31において、Mod(S[n]−S[n-i],N)=iが成立しないと判定すると、ステップST34に進み、n=N−1が成立するかどうかを判定する。ここで、Nは、カウンタの最大カウント値であるのは、図9を参照して説明した通りである。   On the other hand, if it is determined in step ST31 that Mod (S [n] −S [n−i], N) = i is not satisfied, the process proceeds to step ST34, and it is determined whether n = N−1 is satisfied. Here, N is the maximum count value of the counter as described with reference to FIG.

ステップST34において、n=N−1が成立しないと判定すれば、nを『1』インクリメント(n=n+1)して、上述したステップST31に戻る。すなわち、ステップST31では、例えば、Mod(S[2]−S[1],N)が『1』であるかどうかを判定する。   If it is determined in step ST34 that n = N−1 is not satisfied, n is incremented by “1” (n = n + 1), and the process returns to step ST31 described above. That is, in step ST31, for example, it is determined whether Mod (S [2] −S [1], N) is “1”.

一方、ステップST34において、n=N−1が成立すると判定すれば、ステップST35に進み、i=N−1が成立するかどうかを判定し、i=N−1が成立しないと判定すれば、i=i+1,n=iとして、上述したステップST31に戻る。すなわち、ステップST31では、例えば、Mod(S[2]−S[0],N)が『2』であるかどうかを判定する。   On the other hand, if it is determined in step ST34 that n = N−1 is established, the process proceeds to step ST35, where it is determined whether i = N−1 is established, and if i = N−1 is not established, As i = i + 1 and n = i, the process returns to the above-described step ST31. That is, in step ST31, for example, it is determined whether Mod (S [2] −S [0], N) is “2”.

なお、ステップST35において、i=N−1が成立すると判定すれば、ステップST36に進んで、出力をデフォルト値(OUT=DefVal)として処理を終了する。通常、処理がステップST33で終了し、ステップST36まで進まないように設計する。   If it is determined in step ST35 that i = N−1 is established, the process proceeds to step ST36, where the output is set to the default value (OUT = DefVal), and the process is terminated. Normally, the design is such that the process ends at step ST33 and does not proceed to step ST36.

このように、図10に示すカウンタ回路のサンプリング補正処理は、上述した図9に示すカウンタ回路のサンプリング補正処理に対して、Mod(S[n]−S[n-i],N)=iがkmat回成立するかどうかを判定するステップST32を追加したものに相当する。   As described above, the sampling correction processing of the counter circuit shown in FIG. 10 is such that Mod (S [n] −S [ni], N) = i is kmat compared to the sampling correction processing of the counter circuit shown in FIG. This corresponds to the addition of step ST32 for determining whether or not the number of times is satisfied.

そして、図10のサンプリング補正処理によれば、例えば、偶然に複数のエラーが重なった場合でも、kmat回成立するかどうかを判定することにより、図9のサンプリング補正処理よりも正しいカウント値を出力することが可能になる。   Then, according to the sampling correction process of FIG. 10, for example, even if a plurality of errors are accidentally overlapped, it is determined whether or not kmat times are satisfied, thereby outputting a more correct count value than the sampling correction process of FIG. It becomes possible to do.

図11は、本実施例のカウンタ回路を適用したADPLLの一例を示すブロック図である。図11において、参照符号2は、キャリブレーション部を示し、また、3は、オールデジタルPLL(ADPLL:All Digital Phase-Locked Loop)を示す。   FIG. 11 is a block diagram showing an example of an ADPLL to which the counter circuit of this embodiment is applied. In FIG. 11, reference numeral 2 indicates a calibration unit, and 3 indicates an all-digital PLL (ADPLL: All Digital Phase-Locked Loop).

ここで、本実施例のカウンタ回路は、キャリブレーション部2およびADPLL3におけるカウンタ31に対応する。また、カウンタクロックCK−DCOは、DCO(Digitally Controlled Oscillator)36の出力クロックに対応し、また、サンプリングクロックRef−CKは、カウンタ31およびTDC32に供給されるクロックに対応する。   Here, the counter circuit of this embodiment corresponds to the calibration unit 2 and the counter 31 in the ADPLL 3. The counter clock CK-DCO corresponds to an output clock of a digitally controlled oscillator (DCO) 36, and the sampling clock Ref-CK corresponds to a clock supplied to the counter 31 and the TDC 32.

図11に示されるように、キャリブレーション部2は、微分回路21,デジタルループフィルタ22,メモリ23,加算器24および判定回路25を有する。また、ADPLL3は、カウンタ31,TDC(Time to Digital Converter)32,デコーダ33,加算器34,デジタルループフィルタ35およびDCO36を有する。   As shown in FIG. 11, the calibration unit 2 includes a differentiation circuit 21, a digital loop filter 22, a memory 23, an adder 24, and a determination circuit 25. The ADPLL 3 includes a counter 31, a TDC (Time to Digital Converter) 32, a decoder 33, an adder 34, a digital loop filter 35, and a DCO 36.

微分回路21は、カウンタ31の出力C[n],C[n-1](例えば、前述したS[n],S[n-1]に対応)を微分(ModB(C[n]−C[n-1])する。デジタルループフィルタ22は、その微分された出力を平均化してメモリ23に格納すると共に、加算器24に供給する。   The differentiating circuit 21 differentiates the output C [n], C [n-1] of the counter 31 (for example, corresponding to S [n], S [n-1] described above) (ModB (C [n] -C [n-1]) The digital loop filter 22 averages the differentiated output, stores it in the memory 23, and supplies it to the adder 24.

加算器24は、メモリ23に格納された第1の値から、デジタルループフィルタ22から出力された第2の値を減算し、その加算器24の出力(減算結果)が判定回路25で判定される。   The adder 24 subtracts the second value output from the digital loop filter 22 from the first value stored in the memory 23, and the determination circuit 25 determines the output (subtraction result) of the adder 24. The

ここで、初期状態において、キャリブレーション部2は、例えば、最大のサンプリング回数によりADPLL3をロックし、上述したメモリ23に格納された値とデジタルループフィルタ22の出力が一致すれば、順にサンプリング回数を低減させる。   Here, in the initial state, for example, the calibration unit 2 locks the ADPLL 3 with the maximum number of times of sampling, and if the value stored in the memory 23 and the output of the digital loop filter 22 match, Reduce.

すなわち、判定回路25に供給される加算器24の出力において、差分が小さければ、サンプリング回数を低減し、逆に、差分が大きければ、サンプリング回数を増大して、キャリブレーション部2のキャリブレーション処理を停止する。   That is, in the output of the adder 24 supplied to the determination circuit 25, if the difference is small, the number of times of sampling is reduced. Conversely, if the difference is large, the number of times of sampling is increased and the calibration process of the calibration unit 2 is performed. To stop.

なお、ADPLL3において、TDC32,デコーダ33,加算器34,デジタルループフィルタ35およびDCO36は、従来から知られているものをそのまま適用することができ、これにより、すべてデジタル化した位相同期回路(PLL)が構成される。   In the ADPLL 3, the TDC 32, the decoder 33, the adder 34, the digital loop filter 35, and the DCO 36 can be applied as they are conventionally known, and as a result, are all digitized phase locked loops (PLL). Is configured.

以上において、本実施例のカウンタ回路は、図11のようなADPLLへの適用に限定されるものではなく、例えば、無線回路システムの周波数シンセサイザやプロセッサなどのクロック等として、様々な回路に適用することができる。   In the above, the counter circuit of the present embodiment is not limited to the application to the ADPLL as shown in FIG. 11, and is applied to various circuits as, for example, a clock for a frequency synthesizer or a processor of a wireless circuit system. be able to.

以上の実施例を含む実施形態に関し、さらに、以下の付記を開示する。
(付記1)
カウンタクロックに従ってカウントしてカウント値を算出するカウンタ部と、
前記カウント値を、少なくとも3つのサンプリングクロックで取り込むサンプリング部と、
前記少なくとも3つのサンプリングクロックで取り込まれた少なくとも3つのサンプリング値を、前記少なくとも3つのサンプリングクロックにおけるタイミングのずれにより判定する判定部と、
を有することを特徴とするカウンタ回路。
Regarding the embodiment including the above examples, the following supplementary notes are further disclosed.
(Appendix 1)
A counter unit that counts according to a counter clock to calculate a count value;
A sampling unit that captures the count value with at least three sampling clocks;
A determination unit that determines at least three sampling values captured by the at least three sampling clocks based on a timing shift in the at least three sampling clocks;
A counter circuit comprising:

(付記2)
前記少なくとも3つのサンプリングクロックは、前記カウンタクロックの周期に同期したタイミングを有する連続したクロックである、
ことを特徴とする付記1に記載のカウンタ回路。
(Appendix 2)
The at least three sampling clocks are continuous clocks having timings synchronized with a cycle of the counter clock.
The counter circuit according to appendix 1, wherein:

(付記3)
前記判定部は、
前記少なくとも3つのサンプリング値における第1および第2サンプリング値が、当該第1および第2サンプリング値を取り込んだ第1および第2サンプリングクロックにおけるタイミングのずれに対応するときに、前記第1サンプリング値を、前記カウンタ部における正しいカウント値と判定して出力する、
ことを特徴とする付記1または付記2に記載のカウンタ回路。
(Appendix 3)
The determination unit
When the first and second sampling values in the at least three sampling values correspond to a timing shift in the first and second sampling clocks that have captured the first and second sampling values, the first sampling value is , And determine and output a correct count value in the counter unit,
The counter circuit according to Supplementary Note 1 or Supplementary Note 2, wherein:

(付記4)
前記第1および第2サンプリングクロックにおけるタイミングのずれは、前記カウンタクロックの任意の第1周期であり、
前記第1および第2サンプリング値は、前記カウンタクロックの前記第1周期に対応したカウント値だけずれている、
ことを特徴とする付記3に記載のカウンタ回路。
(Appendix 4)
The timing shift in the first and second sampling clocks is an arbitrary first period of the counter clock,
The first and second sampling values are shifted by a count value corresponding to the first period of the counter clock.
The counter circuit according to appendix 3, wherein:

(付記5)
前記第1および第2サンプリングクロックにおけるタイミングのずれは、前記カウンタクロックの1周期であり、
前記第1および第2サンプリング値は、カウント値『1』だけずれている、
ことを特徴とする付記4に記載のカウンタ回路。
(Appendix 5)
The difference in timing between the first and second sampling clocks is one cycle of the counter clock,
The first and second sampling values are shifted by a count value “1”.
The counter circuit according to appendix 4, wherein:

(付記6)
前記判定部は、
前記第1および第2サンプリング値と、当該第1および第2サンプリング値を取り込んだ前記第1および第2サンプリングクロックにおけるタイミングのずれとの対応および判定を、異なる第1サンプリング値に対して複数回行う、
ことを特徴とする付記3乃至付記5のいずれか1項に記載のカウンタ回路。
(Appendix 6)
The determination unit
Correspondence and determination between the first and second sampling values and the timing shift in the first and second sampling clocks that have taken in the first and second sampling values are performed a plurality of times for different first sampling values. Do,
6. The counter circuit according to any one of appendix 3 to appendix 5, wherein

(付記7)
付記1乃至付記6のいずれか1項に記載のカウンタ回路を有することを特徴とするオールデジタルPLL。
(Appendix 7)
An all-digital PLL comprising the counter circuit according to any one of appendix 1 to appendix 6.

(付記8)
カウンタクロックに従ってカウントしてカウント値を算出し、
前記カウント値を、少なくとも3つのサンプリングクロックで取り込み、
前記少なくとも3つのサンプリングクロックで取り込まれた少なくとも3つのサンプリング値を、前記少なくとも3つのサンプリングクロックにおけるタイミングのずれにより判定および補正を行う、
ことを特徴とするカウンタ回路のサンプリング補正方法。
(Appendix 8)
Count according to the counter clock to calculate the count value,
Capturing the count value with at least three sampling clocks;
Determining and correcting at least three sampling values captured by the at least three sampling clocks by a timing shift in the at least three sampling clocks;
A sampling correction method for a counter circuit.

(付記9)
前記少なくとも3つのサンプリングクロックは、前記カウンタクロックの周期に同期したタイミングを有する連続したクロックである、
ことを特徴とする付記8に記載のカウンタ回路のサンプリング補正方法。
(Appendix 9)
The at least three sampling clocks are continuous clocks having timings synchronized with a cycle of the counter clock.
The sampling correction method for a counter circuit according to appendix 8, wherein

(付記10)
前記判定および補正を行うのは、
前記少なくとも3つのサンプリング値における第1および第2サンプリング値が、当該第1および第2サンプリング値を取り込んだ第1および第2サンプリングクロックにおけるタイミングのずれに対応するときに、前記第1サンプリング値を、前記カウンタ部における正しいカウント値と判定して補正を行う、
ことを特徴とする付記8または付記9に記載のカウンタ回路のサンプリング補正方法。
(Appendix 10)
The determination and correction are performed.
When the first and second sampling values in the at least three sampling values correspond to a timing shift in the first and second sampling clocks that have captured the first and second sampling values, the first sampling value is The correction is performed by determining the correct count value in the counter unit.
The sampling correction method for a counter circuit according to appendix 8 or appendix 9, wherein

(付記11)
前記第1および第2サンプリングクロックにおけるタイミングのずれは、前記カウンタクロックの任意の第1周期であり、
前記第1および第2サンプリング値は、前記カウンタクロックの前記第1周期に対応したカウント値だけずれている、
ことを特徴とする付記9に記載のカウンタ回路のサンプリング補正方法。
(Appendix 11)
The timing shift in the first and second sampling clocks is an arbitrary first period of the counter clock,
The first and second sampling values are shifted by a count value corresponding to the first period of the counter clock.
The sampling correction method of the counter circuit according to appendix 9, wherein

2 キャリブレーション部
3 ADPLL
11,111,211 カウンタ部
12,112,212 サンプラ部
13 判定部
21 微分回路
22、35 デジタルループフィルタ
23 メモリ
24,34 加算器
25 判定回路
31 カウンタ
32 TDC(Time to Digital Converter)
33 デコーダ
36 DCO(Digitally Controlled Oscillator)
2 Calibration section 3 ADPLL
11, 111, 211 Counter unit 12, 112, 212 Sampler unit 13 Judgment unit 21 Differentiating circuit 22, 35 Digital loop filter 23 Memory 24, 34 Adder 25 Judgment circuit 31 Counter 32 TDC (Time to Digital Converter)
33 Decoder 36 DCO (Digitally Controlled Oscillator)

Claims (9)

カウンタクロックに従ってカウントし、前記カウンタクロックに非同期のカウント値を算出するカウンタ部と、
前記カウント値を、少なくとも3つのサンプリングクロックで取り込むサンプリング部と、
前記少なくとも3つのサンプリングクロックで取り込まれた少なくとも3つのサンプリング値を、前記少なくとも3つのサンプリングクロックにおけるタイミングのずれにより判定する判定部と、
を有することを特徴とする非同期式カウンタ回路。
A counter unit that counts according to a counter clock and calculates a count value asynchronous to the counter clock ;
A sampling unit that captures the count value with at least three sampling clocks;
A determination unit that determines at least three sampling values captured by the at least three sampling clocks based on a timing shift in the at least three sampling clocks;
An asynchronous counter circuit characterized by comprising:
前記少なくとも3つのサンプリングクロックは、前記カウンタクロックの周期に同期したタイミングを有する連続したクロックである、
ことを特徴とする請求項1に記載の非同期式カウンタ回路。
The at least three sampling clocks are continuous clocks having timings synchronized with a cycle of the counter clock.
The asynchronous counter circuit according to claim 1, wherein:
前記判定部は、
前記少なくとも3つのサンプリング値における第1および第2サンプリング値が、当該第1および第2サンプリング値を取り込んだ第1および第2サンプリングクロックにおけるタイミングのずれに対応するときに、前記第1サンプリング値を、前記カウンタ部における正しいカウント値と判定して出力する、
ことを特徴とする請求項1または請求項2に記載の非同期式カウンタ回路。
The determination unit
When the first and second sampling values in the at least three sampling values correspond to a timing shift in the first and second sampling clocks that have captured the first and second sampling values, the first sampling value is , And determine and output a correct count value in the counter unit,
The asynchronous counter circuit according to claim 1, wherein the asynchronous counter circuit is provided.
前記カウンタ部は、nおよびmを2以上の整数でn≧mとして、n個のフリップフロップを含み、The counter unit includes n flip-flops, where n and m are integers of 2 or more and n ≧ m,
前記n個のフリップフロップにおける初段の第1フリップフロップのクロック入力には、前記カウンタクロックが供給され、The counter clock is supplied to the clock input of the first flip-flop of the first stage in the n flip-flops,
前記n個のフリップフロップにおけるm段目の第mフリップフロップのクロック入力には、その前段の第m−1フリップフロップの反転出力が供給され、The inverted output of the m−1th flip-flop of the preceding stage is supplied to the clock input of the mth flip-flop of the mth stage in the n flip-flops,
前記n個のフリップフロップの各段のフリップフロップにおいて、それぞれのデータ入力には、その段のフリップフロップの反転出力が供給される、In each flip-flop of each of the n flip-flops, an inverted output of the flip-flop of that stage is supplied to each data input.
ことを特徴とする請求項1乃至請求項3のいずれか1項に記載の非同期式カウンタ回路。The asynchronous counter circuit according to any one of claims 1 to 3, wherein:
前記サンプリング部は、The sampling unit
前記少なくとも3つのサンプリングクロックで前記カウント値を取り込む、少なくとも3つのサンプラユニットを含み、Including at least three sampler units that capture the count value with the at least three sampling clocks;
それぞれの前記サンプラユニットは、Each of the sampler units
前記カウンタ部におけるn個の前記フリップフロップに対応し、前記カウンタ部におけるそれぞれの前記フリップフロップの出力をデータ入力で受け取るn個のフリップフロップを含む、N flip-flops corresponding to the n flip-flops in the counter unit and receiving the output of each flip-flop in the counter unit at a data input,
ことを特徴とする請求項4に記載の非同期式カウンタ回路。The asynchronous counter circuit according to claim 4, wherein:
請求項1乃至請求項のいずれか1項に記載の非同期式カウンタ回路を有することを特徴とするオールデジタルPLL。 All-digital PLL, characterized in that it comprises an asynchronous counter circuit according to any one of claims 1 to 5. カウンタクロックに従ってカウントして、前記カウンタクロックに非同期のカウント値を算出し、
前記カウント値を、少なくとも3つのサンプリングクロックで取り込み、
前記少なくとも3つのサンプリングクロックで取り込まれた少なくとも3つのサンプリング値を、前記少なくとも3つのサンプリングクロックにおけるタイミングのずれにより判定および補正を行う、
ことを特徴とする非同期式カウンタ回路のサンプリング補正方法。
Counting according to the counter clock, calculating a count value asynchronous to the counter clock ,
Capturing the count value with at least three sampling clocks;
Determining and correcting at least three sampling values captured by the at least three sampling clocks by a timing shift in the at least three sampling clocks;
A sampling correction method for an asynchronous counter circuit.
前記カウント値を算出するのは、nおよびmを2以上の整数でn≧mとして、n個のフリップフロップにより、The count value is calculated by using n flip-flops where n and m are integers of 2 or more and n ≧ m.
前記n個のフリップフロップにおける初段の第1フリップフロップのクロック入力に、前記カウンタクロックを供給し、Supplying the counter clock to the clock input of the first flip-flop of the first stage in the n flip-flops;
前記n個のフリップフロップにおけるm段目の第mフリップフロップのクロック入力に、その前段の第m−1フリップフロップの反転出力を供給し、Supplying the inverted output of the m-1st flip-flop of the preceding stage to the clock input of the mth flip-flop of the mth stage in the n flip-flops;
前記n個のフリップフロップの各段のフリップフロップにおいて、それぞれのデータ入力に、その段のフリップフロップの反転出力を供給して、前記カウンタクロックに非同期のカウント値を算出する、In each flip-flop of each of the n flip-flops, an inverted output of the flip-flop of that stage is supplied to each data input, and a count value asynchronous with the counter clock is calculated.
ことを特徴とする請求項7に記載の非同期式カウンタ回路のサンプリング補正方法。The sampling correction method for an asynchronous counter circuit according to claim 7.
前記カウント値を取り込むのは、To capture the count value,
少なくとも3つのサンプラユニットにより、前記少なくとも3つのサンプリングクロックで前記カウント値を取り込み、The at least three sampler units capture the count value with the at least three sampling clocks,
それぞれの前記サンプラユニットは、Each of the sampler units
前記カウンタ部におけるn個の前記フリップフロップに対応し、前記カウンタ部におけるそれぞれの前記フリップフロップの出力をデータ入力で受け取るn個のフリップフロップを含む、N flip-flops corresponding to the n flip-flops in the counter unit and receiving the output of each flip-flop in the counter unit at a data input,
ことを特徴とする請求項8に記載の非同期式カウンタ回路のサンプリング補正方法。The sampling correction method for an asynchronous counter circuit according to claim 8.
JP2011102117A 2011-04-28 2011-04-28 Asynchronous counter circuit and sampling correction method for asynchronous counter circuit Active JP5762116B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011102117A JP5762116B2 (en) 2011-04-28 2011-04-28 Asynchronous counter circuit and sampling correction method for asynchronous counter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011102117A JP5762116B2 (en) 2011-04-28 2011-04-28 Asynchronous counter circuit and sampling correction method for asynchronous counter circuit

Publications (2)

Publication Number Publication Date
JP2012235290A JP2012235290A (en) 2012-11-29
JP5762116B2 true JP5762116B2 (en) 2015-08-12

Family

ID=47435200

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011102117A Active JP5762116B2 (en) 2011-04-28 2011-04-28 Asynchronous counter circuit and sampling correction method for asynchronous counter circuit

Country Status (1)

Country Link
JP (1) JP5762116B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05175833A (en) * 1991-12-19 1993-07-13 Fujitsu Ltd Phase variable frequency divider
JPH0637627A (en) * 1992-07-16 1994-02-10 Meidensha Corp Counter reading system
JP3088302B2 (en) * 1996-08-19 2000-09-18 日本電気株式会社 Binary counter readout circuit
KR100723517B1 (en) * 2005-12-14 2007-05-30 삼성전자주식회사 A counter that maintains a counting value and outputs it, and a phase locked loop having the counter

Also Published As

Publication number Publication date
JP2012235290A (en) 2012-11-29

Similar Documents

Publication Publication Date Title
JP5321864B2 (en) Digital phase comparator
JP4788825B2 (en) Jitter suppression circuit and jitter suppression method
US8395417B2 (en) Digital noise filter
US6959058B2 (en) Data recovery apparatus and method for minimizing errors due to clock skew
JP2773669B2 (en) Digital PLL circuit
CA2338320C (en) Integrated data clock extractor
US7474721B2 (en) Sliding-window based signal monitoring
JP4220320B2 (en) Semiconductor integrated circuit device
JP5807065B2 (en) Phase comparison device and DLL circuit
US5428648A (en) Digital PLL circuit having signal edge position measurement
KR0132811B1 (en) Digital Data Recovery Device
US20120049912A1 (en) Digital phase difference detector and frequency synthesizer including the same
JP3669796B2 (en) Digital PLL circuit
JP5520128B2 (en) Clock and data recovery circuit
JPH088738A (en) Pll circuit device
JP5762116B2 (en) Asynchronous counter circuit and sampling correction method for asynchronous counter circuit
JP3983575B2 (en) Frequency comparator and lock detection circuit using the same
CN102142835B (en) Phase digitizing apparatus and method thereof
JP2015100017A (en) Phase comparison circuit and clock data recovery circuit
JP3257065B2 (en) Digital PLL device
JP2004289540A (en) Clock extraction circuit and clock extraction method
WO2020246092A1 (en) Phase synchronization circuit, electronic device, and method for controlling phase synchronization circuit
JP2021190929A (en) Semiconductor device and decoding method
TWI555337B (en) Phase detector, clock and data recovery circuit, and related control method
JP6333166B2 (en) Received data restoration device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140926

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141014

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141209

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150609

R150 Certificate of patent or registration of utility model

Ref document number: 5762116

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313115

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350