JPH03267820A - High speed digital counter - Google Patents

High speed digital counter

Info

Publication number
JPH03267820A
JPH03267820A JP6593590A JP6593590A JPH03267820A JP H03267820 A JPH03267820 A JP H03267820A JP 6593590 A JP6593590 A JP 6593590A JP 6593590 A JP6593590 A JP 6593590A JP H03267820 A JPH03267820 A JP H03267820A
Authority
JP
Japan
Prior art keywords
counters
signals
frequency
phase
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6593590A
Other languages
Japanese (ja)
Inventor
Tadashi Nakamura
正 中村
Atsushi Yamashita
敦 山下
Koji Matsuyama
幸二 松山
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
Original Assignee
Fujitsu 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 filed Critical Fujitsu Ltd
Priority to JP6593590A priority Critical patent/JPH03267820A/en
Publication of JPH03267820A publication Critical patent/JPH03267820A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain count without malfunction even to a high speed clock by providing a frequency divider applying 1/N frequency division to an input clock, and outputting N series of frequency division signals whose phases are deviated by one clock each, N sets of counters counting respectively N series of frequency division signals from the frequency divider and an adder summing up the count of the N sets of counters. CONSTITUTION:An input clock is subject to 1/N frequency division by a frequency divider 31 to form N series of frequency division signals whose phases are deviated by one clock each and they are counted by separate counters 32-1-32-N and the counts of the counters 32-1-32-N are added by an adder 33 and a count result being the output of the device is outputted. In such a case, the speed of the frequency division signal by the counters 32-1-32-N is 1/N of the input clock, then malfunction due to a delayed carry is prevented. Thus, count is implemented without malfunction even against a high speed clock.

Description

【発明の詳細な説明】 〔概要〕 例えば二つの信号の位相差を測定する場合などに用いら
れる高速ディジタルカウンタに関し、高速クロックに対
しても誤動作なく計数を行えるようにすることを目的と
し、 入力クロックをN分周して1クロンクずつ位相のずれ九
N系列の分局信号を出力する分周器と、分周器のN系列
の分周信号をそれぞ該分周器〔31〕のN系列の・カウ
ンタと、N個のカウンタのカウント値を合計する加算器
とを具備してなる。
[Detailed Description of the Invention] [Summary] The purpose of this invention is to enable high-speed digital counters that are used, for example, to measure the phase difference between two signals, to perform counting without malfunctioning even with high-speed clocks. A frequency divider that divides the clock by N and outputs divided signals of 9N series with a phase shift of 1 clock, and divides the divided signals of the N series of the frequency divider into N series of the frequency divider [31]. counter, and an adder for summing the count values of the N counters.

〔産業上の利用分野〕[Industrial application field]

本発明は高速ディジタルカウンタに関する。 The present invention relates to high speed digital counters.

ディジタルカウンタは種々の用途に用いられる。Digital counters are used in a variety of applications.

例えば、二つの信号A、B間の位相差を入力クロ7りで
測定しようとする場合、その位相差に相応する期間中だ
け入力クロックをディジタルカウンタで計数し、その計
数値を位相差に対応させている。一方、通信速度の高速
化などに伴い入力クロックは高速化される傾向にあり、
したがってディジタルカウンタとしても高速クロックを
カウントできる高速形のディジタルカウンタが必要とさ
れている。
For example, when trying to measure the phase difference between two signals A and B using an input clock, count the input clock using a digital counter only during the period corresponding to the phase difference, and use the counted value to correspond to the phase difference. I'm letting you do it. On the other hand, as communication speeds increase, input clocks tend to become faster.
Therefore, there is a need for a high-speed digital counter that can count high-speed clocks.

〔従来の技術〕[Conventional technology]

従来、ディジタルカウンタは、その測定しようとする値
が大きい場合、複数個のカウンタを直列に縦段接続して
使用している。
Conventionally, when a value to be measured is large, a digital counter is used by connecting a plurality of counters in series.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、複数のカウンタを縦段接続していく方法
では、測定しようとする値が大きくなるに従ってその接
続段数が増えてくる。かかる縦段接続構成のディジタル
カウンタで計数を行うには、カウンタ列のなかで下位段
のカウンタが上位段のカウンタにキャリー信号を順次に
上げていくことになる。したがって、カウンタの接続段
数が大きくなると、この桁上げ動作により発生する遅延
時間が大きくなり、この桁上がりの遅延が高速クロック
に追いつかなくなって、ディジタルカウンタが正常に造
作しなくなるという問題点がある。
However, in the method of vertically connecting a plurality of counters, the number of connected stages increases as the value to be measured becomes larger. In order to perform counting with such a digital counter having a vertically connected configuration, the counter at the lower stage in the counter array sequentially increases the carry signal to the counter at the upper stage. Therefore, as the number of connected stages of the counter increases, the delay time caused by this carry operation increases, and the delay of this carry cannot catch up with the high speed clock, causing the problem that the digital counter does not function properly.

したがって本発明の目的は、高速クロックに対しても誤
動作することなくカウントを行える高速ディジタルカウ
ンタを提供することにある。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a high-speed digital counter that can count even with high-speed clocks without malfunctioning.

〔課題を解決するための手段〕[Means to solve the problem]

第1図〜第3図はそれぞれ本発明に係る原理説明図であ
る。
FIGS. 1 to 3 are explanatory diagrams of the principles of the present invention, respectively.

本発明に係る高速ディジタルカウンタは、一つの形態と
して、第1図に示されるように、入力クロックをN分周
して1クロックずつ位相のずれたN系列の分周信号を出
力する分周器3工と、分周、W31のN系列の分周信号
をそれぞ該分周器〔31〕のN系列のカウンタ32(1
)〜32@と、N個のカウンタ32(1)〜32@のカ
ウント値を合計する加算器33とを具備してなる。
As one form of the high-speed digital counter according to the present invention, as shown in FIG. 3, frequency division, and N series frequency division signals of W31 are respectively applied to the N series counter 32 (1) of the frequency divider [31].
) to 32@, and an adder 33 for summing the count values of N counters 32(1) to 32@.

本発明に係る高速ディジタルカウンタは、他の形態とし
て、12図に示されるように、二つの信号A、Bの位相
差を入力クロックで測定するものであって、入力クロッ
クをN分周して1クロックずつ位相のずれたN系列の分
周信号を出力する分周器31と、分周器31のN系列の
分周信号をそれぞれ力うン卜するN個のカウンタ32(
1)〜32@と、二つの信号の位相差の期間にわたりN
個のカウンタ32(1)〜32■をイネーブル状態にす
るゲート信号を発生するゲート発生回路34と、N個の
カウンタ32(1)〜32@のカウント値を合計する加
算器33と、二つの信号A、Bの相対位相をシフトす合
計する加算器35と、加算器33の合計値を所定の設定
値と比較し、合計値がこの設定値付近となった時に位相
シフト回路35で二つの信号の少なくとも一方の位相を
シフトするよう制御する比較回路36と、位相シフト回
路35でシフトした位相分だけ加算器33からの合計値
に補正を加える補正回路37とを具備してなる。
As shown in FIG. 12, the high-speed digital counter according to the present invention measures the phase difference between two signals A and B using an input clock, and divides the input clock by N. A frequency divider 31 that outputs N series of frequency divided signals whose phase is shifted by one clock, and N counters 32 that respectively receive the N series of frequency divided signals of the frequency divider 31 (
1) ~ 32@ and N over the period of the phase difference between the two signals
a gate generation circuit 34 that generates a gate signal that enables the N counters 32(1) to 32■; an adder 33 that totals the count values of the N counters 32(1) to 32@; An adder 35 shifts and sums the relative phases of signals A and B, and the total value of the adder 33 is compared with a predetermined set value, and when the total value is close to this set value, the phase shift circuit 35 shifts the two The comparator circuit 36 includes a comparison circuit 36 that controls the phase shift of at least one of the signals, and a correction circuit 37 that corrects the total value from the adder 33 by the phase shifted by the phase shift circuit 35.

本発明に係る高速ディジタルカウンタは、また他の形態
として、第3図に示されるように、入力クロックをN 
(Nは整数であってIを冪指数とする2の幕乗値)分周
して1クロックずつ位相がずれたN系列の分周信号を出
力する分周器30と、分周器30の分周信号の一系列を
カウントしてカウント結果値における冪指数Iよりも上
位のビットを生成するカウンタ38と、分周器30のN
系列の分周信号の排他的論理和によりカウント出力値に
おける冪指数以下のビットを生成する排他的論理和回路
39とを具備してなる。
As another form of the high-speed digital counter according to the present invention, as shown in FIG.
(N is an integer and a multiplication value of 2 with I as a power exponent) A frequency divider 30 that divides the frequency and outputs N series frequency divided signals whose phases are shifted by one clock, and A counter 38 that counts one series of frequency-divided signals and generates bits higher than the power exponent I in the count result value, and N of the frequency divider 30.
It also includes an exclusive OR circuit 39 that generates bits below the exponent in the count output value by exclusive ORing a series of frequency-divided signals.

〔作用〕[Effect]

第1図の形態においては、入力クロックを分周器31で
N分周して、N系列の分周信号を作り、これをそれぞれ
別々のカウンタ32(1)〜320でカウントし、これ
らカウンタ32(1)〜320のカウント値を加算器3
3で合計して装置出力であるカウント結果値を出力する
。これにより各カウンタ32(1)〜320での分周信
号の速度は入力クロックの1/Nになるので、桁上げの
遅延による誤動作を防止できる。
In the embodiment shown in FIG. 1, the frequency of the input clock is divided by N by the frequency divider 31 to create N series of frequency-divided signals, which are each counted by separate counters 32(1) to 320. (1) The count value of ~320 is added to the adder 3.
3 and outputs the count result value which is the device output. As a result, the speed of the frequency-divided signals in each of the counters 32(1) to 320 becomes 1/N of the input clock, thereby preventing malfunctions due to carry delays.

第2図の形態においては、二つの信号A、Bの位相が接
近した場合、それが比較回路36による比較結果で検出
でき、位相接近値には、位相シフト回路35で接近した
位相を離して誤動作が生じるのを防ぎ、またその離した
位相分の計数値の補正を補正回路37で行う。
In the configuration shown in FIG. 2, when the phases of two signals A and B become close, it can be detected by the comparison result by the comparator circuit 36, and the phase approach value is determined by separating the close phases by the phase shift circuit 35. The correction circuit 37 prevents malfunctions and corrects the count value for the separated phase.

第3図の形態においては、カウント結果値の上位ビット
を分周信号の1系列をカウントするカウンタ39で生成
し、残りの下位ビットを排他的論理和回路39で分周信
号の排他的論理和をとることで生成しており、これによ
り必要なカウンタの数と加算器を削減している。
In the embodiment shown in FIG. 3, the upper bits of the count result value are generated by a counter 39 that counts one series of frequency-divided signals, and the remaining lower bits are generated by an exclusive OR circuit 39 that generates the exclusive OR of the frequency-divided signals. This reduces the number of counters and adders required.

〔実施例〕〔Example〕

以下、図面を参照して本発明の詳細な説明する。なお、
以下の各図面を通して、同し参照番号が付された回路は
同一機能を持った回路を表すものとする。
Hereinafter, the present invention will be described in detail with reference to the drawings. In addition,
Throughout the drawings below, circuits with the same reference numbers represent circuits with the same function.

本発明の一実施例としての高速ディジタルカウンタが第
4図に示される。またこの高速ディジタルカウンタの各
部信号のタイムチャートが第5図に示される。この高速
ディジタルカウンタは信号Aと信号Bの間の位相差を高
速クロックHCLKを用いて測定する回路に通用されて
いる。
A high speed digital counter as an embodiment of the present invention is shown in FIG. Further, a time chart of signals of each part of this high-speed digital counter is shown in FIG. This high-speed digital counter is commonly used in a circuit that measures the phase difference between signal A and signal B using high-speed clock HCLK.

第2図において、分周器1は、高速クロックHCLK 
(第5図(a))を4分周して、■高速クロックずつ位
相がずれた4系統の分周クロックCLK1〜CLK4(
第5図fe) 〜(h) )を出力する回路である。
In FIG. 2, frequency divider 1 uses high-speed clock HCLK
(Figure 5 (a)) is divided into 4 to create four divided clocks CLK1 to CLK4 whose phases are shifted by each high-speed clock (
This is a circuit that outputs fe) to (h)) in Fig. 5.

4個のカウンタ2(1)〜2■は分周器1からの分周カ
ウンタCLK1〜CLK4をそれぞれカウントする回路
であり、そのカウント値は加算器3に出力される。加算
器3はこれらカウンタ2(1)〜2■からのカウント値
を合計して、高速ディジタルカウンタの出力値(以下、
カウント結果値と称する)として出力する。
The four counters 2(1) to 2■ are circuits that respectively count the frequency division counters CLK1 to CLK4 from the frequency divider 1, and the count values are output to the adder 3. The adder 3 adds up the count values from these counters 2(1) to 2■, and calculates the output value of the high-speed digital counter (hereinafter referred to as
(referred to as the count result value).

JKフリフプフロフブ4は信号AとB(第5図(blと
(C))間の位相差に相応する長さのゲート信号Q(第
5図(d))を発生する回路であり、このゲート信号Q
は各カウンタ2(1)〜2■にイネーブル信号として入
力される。
The JK flipflop 4 is a circuit that generates a gate signal Q (Fig. 5(d)) having a length corresponding to the phase difference between the signals A and B (Fig. 5(bl and (C)). Q
is input as an enable signal to each counter 2(1) to 2■.

この実施例回路の動作が以下に説明される。The operation of this example circuit will be explained below.

分周器1は高速クロックHCLKを4分周して、位相が
1高速クロックずつずれた4系統の分周クロックCLK
 1〜CLK4を出力し、各カウンタ2(1)〜2■は
JKフリンブフロフプ4からのゲート信号Qの期間(出
力AとBの位相差に相当)にわたりイネーブル状態とさ
れ、この期間だけ各カウンタ2(1)〜2■に入力され
た分周クロックCLK1〜CLK4をそれぞれカウント
する。
Frequency divider 1 divides the frequency of the high-speed clock HCLK by 4, and generates four divided clocks CLK whose phases are shifted by one high-speed clock.
1 to CLK4, and each counter 2 (1) to 2 is enabled for the period of the gate signal Q (corresponding to the phase difference between the outputs A and B) from the JK frimbflop 4. The frequency-divided clocks CLK1 to CLK4 inputted to (1) to 2) are counted, respectively.

この各カウンタ2(1)〜2■のカウント値を加算器3
で合計すれば、この合計値はゲート信号Qの期間中に入
力された高速クロンクHCLKO数と同じになり、した
がって高速クロフクの精度で出力AとBの位相差を測定
できる。
The count values of each counter 2(1) to 2■ are added to the adder 3.
This total value is the same as the number of high-speed clocks HCLKO input during the period of the gate signal Q, and therefore the phase difference between outputs A and B can be measured with high-speed clock accuracy.

これにより従来の縦段接続構成のディジタルカウンタで
生じていた、カウンタ列の桁上がりの遅延に起因した誤
動作が防止できる。
This makes it possible to prevent malfunctions caused by delays in the carry of counter columns, which occur in conventional digital counters with a vertically connected configuration.

本発明の他の実施例が第6図に示される。この実施例は
各カウンタ2(1)〜2■に入力されるゲート信号を、
各カウンタ2(1)〜2■に入力される分周クロックC
LK 1〜CLK4の位相に同期させるようにしたもの
であり、各カウンタ2(1)〜2■対応にJKフリップ
フロップ4(1)〜4■を設け、各JKフリップフロフ
ブ4(1)〜4■にクロック入力として、分周器lから
の分周クロックCLK 1〜CLK4をそれぞれ入力さ
せ、それにより各カウンタ2(1)〜2■に対するゲー
ト信号Q(1)〜Q■を発生している。
Another embodiment of the invention is shown in FIG. In this embodiment, the gate signals input to each counter 2(1) to 2■ are
Divided clock C input to each counter 2(1) to 2■
It is designed to synchronize with the phase of LK1 to CLK4, and JK flip-flops 4(1) to 4■ are provided corresponding to each counter 2(1) to 2■, and each JK flip-flop 4(1) to 4■ The divided clocks CLK1-CLK4 from the frequency divider 1 are respectively input as clock inputs to the counters 1, thereby generating gate signals Q(1)-Q2 for each counter 2(1)-22.

本発明の更に他の実施例が第8図に示される。Yet another embodiment of the invention is shown in FIG.

この実施例回路は上述の二つの実施例回路を改良したも
のである。
This embodiment circuit is an improvement of the above two embodiment circuits.

すなわち、上述の実施例回路では、信号AとBの位相差
が接近した場合に、誤動作を生じる可能性がある。例え
ば第5図の実施例回路で信号AとBの位相差が接近した
場合のタイムチャートが第7図に示される。この場合、
信号AとBが笛なり合った期間中(スタートパルスとエ
ンドパルスが重なる位相であってカウント結果値が最大
に近い位相)に発生されたゲート信号Q■、Q■は前の
状態を反転したものが出力されることになるため、カウ
ンタ2■、■は動作不定の状態となり、よって加算器3
の合計値は信頼できなくなる。このため信号AとBが接
近した位相では、上述の二つの実施例回路は使用するこ
とができなかった。
That is, in the above-described embodiment circuit, if the phase difference between signals A and B approaches, malfunction may occur. For example, FIG. 7 shows a time chart when the phase difference between signals A and B approaches each other in the circuit of the embodiment shown in FIG. in this case,
The gate signals Q■ and Q■ generated during the period when signals A and B were whistled together (the phase where the start pulse and end pulse overlap and the count result value is close to the maximum) reversed the previous state. Since the counters 2 and 2 will be output, the operation of the counters 2 and 2 will be in an undefined state, and therefore the adder 3
The total value of becomes unreliable. Therefore, when the signals A and B are close in phase, the circuits of the two embodiments described above cannot be used.

第8図の実施例回路はかかる問題を解決したものである
。この実施例回路は第5図の実施例回路に更に回路を追
加したもので、信号Aをある位相だけ遅延シフトさせる
遅延素子5と、信号Aと遅延素子5経由の信号Aの一方
を選択するセレタク6を設け、このセレクタ6で選択し
た信号*Aを用いて、各JKフリップフロップ4(1)
〜4■でゲート信号Q(1)〜Q■を生成するようにし
ている。
The embodiment circuit shown in FIG. 8 solves this problem. This embodiment circuit has additional circuits added to the embodiment circuit shown in FIG. 5, and includes a delay element 5 that delays and shifts the signal A by a certain phase, and selects either the signal A or the signal A via the delay element 5. A selector 6 is provided, and using the signal *A selected by this selector 6, each JK flip-flop 4 (1)
~4■ are used to generate gate signals Q(1) to Q■.

また、加算器3の出力側に、加算器3の合計値を所定の
設定値と比較する比較器7と、補正値CまたはOを選択
するセレクタ9と、加算器3の合計値とセレクタ9の出
力値を加算する加算器8とを設け、比較器7の比較結果
に応してセレクタ6と9の選択切換えを接続するように
している。
Further, on the output side of the adder 3, a comparator 7 that compares the total value of the adder 3 with a predetermined setting value, a selector 9 that selects the correction value C or O, and a selector 9 that compares the total value of the adder 3 with a predetermined setting value. An adder 8 is provided to add the output values of the selectors 6 and 9, and the selectors 6 and 9 are connected in accordance with the comparison result of the comparator 7.

この実施例回路の動作が以下に説明される。The operation of this example circuit will be explained below.

通常動作時にはセレクタ6と9は共に入力■側を選択し
ている。よってこの場合の動作は前の実施例回路で説明
したものと同じである。
During normal operation, selectors 6 and 9 both select the input (2) side. Therefore, the operation in this case is the same as that described in the previous embodiment circuit.

いま第7図に示されるように、信号Aと信号Bが重なる
位相になったものとする。この場合、信号Aと信号Bは
周期信号であるため、その時の真の位相差は0近傍ある
いは最大値近傍となる。ここで最大位相差の時に回路が
誤動作なく計数をした場合の真のカウント結果値をMと
する。
Assume now that the signal A and the signal B are in overlapping phase as shown in FIG. In this case, since the signal A and the signal B are periodic signals, the true phase difference at that time is near 0 or near the maximum value. Here, let M be the true count result value when the circuit counts without malfunction at the maximum phase difference.

信号AとBの位相接近により4つのカウンタ2(1)〜
2■のうちの一つがディスエーブルとなった時には、加
算器3からのカウント出力値は3M/4となり、さらに
二つがディスエーブルの時には2M/4、三つの時には
M/4、四つの時には0となる。このように、回路がN
個のカウンタで構成されている場合には、位相接近状態
ではカウンタ2(1)〜2■のいずれかが動作停止して
いる可能性があり、したがって加算器3から出力される
可能性のある合計値は、 iM/N   (但し、iは1〜(N−1))となる。
Due to the phase approach of signals A and B, four counters 2 (1) ~
When one of 2 is disabled, the count output value from adder 3 is 3M/4, and when two are disabled, it is 2M/4, when three is M/4, and when four is 0. becomes. In this way, the circuit is N
If the counter is composed of 2 counters, there is a possibility that any of the counters 2(1) to 2■ may be stopped in the phase approach state, and therefore there is a possibility that the output from the adder 3 The total value is iM/N (where i is 1 to (N-1)).

この性質を利用し、加算器3の合計値がこれらの値に近
付いた時には、誤カウントが行われている可能性がある
と推測することができる。
Utilizing this property, when the total value of the adder 3 approaches these values, it can be inferred that there is a possibility that erroneous counting is occurring.

この判断は比較器7によって行われる。すなわち、比較
器7には上述のiM/Nが比較設定値として設定されて
おり、加算器3の出力値がこれらの値の近くになると、
切換え信号をセレクタ6と9に出力する。
This judgment is made by the comparator 7. That is, the above-mentioned iM/N is set as a comparison setting value in the comparator 7, and when the output value of the adder 3 becomes close to these values,
A switching signal is output to selectors 6 and 9.

これによりセレクタ6と9は入力■側を選択するように
切り替わる。よって信号Aはある位相りだけ遅延して各
JKフリフプフロ7プ4(1)〜4■に入力されるよう
になる。この結果、ゲート信号Q(1)〜Q■はその位
相りだけ長さが短くなる。
As a result, the selectors 6 and 9 are switched to select the input (2) side. Therefore, the signal A is delayed by a certain phase and is input to each of the JK flip-flops 7 (4(1) to 4). As a result, the lengths of the gate signals Q(1) to Q■ become shorter by the phase thereof.

このように信号Aの位相をシフトした結果、加算器3の
出力値が、 M−(遅延位相り分の高速クロック数)となつた場合に
は、信号AとBの現在の位相状態が前述の第7図の如く
のものであったと判断でき、シフト前の加算器3の出力
は誤りであると判断できる。その場合には、信号Aの位
相をシフト後の加算器3の合計値に、加算器8で、セレ
クタ9からの補正値Cを加算して、これを真のカウント
結果値として出力する。ここで補正値Cは遅延素子5で
シフトした位相分の高速クロックCLKO数に相当する
値が選ばれる。
As a result of shifting the phase of signal A in this way, if the output value of adder 3 becomes M- (the number of high-speed clocks corresponding to the delay phase), the current phase states of signals A and B are as described above. It can be determined that the output of the adder 3 before the shift is incorrect. In that case, the adder 8 adds the correction value C from the selector 9 to the total value of the adder 3 after shifting the phase of the signal A, and outputs this as the true count result value. Here, a value corresponding to the number of high-speed clocks CLKO corresponding to the phase shifted by the delay element 5 is selected as the correction value C.

一方、比較器7による比較の結果、加算器3からの出力
値が比較設定値に近い場合でも、それが正常動作時にお
ける真の計数値である場合には、信号Aの位相を遅延素
子5で遅延させた結果として、加算器3から出力される
合計値は、(シフト前の加算a3の合計値)−(遅延位
相り分の計数値)、となる、この場合には、比較器7で
これを判定し、セレクタ6と9を元の入力I側に戻して
、信号Aの位相を元に戻し、カウント結果値の算出を行
う。
On the other hand, as a result of the comparison by the comparator 7, even if the output value from the adder 3 is close to the comparison setting value, if it is the true count value during normal operation, the phase of the signal A is changed to the delay element 5. As a result of the delay, the total value output from adder 3 is (total value of addition a3 before shifting) - (count value for delay phase difference). In this case, comparator 7 This is determined, the selectors 6 and 9 are returned to the original input I side, the phase of the signal A is returned to the original, and the count result value is calculated.

この第8図の実施例回路では信号AとBの位相接近時に
、信号A側の位相を遅延させるようにしたが、勿論、信
号Aの代わりに信号Bの位相を遅延させるものであって
もよい。この場合、信号Bを遅延させた結果、加算器3
から遅延位相り分の計数値が出力されたならば、第7図
の位相状態にあると判断し、(位相シフト前の加算器3
の出力値)+(シフトした位相分の計数値)、である場
合には正常動作していると判断する。
In the embodiment circuit of FIG. 8, the phase of the signal A side is delayed when the phases of the signals A and B approach, but of course, the phase of the signal B may be delayed instead of the signal A. good. In this case, as a result of delaying signal B, adder 3
If the count value corresponding to the delayed phase difference is output from , it is determined that the phase state shown in FIG.
(output value) + (count value for the shifted phase), it is determined that normal operation is occurring.

本発明の更に他の実施例が第9図に示される。Yet another embodiment of the invention is shown in FIG.

この実施例回路は、前述の第8図の実施例回路が、信号
AとBの位相接近の判定をハードウェア回路により行っ
ていたのに対して、マイクロブロセッ−5(あるいはデ
ィジタル信号プロセッサなど)10を用いてソフトウェ
ア処理により行うようにしたものである。この実施例で
は加算器3からの合計値がマイクロプロセッサ10に入
力され、このマイクロプロセッサ10において、信号A
とBの位相の適否の判定、加算器3の合計値への補正値
Cの加算処理、セレクタ6の切換え指令等の処理をソフ
トウェア的に行っている。
This embodiment circuit uses a hardware circuit to determine whether the phases of signals A and B approach each other in the embodiment circuit shown in FIG. ) 10 by software processing. In this embodiment, the sum value from adder 3 is input to microprocessor 10, where signal A
Processing such as determining the appropriateness of the phases of and B, adding the correction value C to the total value of the adder 3, and issuing a switching command to the selector 6 are performed by software.

以上に述べた実施例回路はいずれもN分周器からのN系
統の分周クロックをそれぞれ別々のカウンタで計数する
ものであるが、この場合、N個のカウンタを必要とし、
またこれらカウンタのカウント値を合計する加算器が必
要となり、このためNの数が多くなってくると、ハード
ウェア規模が非常に大きくなってしまう。
In all of the embodiment circuits described above, N systems of divided clocks from an N frequency divider are counted by separate counters, but in this case, N counters are required.
Further, an adder is required to add up the count values of these counters, and therefore, as the number of N increases, the hardware scale becomes extremely large.

かかる問題点を解決する本発明の更に他の実施例が第1
0図に示される。第10図において、分周器1からの4
系統の分周クロックCLKI−CLK4のうち、分周ク
ロックCLK 4をカウンタ11と12の縦段接続回路
に導き、残りの分周クロックCLK 1〜CLK3をそ
れぞれ2分周器13(1)〜13■に導いている。
Still another embodiment of the present invention that solves such problems is the first embodiment.
As shown in Figure 0. In FIG. 10, divider 1 to 4
Among the frequency-divided clocks CLKI-CLK4 of the system, the frequency-divided clock CLK 4 is guided to the vertically connected circuit of counters 11 and 12, and the remaining frequency-divided clocks CLK 1 to CLK3 are fed to two-frequency dividers 13 (1) to 13, respectively. ■It leads to.

これらカウンタ11と12.2分周器13(1)〜13
■の出力はランチ回路14を介して出力され、2分周器
13(1)〜13■の分周信号(1)〜■とカウンタ1
1のカウント値の最下位ピントLSB (これは分周ク
ロックCLK4の2分周器号■に等しい)とは排他的論
理和回路15■に導かれて、この排他的論理和回路15
■の出力信号はカウント結果値の第1ビツト(最下位ピ
ントLSB)とされる。また2分周器13■とカウンタ
11の最下位ビン!−LSBとは排他的論理和回路15
■に導かれて、この排他的論理和回路15■の出力信号
はカウント結果値の第2ビツトとされる。またカウンタ
11と12のカウント値はカウント結果値の第3ビツト
〜第8ピントとされる。
These counters 11 and 12.2 frequency dividers 13(1) to 13
The output of (1) is outputted via the launch circuit 14, and the divided signals (1) to (2) of the frequency dividers 13 (1) to 13 (2) and the counter 1
The lowest pin LSB of the count value of 1 (this is equal to the 2 frequency divider number ■ of the frequency divided clock CLK4) is guided to the exclusive OR circuit 15■.
The output signal (2) is the first bit (lowest pinpoint LSB) of the count result value. Also, the lowest bin of the 2 frequency divider 13■ and the counter 11! -LSB means exclusive OR circuit 15
As a result of (2), the output signal of the exclusive OR circuit 15 (2) is taken as the second bit of the count result value. Further, the count values of the counters 11 and 12 are set to the third to eighth bits of the count result value.

排他的論理和回路15■、15■のタフブの選択方法を
一般的に述べると、高速クロックHCLKを分周する数
Nを、iを冪指数とする幕乗値N=2 となるように選
べば、ディジタルカウンタのカウント出力値の第にビッ
ト目を得るための排他的論理和回路15■は、 2  XS”     (但L、S −1〜S’−” 
)の番号の分周信号を入力として選択することになる。
Generally speaking, how to select the toughness of the exclusive OR circuits 15■ and 15■ is to select the number N by which the high-speed clock HCLK is divided so that the number N by which the high-speed clock HCLK is divided is set to a value N = 2, where i is the exponent. For example, the exclusive OR circuit 15■ for obtaining the 1st bit of the count output value of the digital counter is 2XS" (L, S-1 to S'-"
) is selected as the input.

ここで、k>iとなるピントは、2′  列目の出力を
用いればよい。
Here, for focusing where k>i, the output of the 2' column may be used.

例えば、上述の第10図の場合には、排他的論理和回路
15■は分周信号(1)〜■の排他的論理和をとり、排
他的論理和回路15■は分周信号■、■の排他的論理和
をとっている。
For example, in the case of FIG. 10 described above, the exclusive OR circuit 15■ takes the exclusive OR of the frequency divided signals (1) to ■, and the exclusive OR circuit 15■ calculates the exclusive OR of the frequency divided signals (1) to ■. The exclusive OR of is taken.

この実施例回路の各部信号のタイムチャートが第11図
に示される。ここで、ゲート信号によりクロックCLK
 1からカウントが始まるようにタイミングが取られて
いる。
A time chart of signals of each part of this embodiment circuit is shown in FIG. Here, the clock CLK is set by the gate signal.
The timing is set so that the count starts from 1.

この第11図からも分かるように、カウンタ11と12
で生成した、カウント結果値の第3ビツト目より下位の
ビットとしては、排他的論理和15■で分周信号■と■
の排他的論理和をとることで第2ビツト目を、排他的論
理和回路15■で分周信号(1)〜■の排他的論理和を
とることで第1ビツト目(LSB)を得ることができる
As can be seen from FIG. 11, counters 11 and 12
As the bits lower than the third bit of the count result value generated by
The second bit (LSB) is obtained by taking the exclusive OR of the frequency-divided signals (1) to (■) using the exclusive OR circuit 15■. I can do it.

このように、Nを幕乗値N=21 となるように選び、
カウント出力値における冪指数iより上位のビットを分
周信号の一つをカウントするカウンタの出力から得、冪
指数i以下のビットを分周信号の排他的論理和から得る
ことができ、これによりカウンタの数および加算器を削
減して、ハードウェア規模の小型化と小消費電力化を図
ることができる。
In this way, choose N so that the makku multiplication value N=21,
The bits higher than the power exponent i in the count output value can be obtained from the output of a counter that counts one of the frequency-divided signals, and the bits below the power index i can be obtained from the exclusive OR of the frequency-divided signals. By reducing the number of counters and adders, the hardware scale and power consumption can be reduced.

この第10図の実施例はN−22の場合のものであるが
、冪指数iを1とした場合(N=21=2)の実施例回
路が第12図に、また冪指数iを3とした場合(N=2
3=8)の実施例回路が第13図にそれぞれ示される。
The embodiment shown in FIG. 10 is for the case of N-22, but the embodiment circuit in the case where the power index i is 1 (N=21=2) is shown in FIG. If (N=2
3=8) are shown in FIG. 13, respectively.

図示の如く、前者の場合には、カウント結果値の第1ビ
ン) (LSB)を出力する排他的論理和15■の入力
としては、分周器13■の出力信号とカンウタ11のL
SBが選ばれる。
As shown in the figure, in the former case, the output signal of the frequency divider 13 and the L of the counter 11 are input to the exclusive OR 15, which outputs the first bin (LSB) of the count result value.
SB is selected.

また後者の場合には、カウント結果値の第1ビツトを出
力する排他的論理和回路15■の入力としては、分周器
13(1)〜13■の出力信号とカウンタ11のLSB
が選ばれ、第2ピントを出力する排他的論理和回路15
■の入力としては、分周器13■、13■、13■の出
力信号とカウンタ11のLSBが選ばれ、第3ビツトを
出力する排他的論理和回路15■の入力としては、分周
器13■とカンウタ11のLSBが選ばれる。
In the latter case, the output signals of the frequency dividers 13 (1) to 13 (1) and the LSB of the counter 11 are input to the exclusive OR circuit 15 (15) which outputs the first bit of the count result value.
is selected and the exclusive OR circuit 15 outputs the second pinpoint.
The output signals of the frequency dividers 13■, 13■, 13■ and the LSB of the counter 11 are selected as the inputs of the frequency divider 13■, and the LSB of the counter 11 is selected as the input of the The LSB of 13■ and Kanuta 11 is selected.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、高速クロックに
対しても誤動作することなく計数を行える高速ディジタ
ルカウンタを実現できる。
As described above, according to the present invention, it is possible to realize a high-speed digital counter that can count without malfunctioning even with a high-speed clock.

また第8図または第9図に示すような構成とすることで
、信号AとBの位相差を測る場合に信号AとBの接近に
対しても誤動作を防止できる。
Furthermore, by adopting the configuration as shown in FIG. 8 or 9, when measuring the phase difference between signals A and B, malfunctions can be prevented even when signals A and B approach each other.

また第10図1、第12図または第13図に示されるよ
うに構成とすることで、ハードウェア規模の削減して、
装置の小型化と小消費電力化を図ることができる。
In addition, by configuring the configuration as shown in FIG. 10, FIG. 12, or FIG. 13, the hardware scale can be reduced.
The device can be made smaller and consume less power.

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

第1図、第2図、第3図はそれぞれ本発明に係る原理説
明図、 第4図は本発明の一実施例としての高速ディジタルカウ
ンタを示すブロック図、 第5図は第4図実施例回路の各部信号のタイムチャート
、 第6図は本発明の他の実施例を示すブロック図、第7図
は第6図実施例回路の問題点を説明するための各部信号
のタイムチャート、 第8図は第6図実施例回路を改良した本発明の更に他の
実施例を示すブロック図、 第9図は第8図実施例回路と同等の機能を持つ本発明の
更に他の実施例を示すブロック図、第10図はハードウ
ェア規模の削減を図った本発明の更に他の実施例を示す
ブロック図、第11図は第10図実施例回路の各部信号
のタイムチャート、 第12図、および、第13図はそれぞれハードウェア規
模の削減を図った本発明のまた更に他の実施例を示すブ
ロック図である。 図において、 1−分周器 2(1)〜2■、11.12−・−カウンタ3.8−・
−加算器 4.4(1)〜4■−JKフリフプフロンブ5−遅延素
子 6.9・・・セレクタ 7・−比較器 10−マイクロプロセッサ 13(1)〜13■・−2分周器 14−ラッチ回路
1, 2, and 3 are diagrams each explaining the principle of the present invention, FIG. 4 is a block diagram showing a high-speed digital counter as an embodiment of the present invention, and FIG. 5 is the embodiment shown in FIG. 6 is a block diagram showing another embodiment of the present invention; FIG. 7 is a time chart of signals of each part for explaining the problems of the circuit of the embodiment shown in FIG. 8; The figure is a block diagram showing still another embodiment of the present invention that is an improvement on the circuit of the embodiment shown in FIG. 6, and FIG. 9 shows still another embodiment of the present invention having the same function as the circuit of the embodiment shown in FIG. 8. 10 is a block diagram showing still another embodiment of the present invention that aims to reduce the hardware scale; FIG. 11 is a time chart of signals of each part of the circuit of the embodiment shown in FIG. 10; , and FIG. 13 are block diagrams showing still other embodiments of the present invention, each of which aims to reduce the hardware scale. In the figure, 1-frequency divider 2(1) to 2■, 11.12--counter 3.8--
- Adder 4.4 (1) ~ 4 ■ - JK flip-flop 5 - Delay element 6.9... Selector 7 - Comparator 10 - Microprocessor 13 (1) ~ 13 ■ -2 Frequency divider 14 - latch circuit

Claims (1)

【特許請求の範囲】 1、入力クロックをN分周して1クロックずつ位相のず
れたN系列の分周信号を出力する分周器〔31〕と、 該分周器〔31〕のN系列の分周信号をそれぞれカウン
トするN個のカウンタ〔32(1)〜32(n)〕と、 該N個のカウンタ〔32(1)〜32(n)〕のカウン
ト値を合計する加算器〔33〕とを具備してなる高速デ
ィジタルカウンタ。 2、二つの信号〔A、B〕の位相差を入力クロックで測
定する高速ディジタルカウンタであって、該入力クロッ
クをN分周して1クロックずつ位相のずれたN系列の分
周信号を出力する分周器〔31〕と、 該分周器〔31〕のN系列の分周信号をそれぞれカウン
トするN個のカウンタ〔32(1)〜32(n)〕と、 該二つの信号の位相差の期間にわたり該N個のカウンタ
〔32(1)〜32(n)〕をイネーブル状態にするゲ
ート信号を発生するゲート発生回路〔34〕と、 該N個のカウンタ〔32(1)〜32(n)〕のカウン
ト値を合計する加算器〔33〕と、 該二つの信号〔A、B〕の相対位相をシフトする位相シ
フト回路〔35〕と、 該加算器〔33〕の合計値を所定の設定値と比較し、該
合計値がこの設定値付近となった時に該位相シフト回路
〔35〕で該二つの信号の少なくとも一方の位相をシフ
トするよう制御する比較回路〔36〕と、 該位相シフト回路〔35〕でシフトした位相分だけ該加
算器〔33〕からの合計値に補正を加える補正回路〔3
7〕とを具備してなる高速ディジタルカウンタ。 3、入力クロックをN(Nは整数であって1を冪指数と
する2の冪乗値)分周して1クロックずつ位相がずれた
N系列の分周信号を出力する分周器〔30〕と、 該分周器〔30〕の分周信号の一系列をカウントしてカ
ウント結果値における該冪指数1よりも上位のビットを
生成するカウンタ〔38〕と、該分周器〔30〕のN系
列の分周信号の排他的論理和によりカウント出力値にお
ける該冪指数以下のビットを生成する排他的論理和回路
〔39〕とを具備してなる高速ディジタルカウンタ。
[Claims] 1. A frequency divider [31] that divides an input clock by N and outputs N series of divided signals whose phase is shifted by one clock, and N series of the frequency divider [31]. N counters [32(1) to 32(n)] that respectively count the frequency-divided signals of 33] A high-speed digital counter comprising: 2. A high-speed digital counter that measures the phase difference between two signals [A, B] using an input clock, which divides the input clock by N and outputs N series of divided signals whose phase is shifted by one clock. N counters [32(1) to 32(n)] that count the N series of divided signals of the frequency divider [31], respectively, and the positions of the two signals. a gate generation circuit [34] that generates a gate signal that enables the N counters [32(1) to 32(n)] over a period of phase difference; and the N counters [32(1) to 32]. (n)], a phase shift circuit [35] that shifts the relative phase of the two signals [A, B], and a total value of the adder [33]. a comparison circuit [36] that compares the total value with a predetermined set value and controls the phase shift circuit [35] to shift the phase of at least one of the two signals when the total value is close to the set value; a correction circuit [3] that corrects the total value from the adder [33] by the phase shifted by the phase shift circuit [35];
7] A high-speed digital counter comprising: 3. Frequency divider that divides the input clock by N (N is an integer and is a power of 2 with 1 as the exponent) and outputs N series of frequency divided signals whose phase is shifted by 1 clock [30 ]; a counter [38] that counts one series of the frequency-divided signals of the frequency divider [30] and generates bits higher than the power exponent 1 in the count result value; and the frequency divider [30]. A high-speed digital counter comprising an exclusive OR circuit [39] that generates bits less than or equal to the exponent in the count output value by exclusive OR of N series of frequency-divided signals.
JP6593590A 1990-03-16 1990-03-16 High speed digital counter Pending JPH03267820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6593590A JPH03267820A (en) 1990-03-16 1990-03-16 High speed digital counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6593590A JPH03267820A (en) 1990-03-16 1990-03-16 High speed digital counter

Publications (1)

Publication Number Publication Date
JPH03267820A true JPH03267820A (en) 1991-11-28

Family

ID=13301316

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6593590A Pending JPH03267820A (en) 1990-03-16 1990-03-16 High speed digital counter

Country Status (1)

Country Link
JP (1) JPH03267820A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010087544A (en) * 2008-09-29 2010-04-15 Fujitsu Microelectronics Ltd Solid-state imaging element
JP2014099238A (en) * 2014-01-08 2014-05-29 Ps4 Luxco S A R L Semiconductor device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010087544A (en) * 2008-09-29 2010-04-15 Fujitsu Microelectronics Ltd Solid-state imaging element
JP2014099238A (en) * 2014-01-08 2014-05-29 Ps4 Luxco S A R L Semiconductor device

Similar Documents

Publication Publication Date Title
KR940007543B1 (en) High speed programmable divider
US4030045A (en) Digital double differential phase-locked loop
US5060243A (en) Ripple counter with reverse-propagated zero detection
US7952391B2 (en) Digital noise filter
US5459855A (en) Frequency ratio detector for determining fixed frequency ratios in a computer system
US20020075989A1 (en) High-speed counter with sequential binary count order and method thereof
US3548328A (en) Digital fm discriminator
JPH0664099B2 (en) Digital phase meter circuit
US5815423A (en) Parallel processing division circuit
CA1267731A (en) Serial digital signal processing circuitry
KR19990078113A (en) Data transmission device
US5488325A (en) Timing generator intended for semiconductor testing apparatus
US6316982B1 (en) Digital clock with controllable phase skew
US5969553A (en) Digital delay circuit and digital PLL circuit with first and second delay units
CN114967411B (en) Multi-stage time-to-digital converter with automatic reset mechanism
JPH03267820A (en) High speed digital counter
US4759042A (en) Parallel-to-serial converter
US5937024A (en) Counter for counting high frequency
US6072849A (en) Shift counter device
JP2570933B2 (en) Synchronous clock generator
JP4518377B2 (en) DLL circuit
JP2563366B2 (en) Signal cycle measuring device
JP2923175B2 (en) Clock generation circuit
US5990813A (en) Method and apparatus for synchronizing external data to an internal timing signal
JP3501923B2 (en) Timing generator for semiconductor test equipment