JP2011151672A - Frequency division device and control circuit - Google Patents
Frequency division device and control circuit Download PDFInfo
- Publication number
- JP2011151672A JP2011151672A JP2010012317A JP2010012317A JP2011151672A JP 2011151672 A JP2011151672 A JP 2011151672A JP 2010012317 A JP2010012317 A JP 2010012317A JP 2010012317 A JP2010012317 A JP 2010012317A JP 2011151672 A JP2011151672 A JP 2011151672A
- Authority
- JP
- Japan
- Prior art keywords
- pulse
- frequency
- circuit
- variable
- count value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Manipulation Of Pulses (AREA)
Abstract
Description
本発明は、入力パルス列を分周する分周装置に関するものである。更に、本発明は、その分周装置を搭載した制御回路に関するものである。 The present invention relates to a frequency divider that divides an input pulse train. Furthermore, the present invention relates to a control circuit equipped with the frequency dividing device.
ハードウェアで構成された、一般的な分周装置は、入力パルスをn分周する場合には、たとえば、n進カウンタを使用する(たとえば、特許文献1,2)。
A general frequency dividing device configured by hardware uses, for example, an n-ary counter when dividing an input pulse by n (for example,
特許文献1,2が開示する分周装置によれば、入力パルス列の周期が一定の場合には、分周後のパルス列のジッタを抑制することができる。
しかしながら、たとえば、サーボモータのように、その回転数を不規則な周期で制御する場合には、分周すべき入力パルス列の周期も不規則に変化する。
According to the frequency dividing device disclosed in
However, for example, when the rotation speed is controlled with an irregular cycle like a servo motor, the cycle of the input pulse train to be divided also varies irregularly.
したがって、特許文献1,2が開示する分周装置では、入力パルス列の周期が不規則に変化すると、同期型のカウンタでは、その周期に合せてパルスを出力することが困難となる。
Therefore, in the frequency dividing devices disclosed in
そこで、周期が変化する入力パルス列を分周し、分周したパルス列のジッタをできるだけ抑制することができる分周装置が望まれている。更に、そのような分周装置を搭載した制御回路を用いて、制御対象を精度よく制御することが望まれている。 Therefore, there is a demand for a frequency dividing device that can divide the input pulse train whose period changes and suppress the jitter of the divided pulse train as much as possible. Furthermore, it is desired to control a controlled object with high accuracy using a control circuit equipped with such a frequency dividing device.
本発明は、周期が変化する入力パルス列を分周し、分周したパルス列のジッタをできるだけ抑制することができる分周装置を提供することにある。
更に、本発明は、そのような分周装置を搭載した制御回路を用いて、制御対象を精度よく制御することにある。
An object of the present invention is to provide a frequency dividing device that can divide an input pulse train whose period changes and suppress jitter of the divided pulse train as much as possible.
Furthermore, the present invention is to accurately control a control target using a control circuit equipped with such a frequency dividing device.
本発明の分周装置は、第1変数および第2変数が互いに異なる正の整数をとり、前記第1変数に対する前記第2変数の比で表わされる分周比で入力パルスを分周可能な分周装置であって、前記入力パルスの周期にわたって、一定の周波数を持つ基準クロックをカウントするカウンタ回路と、前記カウンタ回路によって得られた第1カウント値を前記第1変数が示す値に分割する演算を行うと共に、前記基準クロックのカウントを開始し、当該カウントによる第2カウント値が前記第1カウント値を分割した値に達する度に、一のパルスを出力する演算出力回路と、前記演算出力回路の出力パルス列を前記第2変数が示す値で分周したパルスを出力する分周回路と、を有する。 In the frequency dividing device according to the present invention, the first variable and the second variable take different positive integers, and the input pulse can be divided by a frequency dividing ratio represented by the ratio of the second variable to the first variable. A counter circuit for counting a reference clock having a constant frequency over the period of the input pulse, and an operation for dividing a first count value obtained by the counter circuit into a value indicated by the first variable An arithmetic output circuit that starts counting the reference clock and outputs one pulse each time a second count value based on the count reaches a value obtained by dividing the first count value; and the arithmetic output circuit And a frequency dividing circuit for outputting a pulse obtained by dividing the output pulse train by a value indicated by the second variable.
本発明の制御回路は、第1変数および第2変数が互いに異なる正の整数をとり、前記第1変数に対する前記第2変数の比で表わされる分周比で入力パルスを分周可能な分周装置を有し、前記分周装置の出力を用いる制御回路であって、前記分周装置は、前記入力パルスの周期にわたって、一定の周波数を持つ基準クロックをカウントするカウンタ回路と、前記カウンタ回路によって得られた第1カウント値を前記第1変数が示す値に分割する演算を行うと共に、前記基準クロックのカウントを開始し、当該カウントによる第2カウント値が前記第1カウント値を分割した値に達する度に、一のパルスを出力する演算出力回路と、前記演算出力回路の出力パルス列を前記第2変数が示す値で分周したパルスを出力する分周回路と、を有する。 In the control circuit of the present invention, the first variable and the second variable take different positive integers, and the frequency division that can divide the input pulse by the division ratio represented by the ratio of the second variable to the first variable is possible. A control circuit using an output of the frequency divider, wherein the frequency divider includes a counter circuit that counts a reference clock having a constant frequency over the period of the input pulse, and the counter circuit. An operation is performed to divide the obtained first count value into a value indicated by the first variable, and the counting of the reference clock is started, and the second count value by the count becomes a value obtained by dividing the first count value. An arithmetic output circuit that outputs one pulse each time it reaches, and a frequency dividing circuit that outputs a pulse obtained by dividing the output pulse train of the arithmetic output circuit by a value indicated by the second variable.
本発明によれば、周期が変化する入力パルス列を分周し、分周したパルス列のジッタをできるだけ抑制することができる分周装置を提供することができる。
更に、本発明は、そのような分周装置を搭載した制御回路を用いて、制御対象を精度よく制御することができる。
ADVANTAGE OF THE INVENTION According to this invention, the frequency dividing apparatus which can divide the input pulse train from which a period changes, and can suppress the jitter of the divided pulse train as much as possible can be provided.
Furthermore, according to the present invention, a control object can be controlled with high accuracy using a control circuit equipped with such a frequency dividing device.
以下、本発明の実施形態を図面に関連付けて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[第1実施形態]
図1は、本発明の第1実施形態に係る分周装置の構成例を示すブロック図である。
図1に図示する分周装置1は、基準クロック発生回路11、パルス周期計測回路12、演算回路13、パルス出力回路14、分周回路15、第1指示回路16、および、第2指示回路17を有する。
[First Embodiment]
FIG. 1 is a block diagram illustrating a configuration example of a frequency divider according to the first embodiment of the present invention.
A frequency dividing
ここで、本実施形態の構成要素と本発明の構成要素との対応関係を説明する。
本発明に係るカウンタ回路および計測回路は、パルス周期計測回路12に対応する。
本発明に係る演算出力回路は、演算回路13およびパルス出力回路14に対応する。
本発明に係るクロック発生回路は、基準クロック発生回路11に対応する。
本発明に係る第1変数は、変数nに対応する。本発明に係る第2変数は、変数mに対応する。
本発明に係る第1カウント値は、カウント値CNTに対応する。本発明に係る第2カウント値は、カウント値DCNTに対応する。本発明に係る第3カウント値は、分周回路15のカウント値に対応する。
Here, the correspondence between the components of the present embodiment and the components of the present invention will be described.
The counter circuit and the measurement circuit according to the present invention correspond to the pulse
The arithmetic output circuit according to the present invention corresponds to the
The clock generation circuit according to the present invention corresponds to the reference
The first variable according to the present invention corresponds to the variable n. The second variable according to the present invention corresponds to the variable m.
The first count value according to the present invention corresponds to the count value CNT. The second count value according to the present invention corresponds to the count value DCNT. The third count value according to the present invention corresponds to the count value of the
分周装置1は、入力パルス列CLKを、分周比R=m/nで分周する機能を有する。
なお、変数mおよび変数nは、互いに異なる正の整数である。パルス列を分周比R=m/nで分周することを、単に「m/n分周」とも言う。パルス列を変数m、nで分周することを、単に「m分周、n分周」とも言う。
The frequency dividing
Note that the variable m and the variable n are different positive integers. Dividing the pulse train at a division ratio R = m / n is also simply referred to as “m / n division”. Dividing the pulse train by the variables m and n is also simply referred to as “m division, n division”.
本実施形態では、分周装置1は、減算器、除算器、カウンタ、フリップフロップ等を用いたハードウェアによって構成され、各構成要素が持つ機能は、たとえば、HDL(Hardware Description Language;ハードウェア記述言語)を用いて設計される。
In the present embodiment, the frequency dividing
初めに、分周装置1の動作の概要を、図2(A)〜(E)に関連づけて説明する。
図2(A)〜(E)は、本発明の第1実施形態に係る分周装置の動作の概要を説明するためのタイミングチャートである。図2(A)〜(E)は、1周期Tの入力パルス(列)CLK、基準クロックBCLK、(ダウンカウントの)カウント値DCNT、パルス列CLK(1/n)、パルス列CLK(m/n)を各々示す。
なお、図2(A)に図示する入力パルスCLKは、デューティー比が50%である。図2(D)に図示するパルス列CLK(1/n)は、入力パルスCLKをn分周したものである。図2(E)に図示するパルス列CLK(m/n)は、n分周したパルス列CLK(1/n)を更にm分周したものである。
実際には、パルス列CLK(1/n)およびパルス列CLK(m/n)は、時分割で求められるが、説明を明確にするため、各図には、各パルス列が同一の時系列で図示されている。
First, an outline of the operation of the frequency dividing
2A to 2E are timing charts for explaining the outline of the operation of the frequency divider according to the first embodiment of the present invention. 2A to 2E show an input pulse (sequence) CLK of one period T, a reference clock BCLK, a count value DCNT (down count), a pulse sequence CLK (1 / n), and a pulse sequence CLK (m / n). Are shown respectively.
Note that the input pulse CLK illustrated in FIG. 2A has a duty ratio of 50%. A pulse train CLK (1 / n) illustrated in FIG. 2D is obtained by dividing the input pulse CLK by n. The pulse train CLK (m / n) illustrated in FIG. 2E is obtained by further dividing the pulse train CLK (1 / n) divided by n by m.
Actually, the pulse train CLK (1 / n) and the pulse train CLK (m / n) are obtained by time division. However, for the sake of clarity, the respective pulse trains are illustrated in the same time series in each figure. ing.
以下、分周装置1が、1周期分のパルスCLKを分周比R=m/n=16/3で分周する場合を例に挙げて説明する。一例として、入力パルス列CLKの周波数F1がF1=1MHzであるものとし、分周装置1には、100μs当たり、100個のパルスCLKが入力されるものと仮定する。
Hereinafter, the case where the frequency dividing
基本的に、パルスCLKをm/n分周する場合には、パルスCLKをn分周し、これを更にm分周すればよい。
しかしながら、たとえば、分周比RがR=16/3≒5.33…のような循環小数の場合には、分周比RがR=3/2=1.5のような場合に比べて、分周後のパルス列にジッタが発生しやすい。
そこで、分周装置1は、次のように、入力パルスCLKを16/3分周する。
Basically, when the pulse CLK is divided by m / n, the pulse CLK may be divided by n and further divided by m.
However, for example, when the frequency division ratio R is a decimal number such as R = 16 / 3≈5.33..., Compared with the case where the frequency division ratio R is R = 3/2 = 1.5. Jitter is likely to occur in the pulse train after frequency division.
Therefore, the
(1)入力パルスCLKのn分周
先ず、分周装置1が、図2(A)に図示する入力パルスCLKを、n=3分周し、図2(D)に図示するパルス列CLK(1/n)を求める過程を説明する。
(1) Dividing the input pulse CLK by n First, the
分周装置1は、入力パルス列CLKの周波数F1よりも高い周波数F2を持つ基準クロックBCLKが、入力パルス列CLKの1周期Tにわたって、何個あるかをカウントする。
図2(B)に図示する基準クロックBCLKは、分周装置1が発生させているものであり、その周波数F2は、たとえば、F2=80MHzであるものと仮定する。分周装置1には、100μs当たり、100個のパルス列CLKが入力されるものと仮定しているため、下記の(1)式により、周期T当たり、80個(=k)の基準クロックBCLKが存在することになる。この場合、基準クロックBCLKをカウントしたときのカウント値CNTは、CNT=80となる。
The
It is assumed that the reference clock BCLK shown in FIG. 2B is generated by the
(数1)
CNT=(1/1MHz)/(1/80MHz)
=(100μs/100(個))/(1/80MHz)
=80(個) …(1)
(Equation 1)
CNT = (1 / 1MHz) / (1 / 80MHz)
= (100 μs / 100 (pieces)) / (1/80 MHz)
= 80 (pieces) (1)
次に、分周装置1は、基準クロックBCLKを用いて、入力パルスCLKを3分周する。その際に、分周装置1は、カウント値CNT=80を分周比R=n=3で除算する。これは、k=80個の基準クロックBCLKを3つに分割することを表わす。
カウント値CNT=80を分周比R=n=3で除算すると、除算結果は、80/3=26.6…となる。この除算は、たとえば、カウンタを用いて行われるが、これは、小数部分「0.6…」を求めることはできず、整数部分「26」しか求めることができない。
そのため、k=80個の基準クロックBCLKを単純にn=3つに分割しようとすると、それが26個×3に分割され、2個の基準クロックBCLKが余る。その余りを起因として、分周後のパルスにジッタが発生する。
Next, the
When the count value CNT = 80 is divided by the frequency division ratio R = n = 3, the division result is 80/3 = 26.6. This division is performed by using, for example, a counter, but this cannot obtain the decimal part “0.6...” But can obtain only the integer part “26”.
Therefore, if k = 80 reference clocks BCLK are simply divided into n = 3, they are divided into 26 × 3, leaving two reference clocks BCLK. Due to the remainder, jitter occurs in the divided pulse.
そこで、分周装置1は、その余りを無くすように、k=80個の基準クロックBCLKを、個数k1=26、k2=27、k3=27の3つに分割する。
詳細には、分周装置1は、カウント値CNT=80を分周比R=n=3で除算し、除算結果の26.6…を得る。そして、分周装置1は、カウント値CNT=80から除算結果の整数部分の値「26」を減算し、80−26=54を得る。この減算結果は、残りの基準クロックBCLKの個数を示している。
Therefore, the
Specifically, the
次に、分周装置1は、先の減算結果を、残りの分割すべき数2で除算し、54/2=27を得る。すなわち、54個の基準クロックBCLKは、27個の基準クロックBCLK2つに分割される。
Next, the
ところで、分周装置1は、カウント値CNT=80を取得すると、図2(C)に図示するように、その値をカウント開始の初期値として、ダウンカウントする。
先ず、分周装置1は、ダウンカウントの値を示すカウント値DCNTが、80−26=54(=D1)に達したとき、図2(D)に図示するように、周期T1を持つパルスを出力する。このカウント値DCNT=54は、k1=26個の基準クロックBCLKをカウントしたことを意味する。
次に、分周装置1は、カウント値DCNTが、DCNT=54−27=27(=D2)に達したとき、図2(D)に図示するように、周期T2を持つパルスを出力する。このカウント値DCNT=27は、k2=27個の基準クロックBCLKをカウントしたことを意味する。
最後に、分周装置1は、カウント値DCNTが、DCNT=27−27=0(=D3)に達したとき、図2(D)に図示するように、周期T3(=T2)を持つパルスを出力する。このカウント値DCNT=0は、k3=27個の基準クロックBCLKをカウントしたことを意味する。
By the way, when the
First, when the count value DCNT indicating the down-count value reaches 80−26 = 54 (= D 1 ), the
Next, when the count value DCNT reaches DCNT = 54−27 = 27 (= D 2 ), the
Finally, when the count value DCNT reaches DCNT = 27−27 = 0 (= D 3 ), the
このように、カウント値DCNTがD1=54、D2=27、D3=0に達したときに、分周装置1がパルスを出力することで、図2(D)に図示する、n=3分周されたパルス列CLK(1/n)を生成することができる。
なお、図2(D)に図示する周期T1は、入力パルスの周期T、カウント値CNT、基準クロックBCLKの個数K1を用いて、T/CNT×K1=100μs/80×26=325nsと求まる。同様の演算により、周期T2、T3は、入力パルスの周期T、カウント値CNT、基準クロックBCLKの個数K2,K3を各々用いて、337.5nsと求まる。
In this way, when the count value DCNT reaches D 1 = 54, D 2 = 27, and D 3 = 0, the
The period T1 illustrated in FIG. 2D is obtained as T / CNT × K1 = 100 μs / 80 × 26 = 325 ns using the period T of the input pulse, the count value CNT, and the number K1 of the reference clocks BCLK. By the same calculation, the periods T2 and T3 are found to be 337.5 ns using the period T of the input pulse, the count value CNT, and the numbers K2 and K3 of the reference clock BCLK, respectively.
(2)パルス列CLK(1/n)のm分周
パルス列CLK(1/n)の生成後、分周装置1は、パルス列CLK(1/n)をm=16分周することで、図2(E)に図示する、分周比R=m/nで分周したパルス列CLK(m/n)を発生させる。
(2) m-division of the pulse train CLK (1 / n) After the generation of the pulse train CLK (1 / n), the
ところで、分周装置1が、k=80個の基準クロックBCLKを、個数k1=26、k2=27、k3=27に分割したため、生成されたパルス列CLK(1/n)のデューティー比は、50%とは限らない。
図2(D)に図示するパルス列CLK(1/n)において、周期T1を持つパルスは、デューティー比が50%であるが、周期T2、T3を持つパルスは、デューティー比が50%ではない。
これは、周期T1を持つパルスは、K1=26個の基準クロックBCLKを用いて発生させたため、それを均等、すなわち、13個の基準クロックBCLKと、13個の基準クロックBCLKとに分けることができるためである。そのため、オン(Hレベル)/オフ(Lレベル)の期間が互いに等しい。
Incidentally, since the
In the pulse train CLK (1 / n) illustrated in FIG. 2D, a pulse having a period T1 has a duty ratio of 50%, but a pulse having periods T2 and T3 does not have a duty ratio of 50%.
This is because a pulse having a period T1 is generated using K1 = 26 reference clocks BCLK, and therefore, it can be divided equally into 13 reference clocks BCLK and 13 reference clocks BCLK. This is because it can. For this reason, the on (H level) / off (L level) period is equal to each other.
しかしながら、周期T2、T3を持つパルスは、K2=k3=27個の基準クロックBCLKを用いて発生させたため、それを均等に分けることができず、オン/オフの期間が互いに異なる。 However, since the pulses having the periods T2 and T3 are generated using K2 = k3 = 27 reference clocks BCLK, they cannot be equally divided, and the on / off periods are different from each other.
このように、分周装置1は、デューティー比を調整しながら、入力パルス列CLKをn=3分周するが、ジッタの発生を極力抑制することができればよいため、周期T1、T2、T3を各々持つパルス列CLK(1/n)のデューティー比は、必ずしも50%でなくてもよい。
たとえば、周期T2、T3を持つパルス列CLK(1/n)のデューティー比が更に小さくなるように、それらのパルスについて、オンの期間に12個の基準クロックBCLKを、オフの期間に15個の基準クロックBCLKを割り当てることも可能である。たとえば、k=80個の基準クロックBCLKを、k1=25、k2=26、k3=29個のように、3分割することも可能ではある。
As described above, the
For example, in order to further reduce the duty ratio of the pulse train CLK (1 / n) having the periods T2 and T3, 12 reference clocks BCLK in the ON period and 15 reference clocks in the OFF period are set for those pulses. It is also possible to assign the clock BCLK. For example, k = 80 reference clocks BCLK can be divided into three, such as k1 = 25, k2 = 26, k3 = 29.
しかしながら、入力パルス列CLKのデューティー比が50%であれば、k=80個の基準クロックBCLKを、k1=27、k2=27、k3=26個のように、できるだけ均等に3分割し、周期T1、T2、T3を各々持つパルス列CLK(1/n)のデューティー比をできるだけ50%にすることが望ましい。 However, if the duty ratio of the input pulse train CLK is 50%, k = 80 reference clocks BCLK are equally divided into three as possible, such as k1 = 27, k2 = 27, k3 = 26, and the period T1 , T2, and T3, it is desirable to set the duty ratio of the pulse train CLK (1 / n) to 50% as much as possible.
分周比RがR=16/3の場合を例に挙げたが、たとえば、分周比RがR=3/2の場合には、分周装置1が、入力パルス列CLKをn=2で分周し、これを更にm=3分周すればよい。入力パルス列CLKをn=2で分周する場合には、カウント値CNT=80をn=2で除算すると、除算結果は2である。このように、余りが発生しない場合には、分周装置1は、入力パルス列CLKを単にn=2分周し、これを更にm=3分周する。
The case where the frequency division ratio R is R = 16/3 has been described as an example. For example, when the frequency division ratio R is R = 3/2, the
以下、図1および図2を参照しながら、分周装置1の各構成要素について説明する。
Hereinafter, each component of the
基準クロック発生回路11は、たとえば、水晶発振器やPLL回路(位相同期回路)によって構成されている。基準クロック発生回路11は、一定の周波数F2を持つ基準クロックBCLKを発生させ、これをパルス周期計測回路12に出力する。
The reference
上述した通り、周波数F2は、一定であり、入力パルス(列)CLKの周波数F1よりも十分に高い周波数である(F2≫F1)。それは、周波数F2が周波数F1よりも小さいと、入力パルスCLKをn=3分周できないためである。なお、周波数F2が周波数F1より高いほど、ジッタの発生が抑制され、分周の精度も上がる。 As described above, the frequency F2 is constant and is sufficiently higher than the frequency F1 of the input pulse (sequence) CLK (F2 >> F1). This is because when the frequency F2 is smaller than the frequency F1, the input pulse CLK cannot be divided by n = 3. Note that as the frequency F2 is higher than the frequency F1, the occurrence of jitter is suppressed and the accuracy of frequency division is improved.
本実施形態では、入力パルス(列)CLKの周波数F1は、不規則に変化するが、周波数F2≫周波数F1となる範囲内で、ゆっくりと変化する。 In the present embodiment, the frequency F1 of the input pulse (sequence) CLK changes irregularly, but slowly changes within a range where frequency F2 >> frequency F1.
パルス周期計測回路12は、たとえば、カウンタやフリップフロップによって構成されている。パルス周期計測回路12は、周波数F1を持つ入力パルス列CLKの1周期Tを計測する。計測の際に、パルス周期計測回路12は、図2(A)に図示する、パルスCLKの立ち上がり(エッジ)から次の立ち上がり(エッジ)までの期間を計測する。
その計測と共に、パルス周期計測回路12は、基準クロックBCLKが、1周期Tに何個あるかをカウントし、このカウント値CNTを演算回路13に出力する。
なお、パルス周期計測回路12の動作を単に「クロック周期計測」とも呼ぶ。入力パルス列CLKの1周期Tを計測する際に、その立ち下がりから次の立ち下がりまでの期間を計測することも可能である。
The pulse
Along with the measurement, the pulse
The operation of the pulse
演算回路13は、たとえば、カウンタやフリップフロップによって構成されている。演算回路13は、第1指示回路16から変数nが入力され、カウント値CNTがパルス周期計測回路12から入力されると、入力パルス列CLKをn分周するため、次のように動作する。なお、演算回路13の動作を単に「CNT/n演算」とも呼ぶ。
The
図3は、本発明の第1実施形態に係る演算回路の動作例を示すフローチャートである。
図3に図示するように、演算回路13は、カウント値CNTを変数nで除算し、除算結果D1を得る(ST1)。上記の仮定の下では、除算結果D1は、D1=CNT/n=26.6…である。更に、演算回路13は、除算結果D1の整数部分の値「26」も取得しておく。
FIG. 3 is a flowchart showing an operation example of the arithmetic circuit according to the first embodiment of the present invention.
As shown in FIG. 3, the
次に、除算結果D1に余りがある場合(ST2:YES)、演算回路13は、前回(i−1)の減算結果Si−1から、今回(i)取得した除算結果Diの整数部分の値を減算し、減算結果Siを得る(ST3)。
ここで、変数iは、i=1,2,…,n−2である。上記の仮定の下では、変数iの最大値は、i=1である。記号「int[Di]」は、除算結果Diの整数部分の値を示す。ただし、初期値としての減算結果S0は、S0=カウント値CNT=80であるものとする。
たとえば、i=1の場合、減算結果S0=カウント値CNTであるので、減算結果S1は、S1=CNT−int[D1]=80−26=54となる。減算結果S1は、CNT(=k)=80個の基準クロックBCLKのうち、残りの基準クロックBCLKの個数を示している。
Then, if there is a remainder in division result D 1 (ST2: YES), the
Here, the variable i is i = 1, 2,..., N−2. Under the above assumption, the maximum value of the variable i is i = 1. The symbol “int [D i ]” indicates the value of the integer part of the division result D i . However, the subtraction result S 0 as an initial value is assumed to be S 0 = count value CNT = 80.
For example, when i = 1, since the subtraction result S 0 = count value CNT, the subtraction result S 1 is S 1 = CNT−int [D 1 ] = 80−26 = 54. Subtraction result S 1 is, CNT (= k) = 80 pieces of the reference clock BCLK, which indicates the number of remaining reference clock BCLK.
そして、演算回路13は、先に求めた減算結果Siを、変数nから変数iを減算した値(n−i)で除算する(ST4)。
たとえば、変数i=1の場合、この除算結果D2は、D2=S1/(n−i)=54/(3−1)=27となる。
Then, the
For example, when the variable i = 1, the division result D 2 is D 2 = S 1 / (n−i) = 54 / (3-1) = 27.
変数iがn=1に達していない場合(ST5:NO)、演算回路13は、変数iに「1」を加算し(ST6)、ステップST3の演算に続いて、ステップST4の演算を行う。
この場合、演算回路13は、減算結果S2=S1−int[D2]=54−int[27」=27を得た後、除算結果D2=S2/(3−2)=27/1=27を得る。
When the variable i has not reached n = 1 (ST5: NO), the
In this case, the
ステップST1の演算を行った後、ステップST3,4の演算を再帰的に行うことで、除算結果D1〜Dnを得ることができる。
図2(B)に図示するように、除算結果D1の整数部分は個数k1に相当し、除算結果D2は個数k2に相当し、除算結果D3は個数k3に相当する。すなわち、k個の基準クロックBCLKを分周比R=nで分割したときの、各々の基準クロックBCLKの個数を得ることができる。
After performing the operation of step ST1, the division results D 1 to D n can be obtained by performing the operations of
As shown in FIG. 2 (B), the integer portion of the division result D 1 corresponds to the number k1, division results D 2 corresponds to the number k2, the division result D 3 is equivalent to the number k3. That is, it is possible to obtain the number of reference clocks BCLK when k reference clocks BCLK are divided by the division ratio R = n.
たとえば、分周比R=m/n=16/7、変数n=7、カウント値CNT=80である場合、7つの除算結果D1〜D7を得ることができる。この場合、除算結果D1〜D7は、各々、D1=11、D2=11、D3=11、D4=11、D5=12、D6=12、D7=12となる。 For example, when the frequency division ratio R = m / n = 16/7, the variable n = 7, and the count value CNT = 80, seven division results D 1 to D 7 can be obtained. In this case, the division results D 1 to D 7 are D 1 = 11, D 2 = 11, D 3 = 11, D 4 = 11, D 5 = 12, D 6 = 12, and D 7 = 12, respectively. .
一方、変数iがn=1に達した場合(ST5:YES)、演算回路13は、全ての除算結果が得られたので、これらの除算結果D1〜Dnをまとめてパルス出力回路14に出力する(ST7)。このとき、演算回路13は、パルス周期計測回路12によって得られたカウント値CNTもパルス出力回路14に出力する。
On the other hand, when the variable i reaches n = 1 (ST5: YES), since all the division results are obtained, the
図1に図示するパルス出力回路14は、たとえば、ダウンカウンタによって構成されている。パルス出力回路14は、演算回路13から除算結果D1〜Dnが入力されると、図2(C)に図示するように、カウント値CNTをカウントの初期値として、基準クロックBCLKのダウンカウントを開始する。パルス出力回路14が、基準クロックBCLKをダウンカウントするので、カウントの速度は、たとえば、基準クロック発生回路11の周波数F2となる。
なお、パルス出力回路14の動作を単に「n分周パルス出力」とも呼ぶ。
The
The operation of the
詳細には、カウント値CNT=80の場合、パルス出力回路14は、カウント値CNT=80をカウントの初期として、基準クロックBCLKのダウンカウントを開始する。その後、パルス出力回路14は、ダウンカウントの値を示すカウント値DCNTが、DCNT=CNT−D1=80−26=54に達したとき、図2(D)に図示する、周期T1を持つ1個のパルスを発生させ、これを分周回路15に出力する。
Specifically, when the count value CNT = 80, the
パルス出力回路14は、さらにダウンカウントを継続し、カウント値DCNTが、DCNT=D1−D2=54−27=27に達したとき、図2(D)に図示する、周期T2を持つパルスを発生させ、これを分周回路15に出力する。続いて、パルス出力回路14は、カウント値DCNTが、DCNT=D2−D3=27−27=0に達したとき、図2(D)に図示する、周期T3を持つパルスを発生させ、これを分周回路15に出力する。
The
パルス出力回路14を用いることで、入力パルス列CLKをn=3分周したパルス列CLK(1/n)を発生(生成)することができる。
なお、パルス出力回路14にアップカウントを行わせ、そのカウント値DCNTがD1=26、D1+D2=53、D1+D2+D3=80に達したとき、周期T1、T2、T3を各々持つパルスを出力させてもよい。
By using the
When the
分周回路15は、たとえば、カウンタによって構成されている。分周回路15は、パルス出力回路14からn=3分周されたパルス列CLK(1/n)が入力されると、これをm=16分周する。そのため、分周回路15は、パルス列CLK(1/n)をカウントし、そのカウント値がm=16に達したとき、パルスを出力する。パルスの出力後、分周回路15は、そのカウント値を0にリセットする。
分周回路15により、図2(E)に図示する、分周比R=m/n分周されたパルス列(m/n)が発生される。なお、分周回路15の動作を単に「m分周」とも呼ぶ。
The
The
第1指示回路16は、入力パルス列CLKの周期Tごとに、変数nを演算回路13に与える。
第2指示回路17は、入力パルス列CLKの周期Tごとに、変数mを演算回路13に与える。
The
The
以上の構成要素を有する分周装置1の動作を、図4(A)〜(D)に関連づけて説明する。
図4(A)〜(D)は、本発明の第1実施形態に係る分周装置1の動作例を示すタイミングチャートである。図4(A)は、入力パルス列CLKを示す。図4(B)は、パルス周期計測、CNT/n演算、n分周パルス出力、m分周を各々示す。図4(C)、(D)は、パルス列CLK(1/n)、パルス列CLK(m/n)を各々示す。
The operation of the
4A to 4D are timing charts showing an operation example of the
分周装置1は、図4(A)に図示するパルス列CLKが入力されると、図4(B)に図示する、パルス周期計測、CNT/n演算、n分周パルス出力を時分割で行って、図4(D)に図示する、n/m分周したパルス列CLK(m/n)を発生させる。
When the pulse train CLK illustrated in FIG. 4A is input, the
詳細には、パルス列CLKが入力されると、パルス周期計測回路12は、時刻t1におけるパルスCLKの立ち上がり(エッジ)から、時刻t3におけるパルスCLKの立ち上がりまでの周期Tを計測する。
ところで、基準クロック発生回路11は、時刻t1あるいはそれ以前から基準クロックBCLKを発生させている。パルス周期計測回路12は、周期Tの計測と共に、基準クロックBCLKが、1周期Tに何個あるかをカウントし、このカウント値CNTを演算回路13に出力する。
実際には、タイムラグが生じるので、パルス周期計測は、時刻t1から僅かに遅延した時刻t2に開始され、時刻t3におけるパルスCLKの立ち上がりから僅かに遅延した時刻t4に終了する。一方、図4(B)に図示するように、時刻t4において、パルス周期計測が終了すると共に、新たなパルス周期計測が開始される。
Specifically, when the pulse train CLK is input, the pulse
Incidentally, the reference
Actually, since a time lag occurs, the pulse period measurement starts at time t2 slightly delayed from time t1, and ends at time t4 slightly delayed from the rise of the pulse CLK at time t3. On the other hand, as shown in FIG. 4B, at time t4, the pulse period measurement is completed and a new pulse period measurement is started.
次に、演算回路13は、時刻t4において、第1指示回路16から変数nが入力され、カウント値CNTがパルス周期計測回路12から入力されると、ステップST1〜ST6に示す演算を行って(図3参照)、除算結果D1〜Dnを算出し、これらをパルス出力回路14に出力する。これにより、k個の基準クロックBCLKを分周比R=nで分割した、各々のクロックの個数を得ることができる。
CNT/n演算においても、タイムラグが生じるので、その演算は、時刻t5におけるパルスCLKの立ち上がりから僅かに遅延した時刻t6に終了する。一方、図4(B)に図示するように、時刻t6において、CNT/n演算が終了すると共に、新たなCNT/n演算が開始される。
Next, when the variable n is input from the
Even in the CNT / n calculation, a time lag occurs, and the calculation ends at time t6 slightly delayed from the rise of the pulse CLK at time t5. On the other hand, as shown in FIG. 4B, at time t6, the CNT / n calculation is completed and a new CNT / n calculation is started.
次に、パルス出力回路14は、演算回路13から除算結果D1〜Dnが入力されると、カウント値CNTをカウントの初期値としてダウンカウントを開始し、カウント値DCNTが、DCNT=CNT−D1、D1−D2、D2−D3に達したとき、周期T1、T2、T33を各々持つパルスを発生させ(図2(D)参照)、これらを分周回路15に出力する。
n分周パルス出力においても、タイムラグが生じるので、この動作は、時刻t7におけるパルスCLKの立ち上がりから僅かに遅延した時刻t8に終了する。一方、図4(B)に図示するように、時刻t8において、n分周パルス出力が終了すると共に、新たなn分周パルス出力が開始される。
Next, when the division results D 1 to D n are input from the
Since a time lag also occurs in the n-divided pulse output, this operation ends at time t8 slightly delayed from the rise of the pulse CLK at time t7. On the other hand, as shown in FIG. 4B, at time t8, the n-divided pulse output is completed and a new n-divided pulse output is started.
次に、分周回路15は、図4(B)に図示するように、パルス出力回路14からn分周されたパルス列CLK(1/n)が入力されると、これをm=16分周し、図4(D)に図示する、m/n分周したパルス列CLK(m/n)を発生させる。
このm分周においても、タイムラグが生じるので、m分周は、時刻t9におけるパルス列CLKの立ち上がりから僅かに遅延した時刻t10に終了する。一方、図4(B)に図示するように、時刻t10において、m分周が終了すると共に、新たなm分周が開始される。
以後も、クロック周期計測、CNT/n演算、n分周パルス出力、m分周を時分割で行う。
Next, as shown in FIG. 4B, when the pulse train CLK (1 / n) divided by n is input from the
A time lag also occurs in this m division, and the m division ends at time t10 slightly delayed from the rise of the pulse train CLK at time t9. On the other hand, as shown in FIG. 4B, at time t10, m division ends and a new m division starts.
Thereafter, clock cycle measurement, CNT / n calculation, n-divided pulse output, and m-division are performed in a time-sharing manner.
ここで、入力パルス列CLKの周期(周波数)が不規則に変化する場合の分周装置1の動作を説明する。
図5(A)〜(D)は、本発明の第1実施形態に係る分周装置の動作例を示すタイミングチャートである。図5(A)〜(D)は、入力パルス列CLK、基準クロックBCLK、パルス列CLK(1/n)、パルス列CLK(m/n)を各々示す。
実際には、各クロックは時分割で演算されるが、説明を明確にするため、各図には、各クロックが同一の時系列で図示されている。
Here, the operation of the
FIGS. 5A to 5D are timing charts showing an operation example of the frequency divider according to the first embodiment of the present invention. 5A to 5D show the input pulse train CLK, the reference clock BCLK, the pulse train CLK (1 / n), and the pulse train CLK (m / n), respectively.
Actually, each clock is calculated in a time division manner, but for clarity of explanation, each clock is shown in the same time series in each figure.
図5(A)に図示するように、入力パルス列CLKの周期が、Ta、Tb(=Ta/2)、Tc(=Ta)のように変化する場合を例に挙げる。
一例として、分周比RがR=m/n=16/3であり、基準クロックBCLKの周波数F2が一定のF2=80MHzであり、入力パルス列CLKの周波数F1が、Fa=1/Ta=1MHz、Fb=1/Tb=2/Ta=2×Fa=2MHz、Fc(=Fa)のように変化するものと仮定する。説明を明確にするため、入力パルス列CLKの周期(周波数)が急峻に変化する場合を例示するが、実用的には、入力パルス列CLKの周期(周波数)は、ゆっくりと変化することが望ましい。
As shown in FIG. 5A, the case where the cycle of the input pulse train CLK changes as Ta, Tb (= Ta / 2), Tc (= Ta) is taken as an example.
As an example, the frequency division ratio R is R = m / n = 16/3, the frequency F2 of the reference clock BCLK is constant F2 = 80 MHz, and the frequency F1 of the input pulse train CLK is Fa = 1 / Ta = 1 MHz. , Fb = 1 / Tb = 2 / Ta = 2 × Fa = 2 MHz, and Fc (= Fa) are assumed to change. In order to clarify the explanation, a case where the period (frequency) of the input pulse train CLK changes sharply will be exemplified. However, in practice, it is desirable that the period (frequency) of the input pulse train CLK changes slowly.
図5(B)に図示するように、パルス周期計測回路12は、周期Ta、Tcにおいては、80個の基準クロックBCLKをカウントし、周期Tbにおいては、40個の基準クロックBCLKをカウントする。すなわち、周期Ta、Tcにおけるカウント値CNT1、CNT3は、CNT1=CNT3=80である。基準クロックBCLKの周波数F2が一定であるので、周期Tbにおけるカウント値CNT2は、カウント値CNT1=80の半分、すなわち、CNT2=40である。
そして、演算回路13が、周期Ta、Tbにおけるカウント値CNT1=CNT3=80を、分周比R=n=3で除算し、周期Tbにおけるカウント値CNT2=40を、分周比R=n=3で除算する。
As shown in FIG. 5B, the pulse
Then, the
すると、パルス出力回路14は、図5(C)に図示するように、n分周したパルス列CLK(1/n)を発生させる。周期Ta、Tcと周期Tbとでは、パルス列CLK(1/n)の周期が異なるが、いずれの周期においても、入力パルス列CLKが3分周されている。その後、分周回路15は、パルス列CLK(1/n)をm分周し、図5(D)に図示するパルス列CLK(m/n)を発生させる。
Then, as shown in FIG. 5C, the
以下、本実施形態に係る分周装置1を、ハードウェアで構成された一般的な分周装置およびソフトウェアで構成された一般的な分周装置と対比させながら、本実施形態に係る分周装置1の利点について述べる。
Hereinafter, the
一般的な分周装置は、一定周波数の基準クロックを発振させているが、それは、たとえば、カウンタを動作させるためのものであり、本実施形態のように、入力パルス列の周波数よりも高い周波数を持つクロックではない。一般的な分周装置は、入力パルス列の周期が不規則に変化すると、その周期に合せた同期信号などをカウンタに与えることができず、入力パルス列を分周することが困難となる。 A general frequency dividing device oscillates a reference clock having a constant frequency. For example, this is for operating a counter. As in this embodiment, a frequency higher than the frequency of the input pulse train is used. It ’s not a clock. In a general frequency dividing device, when the cycle of an input pulse train changes irregularly, a synchronization signal or the like that matches the cycle cannot be supplied to the counter, and it is difficult to divide the input pulse train.
これに対し、本実施形態では、入力パルス列CLKの周期が不規則に変化する場合であっても、たとえば、図5(B)に図示するように、演算回路13が、異なる周期Ta、Tbごとに、カウント値CNT1、CNT2を分周比R=n=3で各々分割する。そして、パルス出力回路14が、カウント値CNT1、CNT2を分周比R=n=3で分割したときの値に達するごとに、3個のパルスを出力する。そのため、分周装置1をハードウェアで構成しても、m/n分周したパルス列(m/n)にジッタが発生しにくい。
On the other hand, in the present embodiment, even when the cycle of the input pulse train CLK changes irregularly, for example, as shown in FIG. 5B, the
図6は、一般的なソフトウェアで構成された分周装置Aの構成例を示すブロック図である。たとえば、ソフトウェアを用いて、1MHzの入力パルス列CLKを、分周比R=m/n=16/3で分周する場合には、図6に図示する処理が行われる。 FIG. 6 is a block diagram illustrating a configuration example of the frequency dividing device A configured by general software. For example, when dividing a 1 MHz input pulse train CLK with a frequency division ratio R = m / n = 16/3 using software, the process shown in FIG. 6 is performed.
先ず、入力パルス列CLKは、カウンタA1にてカウントされ、入力パルス列CLKがデジタル値Digに変換される。このデジタル値Digは、サンプルホールド回路A2にて、たとえば、ソフトウェア制御の周期と等しいサンプリング時間ΔT=100μsごとに、サンプリングされる。ただし、カウンタA1、サンプルホールド回路A2における処理は、ハードウェアを用いて行われる。 First, the input pulse train CLK is counted by the counter A1, and the input pulse train CLK is converted into a digital value Dig. This digital value Dig is sampled by the sample hold circuit A2, for example, every sampling time ΔT = 100 μs equal to the period of software control. However, processing in the counter A1 and the sample hold circuit A2 is performed using hardware.
加算部A4が、サンプルホールド回路A2によって、n回目にサンプリングされた、デジタル値Dignと、遅延部A3によって1サンプリング分のサンプリング時間ΔTだけ遅延された、n−1回目のデジタル値Dign−1とを加算すると、分周演算部A5は、n回目の加算結果ADn=Dign+Dign−1を分周比R=m/nで分周する。 The adder A4 is sampled n times by the sample and hold circuit A2, and the digital value Dig n , which is delayed by the sampling time ΔT for one sampling by the delay unit A3, is the n−1th digital value Dig n− When 1 is added, the frequency division calculation unit A5 divides the n-th addition result AD n = Dig n + Dig n−1 by the frequency division ratio R = m / n.
たとえば、サンプリング時間ΔTが100μsであり、100μsで100個のパルスが分周演算部A5に入力されたと仮定するとき、分周演算部A5は、100個のパルス列CLKを分周比Rで分周し、演算結果RAn=100個/R=100個/(16/3)=18.75個を得る。この演算結果RAnは、サンプリング時間ΔT当たりの入力パルスCLKの個数を表わす。なお、分周演算部A5の演算結果は、サンプリング時間ΔTごとに同じであると仮定する。 For example, assuming that the sampling time ΔT is 100 μs and 100 pulses are input to the frequency division calculation unit A5 at 100 μs, the frequency division calculation unit A5 divides the 100 pulse train CLK by the frequency division ratio R. Then, the calculation result RA n = 100 / R = 100 / (16/3) = 18.75 is obtained. The calculation result RA n represents the number of input pulses CLK per sampling time [Delta] T. It is assumed that the calculation result of the frequency division calculation unit A5 is the same every sampling time ΔT.
分離演算部A8は、加算部A6を介して入力された演算結果RAnの整数部分と小数部分とを得ると、n回目の演算結果RAnによる小数部分DECnを遅延部A7に出力すると共に、制御信号CTLをパルス発生部A9に出力する。パルス発生部A9が、制御信号CTLを受けて、パルスを出力することにより、入力パルス列CLKを分周比R=m/nで分周したクロックCLKが生成される。
一方、遅延部A7は、分離演算部A8から入力された小数部分DECnをサンプリング時間ΔTだけ遅延させると、加算部A6は、小数部分DECnと、n+1回目の演算結果RAn+1とを加算し、演算結果RAn+1+DECnを分離演算部A8に出力する。
When the separation calculation unit A8 obtains the integer part and the decimal part of the calculation result RA n input through the addition unit A6, the separation calculation unit A8 outputs the decimal part DEC n based on the nth calculation result RA n to the delay unit A7. The control signal CTL is output to the pulse generator A9. When the pulse generation unit A9 receives the control signal CTL and outputs a pulse, the clock CLK obtained by dividing the input pulse train CLK by the division ratio R = m / n is generated.
On the other hand, when the delay unit A7 delays the decimal part DEC n input from the separation calculation unit A8 by the sampling time ΔT, the addition unit A6 adds the decimal part DEC n and the (n + 1) th operation result RA n + 1. The operation result RA n + 1 + DEC n is output to the separation operation unit A8.
図7は、図6に図示する分離演算部A8の演算結果を説明するための図である。
図7に図示するように、n回目の演算結果RAn=18.75には、「0.75」の余りが発生する。演算結果RAnの整数部分が「18」であり、その小数部分DECnが「0.75」であるとき、その小数部分は、サンプリング時間ΔT後の分周演算部A5によるn+1回目の演算に持ち越される。
すなわち、n+1回目の演算結果は、RAn+1=18.75+0.75=19.05となる。この演算結果にも、「0.05」の余りが発生するため、その小数部分「0.05」は、n+2回目の演算に持ち越される。
同様にして、n+2回目の演算結果は、RAn+2=18.75+0.5=19.25となり、n+3回目の演算結果は、RAn+3=18.75+0.25=19.0となる。
FIG. 7 is a diagram for explaining the calculation result of the separation calculation unit A8 illustrated in FIG.
As illustrated in FIG. 7, a remainder of “0.75” is generated in the nth calculation result RA n = 18.75. When the integer part of the calculation result RA n is “18” and the decimal part DEC n is “0.75”, the decimal part is used for the (n + 1) th calculation by the frequency division calculation unit A5 after the sampling time ΔT. Carried over.
That is, the calculation result of the (n + 1) th time is RA n + 1 = 18.75 + 0.75 = 19.05. Since the remainder of “0.05” also occurs in this calculation result, the decimal part “0.05” is carried over to the (n + 2) th calculation.
Similarly, the n + 2 calculation result is RA n + 2 = 18.75 + 0.5 = 19.25, and the n + 3 calculation result is RA n + 3 = 18.75 + 0.25 = 19.0.
パルス発生部A9は、分離演算部A8から制御信号CTLを受ける度に、パルスを出力するが、ハードウェアで構成された一般的な分周装置と同様に、分離演算部A8が、18個または19個のパルスごとにしか、制御信号CTLをパルス発生部A9に出力することができない。
したがって、図7の斜線部分で示すように、n+1回目、n+2回目、n+3回目における分周演算部A5の演算では、1個のパルスが余る。ただし、次のn+4回目の演算では、n+1回目の演算と同様に、パルスの余りは発生しない。各演算結果の小数部分を得る過程を1サイクルとすると、分周装置Aがこの過程を4サイクル繰り返せば、余りのパルスを払い出すことができる。
The pulse generation unit A9 outputs a pulse every time it receives the control signal CTL from the separation calculation unit A8. As with a general frequency divider configured by hardware, the pulse generation unit A9 includes 18 separation calculation units A8 or The control signal CTL can be output to the pulse generator A9 only for every 19 pulses.
Therefore, as indicated by the hatched portion in FIG. 7, one pulse is left in the calculation of the frequency division calculation unit A5 at the (n + 1) th time, the (n + 2) th time, and the (n + 3) th time. However, the remainder of the pulse does not occur in the next (n + 4) th computation, as in the (n + 1) th computation. Assuming that the process of obtaining the decimal part of each calculation result is one cycle, if the frequency divider A repeats this process for four cycles, the remaining pulses can be paid out.
この余りのパルスは、ジッタの発生の要因となる。一般的な分周装置Aにおける、パルスのエッジ間のジッタは、(2)式で表わされる。 This extra pulse causes jitter. The jitter between the edges of the pulses in the general frequency dividing device A is expressed by equation (2).
(数2)
(1/18−1/19)/(1/18.75)×100=±5.5% …(2)
(Equation 2)
(1 / 18-1 / 19) / (1 / 18.75) × 100 = ± 5.5% (2)
一方、本実施形態に係る分周装置1におけるジッタは、次のように求まる。図2(B)に図示するように、パルス周期計測回路12のカウント値がCNT=80の場合、これを変数n=3で除算すると、k=80個の基準クロックBCLKは、k1=26、k2=27、k3=27の3つに分割される。
したがって、図2(E)に図示する、分周回路15が出力したパルス列CLK(m/n)の周期の最大値MAXおよび最小値MINは、(3.1)、(3.2)式で表わされる。ただし、記号「int」は、上述したように、(m/n)の整数部分を表わす記号である。
On the other hand, the jitter in the
Therefore, the maximum value MAX and the minimum value MIN of the period of the pulse train CLK (m / n) output from the
(数3)
MAX=CNT×(1/F2)×int(m/n)+T2+T3
=80×(1/80MHz)×5+337.5ns+337.5ns
=5.675μs …(3.1)
MIN=CNT×(1/F2)×int(m/n)+T1+T2(=T3)
=80×(1/80MHz)×5+325ns+337.5ns
=5.6625μs …(3.2)
(Equation 3)
MAX = CNT × (1 / F2) × int (m / n) + T2 + T3
= 80 x (1/80 MHz) x 5 + 337.5 ns + 337.5 ns
= 5.675 μs (3.1)
MIN = CNT × (1 / F2) × int (m / n) + T1 + T2 (= T3)
= 80 x (1/80 MHz) x 5 + 325 ns + 337.5 ns
= 5.6625 μs (3.2)
(3.1)、(3.2)式を用いると、パルス列CLK(m/n)に発生するジッタは、(4)式で表わされる。 When the expressions (3.1) and (3.2) are used, the jitter generated in the pulse train CLK (m / n) is expressed by the expression (4).
(MAX−MIN)/{(CNT/n)×m×(100μs/80)}
=(5.6725μs−5.6625μs)/{(80/3)×16×(100μs/80)}
=±0.2% …(4)
(MAX-MIN) / {(CNT / n) × m × (100 μs / 80)}
= (5.6725 μs−5.6625 μs) / {(80/3) × 16 × (100 μs / 80)}
= ± 0.2% (4)
(2)式および(4)式により、本実施形態に係る分周装置1で発生するジッタは、ソフトウェア処理を行う一般的な分周装置Aで発生するジッタの、およそ1/27であり、非常に小さい。これは、次の2つの理由による。
According to the equations (2) and (4), the jitter generated in the
第1の理由は、本実施形態では、入力パルス列CLKのサンプリングを行わないためである。第2の理由は、本実施形態では、図5(A)に図示するように、入力パルス列CLKの周期が不規則に変化しても、余りのパルスが発生しないためである。
このように、本実施形態に係る分周装置1によれば、入力パルス列CLKの周期が不規則に変化し、これをm/n分周しても、ジッタの発生が極めて小さく、極めて精度の高いm/n分周したパルス列を生成することができる。
The first reason is that in this embodiment, the input pulse train CLK is not sampled. The second reason is that in this embodiment, as shown in FIG. 5A, even if the period of the input pulse train CLK changes irregularly, no extra pulses are generated.
As described above, according to the
[第2実施形態]
第1実施形態に係る分周装置1は、入力パルス列CLKの周期が不規則に変化しても、ジッタの発生が極めて小さいため、たとえば、回転数を不規則な周期で変化させるサーボモータの制御に好適である。
そこで、第2実施形態では、分周装置1を搭載し、サーボモータを制御するサーボ制御回路について、図8を参照しながら説明する。
[Second Embodiment]
In the
Therefore, in the second embodiment, a servo control circuit that mounts the
図8は、第2実施形態に係るサーボ制御回路の構成例を示すブロック図である。
図8に図示するサーボ制御回路2は、分周装置1を有する制御回路21、駆動回路22および検出回路23を有する。
なお、サーボ制御回路2は、本発明の制御回路に対応する。
FIG. 8 is a block diagram illustrating a configuration example of a servo control circuit according to the second embodiment.
A
The
サーボ制御回路2は、たとえば、パルス幅変調方式のサーボモータ24を制御する。サーボ制御回路2は、フィードバック制御を行って、制御対象の位置、速度、角度などを検出しながら、それらの目標値との偏差(オフセット)を減少させるように、サーボモータ24の回転数(回転速度)を制御する。
The
制御回路21は、検出回路23から入力されたパルス列CLKを用いて、駆動回路22を制御するための制御信号CTLを発生させ、これを駆動回路22に出力する。制御信号CTLには、分周装置1がm/n分周したパルス列が含まれる。
The
制御回路21が制御信号CTLを発生させる際に、分周装置1は、入力パルス列CLKを分周比R=m/nで分周し、これを制御信号CTLの一部とする。
本実施形態では、一例として、パルス幅変調方式のサーボモータ24を採用しているため、分周装置1が入力パルス列CLKを分周比R=m/nで分周すれば、サーボモータ24の回転数をm/n倍に変化させることができる。
When the
In the present embodiment, as an example, the pulse width modulation
駆動回路22は、制御回路21から入力された制御信号CTLを用いて、サーボモータ24を駆動させるための駆動信号DRVを発生させ、これをサーボモータ24に出力する。
The
サーボモータ24は、たとえば、その回転軸241を、その時計回りまたは反時計回りに回転可能なAC(交流)モータである。サーボモータ24は、たとえば、リニアモータであっても差し支えない。サーボモータ24は、駆動回路22から入力された駆動信号DRVに応じた回転速度で、回転軸241を回転させる。
The
検出回路23は、ロータリーエンコーダの機能を有し、サーボモータ24に接続されている。検出回路23は、回転軸241の回転変位を検出し、これをデジタル値のパルス列CLKに変換した後、このパルス列CLKを制御回路21の分周装置1に出力する。
なお、サーボモータ24がA相およびB相を持つ場合、検出回路23は、A相のパルス列およびB相のパルス列を制御回路21の分周装置1に出力する。
The
When the
上記のサーボモータ24は、始動トルクが大きく、安定した回転数に達するまでの時間が他のモータのものに比べて短いので、幅広い回転数(回転速度)で安定した動作が可能である。
したがって、分周装置1を用いれば、周期が不規則に変化するパルス列CLKをm/n分周しても、ジッタの発生が極めて小さく、高精度かつ正確にサーボモータ24の回転数を制御することができる。
Since the
Therefore, if the
このような利点を有するサーボ制御回路2は、たとえば、NC(Numerical Control)装置やCT(Computed Tomography)装置のサーボモータの制御部分に用いることができる。
The
[分周装置1の変形例]
分周装置1を搭載したサーボ制御回路2において、サーボモータ24がA相およびB相を持つ場合には、分周装置1を図9に図示するように構成することができる。
[Modification of Frequency Divider 1]
In the
図9は、本発明の変形例に係る分周装置の構成例を示すブロック図である。
図9に図示する分周装置1aは、基準クロック発生回路11、パルス周期計測回路12、演算回路13、パルス出力回路14、分周回路15、第1指示回路16、および、第2指示回路17に、第1のパルス形態変更回路18および第2のパルス形態変更回路19を加えたものである。
FIG. 9 is a block diagram illustrating a configuration example of a frequency dividing device according to a modified example of the present invention.
A
検出回路23から入力された、図9に図示するA相のパルス列は、B相のパルス列に対して、位相が90度進んでいるものと仮定する。この場合、いずれか一方のパルス列を分周比R=m/nで分周し、その分周後に、m/n分周した一方のパルス列の位相を90度ずらせば、他方のパルス列を発生させることができる。
It is assumed that the phase A pulse train illustrated in FIG. 9 input from the
そこで、第1のパルス形態変更回路18は、A相およびB相のパルス列が入力されると、A相のパルス列をパルス列CLKとしてパルス周期計測回路12に出力すると共に、B相のパルス列を符号化してパルス周期計測回路12に出力する。
B相のパルス列の符号化では、このパルス列が0となるように、符号化すればよい。無論、A相のパルス列を符号化し、B相のパルス列をパルス周期計測回路12に出力することもできる。
Therefore, when the A-phase and B-phase pulse trains are input, the first pulse
In the encoding of the B-phase pulse train, the encoding may be performed so that the pulse train becomes zero. Of course, it is also possible to encode the A-phase pulse train and output the B-phase pulse train to the pulse
第2のパルス形態変更回路19は、m/n分周されたパルス列CLK(m/n)が分周回路15から入力されると、この位相を90度遅らせたパルス列CLK(m/n)を発生させ、これをB相のパルス列として、駆動回路22(図8参照)に出力すると共に、パルス列CLK(m/n)をA相のクロックとして、駆動回路22に出力する。
When the pulse train CLK (m / n) frequency-divided by m / n is input from the
本発明の実施形態は、上述の実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。 The embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the scope of the present invention.
1、1a…分周装置、11…基準クロック発生回路、12…パルス周期計測回路、13…演算回路、14…パルス出力回路、15…分周回路、16…第1指示回路、17…第2指示回路、18…第1のパルス形態変更回路、19…第2のパルス形態変更回路、2…サーボ制御回路、21…制御回路、22…駆動回路、23…検出回路、231…回転軸、24…サーボモータ。
DESCRIPTION OF
Claims (6)
前記入力パルスの周期にわたって、一定の周波数を持つ基準クロックをカウントするカウンタ回路と、
前記カウンタ回路によって得られた第1カウント値を前記第1変数が示す値に分割する演算を行うと共に、前記基準クロックのカウントを開始し、当該カウントによる第2カウント値が前記第1カウント値を分割した値に達する度に、一のパルスを出力する演算出力回路と、
前記演算出力回路の出力パルス列を前記第2変数が示す値で分周したパルスを出力する分周回路と、
を有する分周装置。 A frequency dividing device capable of dividing an input pulse by a frequency dividing ratio represented by a ratio of the second variable to the first variable, wherein the first variable and the second variable are different positive integers;
A counter circuit that counts a reference clock having a constant frequency over the period of the input pulse;
An operation is performed to divide the first count value obtained by the counter circuit into a value indicated by the first variable, and the counting of the reference clock is started, and the second count value by the count becomes the first count value. An arithmetic output circuit that outputs one pulse each time the divided value is reached;
A frequency dividing circuit for outputting a pulse obtained by dividing the output pulse train of the arithmetic output circuit by a value indicated by the second variable;
A frequency divider.
前記第1カウント値を前記第1変数が示す値で除算し、前記第2カウント値が除算結果の整数部分が示す値に達したとき、一のパルスを出力し、
前記パルスの出力後、前記除算結果の整数部分が示す値を前記第1カウント値から減算し、減算結果を、前記カウント値を前記第1変数で分割すべき残りの数で均等またはできるだけ均等に分割し、前記第2カウント値が前記減算結果を均等またはできるだけ均等に分割した値に達する度に、一のパルスを出力する
請求項1記載の分周装置。 The arithmetic output circuit is:
When the first count value is divided by the value indicated by the first variable and when the second count value reaches the value indicated by the integer part of the division result, one pulse is output,
After the output of the pulse, the value indicated by the integer part of the division result is subtracted from the first count value, and the subtraction result is evenly or as evenly as possible with the remaining number to be divided by the first variable. 2. The frequency dividing device according to claim 1, wherein the dividing unit outputs one pulse every time the second count value reaches a value obtained by dividing the subtraction result equally or as evenly as possible.
請求項1または2記載の分周装置。 The frequency dividing device according to claim 1, further comprising: a clock generation circuit that generates a clock having a frequency higher than a frequency of the input pulse as the reference clock.
請求項1から3のいずれか一に記載の分周装置。 The frequency dividing device according to any one of claims 1 to 3, further comprising a measurement circuit that measures a cycle of the input pulse.
前記演算出力回路が出力したパルスをカウントし、当該カウントによる第3カウント値が、前記第2変数が示す値に達する度に、一のパルスを出力する
請求項1から4のいずれか一に記載の分周装置。 The divider circuit is
5. The pulse output from the arithmetic output circuit is counted, and one pulse is output each time a third count value based on the count reaches a value indicated by the second variable. 6. Frequency divider.
前記分周装置は、
前記入力パルスの周期にわたって、一定の周波数を持つ基準クロックをカウントするカウンタ回路と、
前記カウンタ回路によって得られた第1カウント値を前記第1変数が示す値に分割する演算を行うと共に、前記基準クロックのカウントを開始し、当該カウントによる第2カウント値が前記第1カウント値を分割した値に達する度に、一のパルスを出力する演算出力回路と、
前記演算出力回路の出力パルス列を前記第2変数が示す値で分周したパルスを出力する分周回路と、
を有する制御回路。 The first variable and the second variable take different positive integers, and have a frequency divider that can divide the input pulse by a frequency division ratio represented by the ratio of the second variable to the first variable. A control circuit that uses the output of the peripheral device,
The frequency divider is
A counter circuit that counts a reference clock having a constant frequency over the period of the input pulse;
An operation for dividing the first count value obtained by the counter circuit into a value indicated by the first variable is performed, and the counting of the reference clock is started. An arithmetic output circuit that outputs one pulse each time the divided value is reached;
A frequency dividing circuit for outputting a pulse obtained by dividing the output pulse train of the arithmetic output circuit by a value indicated by the second variable;
A control circuit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010012317A JP2011151672A (en) | 2010-01-22 | 2010-01-22 | Frequency division device and control circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010012317A JP2011151672A (en) | 2010-01-22 | 2010-01-22 | Frequency division device and control circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011151672A true JP2011151672A (en) | 2011-08-04 |
Family
ID=44538260
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010012317A Pending JP2011151672A (en) | 2010-01-22 | 2010-01-22 | Frequency division device and control circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011151672A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104779936A (en) * | 2014-01-10 | 2015-07-15 | Ls产电株式会社 | Method of outputting positioning pulse by PLC |
CN117081582A (en) * | 2023-05-12 | 2023-11-17 | 南京筠芯科技有限公司 | Frequency division method for realizing 50% duty ratio and frequency divider |
-
2010
- 2010-01-22 JP JP2010012317A patent/JP2011151672A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104779936A (en) * | 2014-01-10 | 2015-07-15 | Ls产电株式会社 | Method of outputting positioning pulse by PLC |
CN104779936B (en) * | 2014-01-10 | 2017-07-21 | Ls产电株式会社 | The method that position pulse is exported by PLC |
CN117081582A (en) * | 2023-05-12 | 2023-11-17 | 南京筠芯科技有限公司 | Frequency division method for realizing 50% duty ratio and frequency divider |
CN117081582B (en) * | 2023-05-12 | 2024-04-23 | 南京筠芯科技有限公司 | Frequency division method for realizing 50% duty ratio and frequency divider |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2629423B1 (en) | Fully digital method for generating sub clock division and clock waves | |
JP6157228B2 (en) | Drive device and drive circuit for vibration actuator | |
CN111642139A (en) | Frequency regulator, frequency regulating method thereof and electronic equipment | |
JP5601292B2 (en) | Digital phase synchronization circuit and physical quantity detection sensor | |
KR101561372B1 (en) | Pwm signal generating circuit, printer and pwm signal generating method | |
JP2011151672A (en) | Frequency division device and control circuit | |
KR20190053101A (en) | Semiconductor device, angle value correction circuit and method therefor | |
JP2007151356A (en) | Circuit and method for motor control | |
JP5839291B2 (en) | PLL circuit | |
JP2011061929A (en) | Motor speed control device | |
JP2013238431A (en) | Resolver device | |
JP6779419B2 (en) | Phase-locked loop | |
JP2007252138A (en) | Motor controller | |
JP6903543B2 (en) | ABZ phase divider | |
JP5727758B2 (en) | Motor control circuit | |
JP2002116058A (en) | Encoder data conversion circuit | |
JPH11178380A (en) | Motor speed controller | |
JP3967370B1 (en) | Digital pulse width modulator | |
JP2008301017A (en) | Digital pulse width modulation apparatus | |
JP5999532B2 (en) | PLL circuit | |
CN115001458B (en) | Orthogonal photoelectric encoder pulse signal random frequency multiplication control method | |
JP2002311040A (en) | Speed detector | |
JP4067616B2 (en) | Motor speed control device | |
JP2010172056A (en) | Speed pattern generating apparatus | |
JP2004336232A (en) | Frequency division circuit and method therefor |