The present invention pertains to a digital phase-locked loop (DPLL) circuit. More specifically, the present invention pertains to a DPLL circuit that generates a synchronizing clock at a multiple of the reference clock frequency.
A DPLL circuit is a PLL circuit in which all parts of the loop are digitally constituted. Since it does not require a voltage-controlled oscillator (VCO), there is no need to worry about frequency drift, which is primarily a function of variations in the power source; thus, it is very stable and reliable, Also, the circuit layout is less restrictive, which is beneficial for IC design. A conventional multiplier type DPLL circuit is composed of a control oscillator made up of a frequency divider that frequency-divides at the prescribed frequency division ratio of the master clock, which has a frequency sufficiently higher than that of the input reference clock to generate an output clock, a frequency divider for feedback that frequency-divides at a frequency division ratio corresponding to the multiplier for the output clock output from said control oscillator and generates a feedback clock at a frequency equal to that of the reference clock, and a phase comparator that compares the phase of the reference clock and the feedback clock and generates a synchronization control signal for controlling the locking operation of the control oscillator. Phase locking in the control oscillator is realized with the reference clock by controlling the counter operating frequency at high speed, low speed or intermediate speed with respect to the master clock corresponding to the synchronization control signal from the phase comparator, that is, corresponding to the phase difference between the reference clock and the feedback clock.
However, the conventional DPLL circuit has the following problem. That is, when the reference clock varies and its phase difference from the feedback clock increases, the period of the output clock becomes immediately disturbed, increasing jitter. Although this phenomenon is momentary, it is still undesirable for the DPLL circuit applications, especially in the fields of audio and image processing, because an increase in jitter of the DPLL output affects recording/reproduction and transmission quality of the audio and video information. Also, in a conventional DPLL circuit, the property of the control oscillator in tracking the phase difference between the reference clock and the feedback clock or the synchronization control signal from the phase comparator is limited. In particular, the counter operating frequency has a narrow range, so that the lock range is limited, which is also undesirable.
A general object of the present invention is to solve the aforementioned problems of the conventional methods by providing a digital phase-locked loop circuit that can alleviate the output jitter and produce a stable synchronizing clock.
This and other objects and features are provided, in accordance with a first aspect of the invention by a first digital phase-locked loop circuit that generates a locked output clock at a frequency M-times (where M is an integer of 2 or more) that of the input prescribed reference clock, and comprises the following parts: a first frequency divider that divides the frequency of said reference clock to 1/M to generate a feedback clock, a first phase comparator that compares the phase of said reference clock and said feedback clock and generates a first synchronization control signal corresponding to the phase difference, a second frequency divider that divides the first master clock to 1/N (where N is an integer of 2 or more) according to the first synchronization control signal obtained by said first phase comparator and generates an intermediate clock at a frequency M-times that of said reference clock, a period measurement circuit that measures the period of each said intermediate clock generated by said second frequency divider, a moving average value computation circuit that determines the moving average value of the period of said intermediate clock based on the period measurement value obtained by said period measurement circuit, and an output clock generator that generates a clock having a period corresponding to the moving average value of the intermediate clock obtained by said moving average value computation circuit as said output clock.
In said first digital phase-locked loop circuit, because the second frequency divider follows the first synchronization control signal, even when there is a rapid variation in the period of the intermediate clock, a moving-averaged period that varies slightly with small fluctuations in magnitude can still be obtained by means of the period measurement circuit and the moving average value computation circuit, so that a stable output clock can be obtained that slowly and firmly follows the reference clock from the output clock generator.
According to another aspect of the present invention, said period measurement circuit has a time-measuring counter that counts the second master clock. Also, said moving average value computation circuit may have a sampling part that extracts at a prescribed shift pitch A period measurement values of the A (A is an integer of 2 or more) consecutive intermediate clock portions obtained by said period measurement circuit, and an average value computation circuit that determines the average value for said A period measurement values extracted by said sampling part. In addition, said output clock generator may have a counter for oscillation that counts the third master clock.
A third aspect of the invention includes, a hold control part that suspends the computation processing of said moving average value computation circuit so as to temporarily hold the output clock generated by said output clock generator constant. This hold function is especially effective when it is determined that the reference clock is disturbed or a disturbance in the reference clock can be detected.
A fourth aspect of the invention comprises said intermediate clock being generated by said second frequency divider and said output clock generated by said clock generator are inputs to a feedback control part which selects either the intermediate clock or output clock and outputs it to said first frequency divider. Said feedback control part has a phase-lock detector that detects whether the reference clock and the feedback clock are phase-locked, and said intermediate clock or said output clock is selected corresponding to the detection result of said phase-lock detector. In a preferred method, said phase-lock detector comprises the following parts: an edge detector that detects the rising edge or falling edge of said input clock as the first clock edge, and detects the rising edge or falling edge of said feedback clock as the second clock edge, a consecutive alternating input cycles counter that counts the consecutive number of cycles of alternating input of said first clock edge and said second clock edge, and a control signal output circuit that outputs a control signal for selecting said intermediate clock from a prescribed initial state until the count value of said consecutive alternating input cycles counter exceeds a prescribed value, and a control signal for selecting said output clock after the count value of said consecutive alternating input cycles counter exceeds the prescribed value. This method includes a counter control unit that resets the count value of said consecutive alternating input cycles counter to the initial value when the alternating input of said first clock edge and said second clock edge is not established.
According to a fifth aspect of the invention, a frequency-lock detector compares the period measurement value with said period measurement circuit and the moving average value obtained by said moving average value computation circuit to detect whether the frequency lock state has been established, and said intermediate clock or said output clock is selected corresponding to the detection result of said frequency-lock detector. In this way, in the feedback control part, not only phase-locking but also frequency-locking are checked to perform switching from the intermediate clock to the output clock. As a result, the overall control of the phase-locked loop can be made even more reliable.
In one aspect, the second digital phase-locked loop circuit of the present invention is a digital phase-locked loop circuit for generating a locked output clock at a frequency M-times (where M is an integer of 2 or more) that of the input prescribed reference clock and comprises the following parts: a first frequency divider that divides the frequency of said output clock to 1/M to generate a feedback clock, a first phase comparator that compare the phases of said input reference clock and said feedback clock and generates a first synchronization control signal corresponding to the phase difference, a second frequency divider that divides the first master clock to 1/N (where N is an integer of 2 or more) according to the first synchronization control signal obtained by said first phase comparator and generates an output clock at a frequency M-times that of said reference clock, a second phase comparator that compares the phase of said reference clock and said feedback clock to generate a second synchronization control signal corresponding to the phase difference, and a frequency division ratio control part that controls and adjusts frequency division ratio N of said second frequency divider corresponding to the second synchronization control signal obtained by said second phase comparator.
In said second digital phase-locked loop circuit, the operation of the second phase comparator and the frequency division ratio control part adjusts and controls the frequency division ratio N of the second frequency divider in accordance with the phase difference between the reference clock and the feedback clock, so that the output frequency range of the second frequency divider for maintaining phase-locking, that is, the lock range, can be wider.
In another aspect of the present invention, said second phase comparator detects the phase difference between said reference clock and said feedback clock at a sensitivity lower than that of said first phase comparator. More preferably, a second synchronization control signal is output when the phase difference between the reference clock and the feedback clock exceeds the prescribed range. In a preferred method, said frequency division ratio control part has a range counter that sets the reference frequency division ratio as the count initial value for said second frequency divider, and adjusts the count value corresponding to said second synchronization control signal from said second phase comparator.
The constitution of the second phase comparator and frequency division ratio control part in said second digital phase-locked loop circuit may be the same as that of said first digital phase-locked loop circuit. It is then possible, through a synergistic effect to further reduce output jitter and to improve tracking ability.
In a seventh aspect of the invention, the second frequency divider of both said first and second digital phase-locked loop circuits may have a counter for frequency division that counts the first master clock at the counter operating frequency corresponding to the first synchronization control signal from the first phase comparator. In a more preferred method, the second frequency divider may have a 1-bit counter that counts said first master clock at the counter operating frequency corresponding to the first synchronization control signal from said first phase comparator, and a pre-scaler that counts the clock output from said 1-bit counter and generates said intermediate clock. Here, in a preferred method, the 1-bit counter has the following count modes: a first count mode that counts one for every two clocks of said first master clock, a second count mode that counts three for every four clocks of said first master clock corresponding to the first synchronization control signal from said first phase comparator, which represents the phase delay of said feedback clock with respect to said reference clock, and a third count mode that counts one for every four clocks of said first master clock corresponding to the first synchronization control signal from said first phase comparator, which represents the phase advance of said feedback clock with respect to said reference clock. In this case, if the frequency of the first master clock is fm, in the first count mode, the first master clock is counted at a counter operating frequency of fm/2; in the second count mode, the first master clock is counted at a counter operating frequency of fm/4; and in the third count mode, the first master clock is counted at a counter operating frequency of 3fm/4.
In the figures, 10 represents a phase comparator, 12 represents a control oscillating part, 14 represents a feedback part, 16 represents a feedback frequency divider, 18 represents an intermediate oscillating frequency divider, 20 represents a period measurement circuit, 22 represents a moving average value computation circuit, 24 represents an output clock generator, 26 represents a master clock generator, 28 represents an up/down counter, 30 represents a pre-scaler, 38 represents a phase-lock detector, 40 represents a clock selecting circuit, 52 represents a hold control part, 54 represents a phase comparator, 56 represents a range counter, 58 represents a frequency-lock detection.
The digital phase-locked loop (DPLL) circuit of the present invention makes it possible to reduce output jitter and obtain a stable synchronizing clock; it is also possible to improve the tracking ability of the control oscillation part and expand the lock range.
In the following, preferred embodiments of the present invention will be explained with reference to appended figures.
Feedback part 14 contains frequency divider 16 that generates feedback clock b at 1/M times the frequency division for of output clock j. Phase comparator 10 compares the phase of reference clock a and feedback clock b, and outputs digital synchronization control signals c, d corresponding to the phase difference. More specifically, from the difference in time between the edge of reference clock a and the edge of feedback clock b, the lead/lag relationship or phase difference between the two clocks is detected, and either up-count enable signal c or down-count enable signal d of the square wave pulse is selected and output corresponding to the lead/lag relationship during the period from the edge of the leading clock to the edge of the lagging clock. Here, said up-count enable signal c is output when feedback clock b lags reference clock a. On the other hand, down-count enable signal d is output when feedback clock b leads reference clock a.
Control oscillation part 12 includes frequency divider 18, period measurement circuit 20, moving average value computation circuit 22, and output clock generator 24. Master clocks MCK1, MCK2, and MCK3 from master clock generator 26 are input to frequency divider 18, period measurement circuit 20, and output clock generator 24, respectively.
Frequency divider 18 is a pre-oscillator or intermediate oscillator. It is composed of up/down counter 28 and pre-scaler 30. Said up/down counter 28 is composed of 1-bit counters that count master clock MCK1 according to synchronization control signals c, d from phase comparator 10.
For example, as shown in
In the above arithmetic equation for D, 2% stands for twos complement arithmetic. The remainder obtained by dividing the value in parenthesis by 2 corresponds to D. Also, it is assumed that carry-in Ci (up-count enable signal c) and borrow Bi (down-count enable signal d) cannot be “1” at the same time. That is, as explained above phase comparator 10 either outputs both, up-count enable signal c and down-count enable signal d, but not at the same time, or only one enable signal.
In this way, up/down counter 28 performs the counting operation at a counting frequency of fm/4˜3fm/4 for peak-to-peak with respect to frequency fm of master clock MCK1. Especially, when feedback clock b leads reference clock a, the counting operation is performed in the up-count mode of 3fm/4 corresponding to up-count enable signal c from phase comparator 10. On the other hand, when feedback clock b lags reference clock a, the counting operation is performed in the down-count mode of fm/4 corresponding to down-count enable signal d from phase comparator 10.
As shown in
Period measurement circuit 20 contains a counter for time measurement that operates at master clock MCK2, and as explained above, it measures the time with a period of each intermediate clock g output from pre-scaler 30 taken as count value h. Consequently, for example, when a certain period of intermediate clock g is equal to said reference period, time-measuring count value h equal to said reference frequency division ratio Ns is obtained by period measurement circuit 20 with respect to one period.
Moving average value computation circuit 22 retrieves the period measurement values obtained successively by period measurement circuit 20 for a period of each clock g output from pre-scaler 30 as time-measuring count values h, and computes moving average value i. Typically, A (where A is an integer of 2 or more) consecutive period measurement values h of intermediate clock g obtained from period measurement circuit 20 are sampled, and the average value of the A period measurement values h is determined. On the time axis, the sampling range is shifted at a prescribed shifting pitch, and the aforementioned average value computation is carried out repeatedly, and each average value obtained in time sequence is output as moving average value i. Although the value of the shifting pitch can be selected as desired, it is usually set to “1”, and the sampling for each cycle is performed in the form of picking one period measurement value (h) at the head and one period measurement value (h) at the tail on the time axis in turn. Also, the same function can be realized by means of a lowpass filter.
Output clock generator 24 is a control oscillator of the output section. It contains a counter that counts master clock MCK3, with moving average values i given successively from moving average value computation circuit 22 as preset values, and generates output clock i with each moving average value i used as the period.
As shown in
As explained above, phase comparator 10 compares the phase between the corresponding edges (rising edges or falling edges) of reference clock a and feedback clock b, and, corresponding to the phase difference, either up-count enable signal c or down-count enable signal d is selected and output.
In the case of
In the case of
In this way, in intermediate oscillating frequency divider 18, as a result of tracking synchronization control signals c, d from phase comparator 10, the period of intermediate clock g fluctuates widely. However, the wide variation in the period of intermediate clock g is relieved by calculating the moving average with shift value computation circuit 22, so that it appears as a small variation in moving average value i. In the example shown in
In this embodiment, clock selection circuit 40 is set in feedback part 14. Output clock j from output clock generator 24 and intermediate clock g from intermediate oscillating frequency divider 18 are input to clock selection circuit 40. Under control of phase-lock detector 38, either clock j or clock g is selected and sent to feedback frequency divider 16. In this DPLL circuit, when the phase-locked state is not established, a brief time is required before the period of output clock j, which is defined by a moving average established. Consequently, the time for feeding back the intermediate clock g with a high response sensitivity can be shorter than that for feedback of output clock j with a low response sensitivity.
When this DPLL circuit is designed, for example, so that phase-locking occurs at the rising edges of reference clock a and feedback clock b, the phase difference between reference clock a and feedback clock b will be within the range of ±180° as long as the rising edge of reference clock a and the falling edge of feedback clock b are input alternately and repeatedly. A prescribed amount of time is required to establish an appropriate phase comparison. As will be explained below, in phase-lock detector 38 of this embodiment, the consecutive number of cycles with alternating and repeated rising edges of reference clock a and falling edges of feedback clock b are counted, and the output signal, that is, clock selection signal k, is kept at logic value L (clock selection circuit 40 selects intermediate clock g until the count value exceeds a preset value). Once the count value exceeds the preset value, clock selection signal k goes to logic value H (clock selecting circuit 40 selects output clock j).
RS flip-flop circuit 44 latches outputs a, b of edge detector 42 and holds the following logic values: L for output S[5] when A=H and B=L; H for output S[5] when A=L and B=H; and the logic value for S[5] when A=L and B=L. While output S[5] of RS flip-flop circuit 44 is used as a reference for a flag that records or holds the preceding clock edge input, counter controller 46 retrieves outputs a, b of edge detector 42, and each time the output A=L and B=H appears alternately between the output A=L, B=L and the output A=H, B=L, the 5-bit count value S[4:0] of state counter 48 is incremented by one. Comparator 50 holds the comparison output signal, that is, clock selection signal k at L until count value S[4:0] of state counter 48 exceeds preset value K, and when count value S[4:0] exceeds preset value K, clock selection signal k goes to H. That is, when the rising edge input of reference clock a and the falling edge input of feedback clock b alternate consecutively for K cycles, the determination is made that the phase-locked state is established, and clock selection signal k is switched from L to H. On the other hand, when the output A=H, B=L or the output A=L, B=H occurs twice consecutively with the output of A=L, B=L between them, counter controller 46 resets state counter 48, and count value S[4:0] returns to the initial value “00000”.
As shown in
In the aforementioned example, the rising edge of reference clock a and the falling edge of feedback clock b are combined, and the alternating input of the clock edges is monitored. However, it is also possible to have a combination of the falling edge of reference clock a and the rising edge of feedback clock b. Also, when the design is such that phase-locking occurs between the rising edge of either reference clock a or feedback clock b and the falling edge of the other clock, said alternating inputs with a combination of the rising edges or a combination of the falling edges of said two clocks a, b may also be monitored.
In practical applications, disturbances in reference clock a are determined beforehand, or disturbance in reference clock a may be determined. For example, applications of DVD (digital versatile disc) or other optical disk devices in which the wobble signal is used as the reference clock and its multiplier M synchronization clock is generated, may required that the wobble signal be ignored in defective portions of discs with defective wobble, and also that the period of the synchronization clock have as little disturbance as possible. Hold control part 52 is arranged in the DPLL circuit of this embodiment. In this case, a defect signal is input to hold control part 52 as a hold instruction signal, so that hold control part 52 can stop the arithmetic operations of moving average value computation circuit 22, and the moving average value i is held. As a result, the period of output clock j generated by output clock generator 24 is held at the period immediately before the defect signal is given. For reasons of stability, it is preferred that during the hold time clock selecting circuit 40 of feedback part 14 select the side of output clock j. When the defect signal is released, hold control part 52 starts the arithmetic operation of moving average value computation circuit 22 again.
Like phase comparator 10, phase comparator 54 compares the phase of reference clock a and feedback clock b, and corresponding to the phase difference, outputs digital synchronization control signals m, n. The phase comparator has a lower phase difference detection sensitivity than phase comparator 10, and when the phase difference between the two clocks a, b exceeds a prescribed upper limit (e.g., ⅛ of a period), corresponding to the lead/lag relationship between the two clocks, it selectively outputs either up-count enable signal m or down-count enable signal n of the square wave pulse. Here, said up-count enable signal m is output when feedback clock b leads reference clock a and the phase difference exceeds the upper limit. On the other hand, said down-count enable signal n is output when feedback clock b lags reference clock a and the phase difference exceeds the upper limit. Said upper limit may be for the phase difference obtained in a single phase comparison cycle, or it may be for the accumulated value or the moving average value of the phase difference obtained by means of several phase comparison cycles. Consequently, output signal m, n of phase comparator 54 are not abrupt, and in many cases, even if either of up-count enable signal c or down-count enable signal d is output from phase comparator 10, neither up-count enable signal m nor down-count enable signal n will be output from phase comparator 54 if the phase difference between the two clocks a, b does not exceed the upper limit.
Said up-count enable signal m or down-count enable signal n output from phase comparator 54 is sent to range counter 56. Range counter 56 functions as a frequency division ratio control part of frequency divider 18. Preset value P (a constant value) output to pre-scaler 30 of intermediate oscillating frequency divider 18 in Embodiment 1 is set as the initial value or reference value, and said up-count enable signal m and down-count enable signal n from phase comparator 54 initiate up-counting and down-counting respectively, and reference value P is increased/decreased to generate count value P′. This count value P′ is sent as corrected preset value to pre-scaler 30.
In the case shown in
On the other hand, in the case shown in
As explained above, since up/down counter 28 of frequency divider 18 counts at the counter operating frequency fm/4˜3fm/4 from peak to peak with respect to frequency fm of master clock MCK1, the output frequency of pre-scaler 30 is limited to the range of fm/4P˜3fm/4P. In Embodiment 2, by replacing preset value P of pre-scaler 30 with a variable corrected preset value P′ (P−α˜P+β) (here, α and β are positive numbers), the output frequency of pre-scaler 30 is extended to the range of fm/4(P+β)˜3fm/4(p−α). Here, the ratio of the upper limit to the lower limit is 3(P+β)/(P−α). In said Embodiment 1, α=0, β=0, so that μ=3. In Embodiment 2, for example, if α=0.2P and β=0.2P, then μ=4.5 (1.5-timer). That is, the output frequency of pre-scaler 30 that can maintain the phase locked state is extended 1.5-times, so that the lock range of said DPLL circuit is extended to 1.5-times.
In addition, in this embodiment, frequency-lock detector 58 is used. Frequency-lock detector 58 compares the period measurement value h obtained by period measurement circuit 20 for one period of each intermediate clock g output from pre-scaler 30 with moving average value i obtained by moving average value computation circuit 22, and if the error between period measurement value h and moving average value i is within a prescribed range, it is determined that a frequency-lock has been established. The detection result signal obtained by frequency-lock detector 58 is sent as the same clock selection signal as clock selection signal k from phase-lock detector 38 through AND-gate (60Z) to clock selecting circuit 40. As a result, the lock judgment becomes more reliable, and the overall control more stable. Also, in this embodiment, in said hold mode, hold control part 52 also holds the operation of range counter 56. Also, in this case, control may be performed such that during the hold time, clock j is selected by clock selecting circuit 40.
The aforementioned embodiments are merely examples of the constitution of the various parts. Various modifications can be used within the range of the present invention. For example, the phase comparison and control signal output of phase comparators 10, 54 are merely an example. Any digital scheme may be used as well. Also, the constitution and operation of intermediate oscillating frequency divider 18, especially the operation of up/down counter 28 and pre-scaler 30, are merely examples, and various other frequency division technologies may be used. The same is true for frequency measurement circuit 20, moving average value computation circuit 22, output clock generator 24, frequency division ratio control part (range counter) 56, etc. They may be realized with any digital circuit. Also, in said Embodiment 2, one may also adopt the lock range improvement technology of the DPLL circuit without using a moving average. For example, in said embodiments, one may omit period measurement circuit 20, moving average value computation circuit 22 and output clock generator 24, and use a constitution of the device with clock g generated by frequency divider 18 as the DPLL output.
Number | Date | Country | Kind |
---|---|---|---|
2003-313,979 | Sep 2003 | JP | national |