This application claims the benefit of priority from Japanese Patent Application No. 2009-222075 filed on Sep. 28, 2009, the entire contents of which are incorporated herein by reference.
1. Field
Embodiments discussed herein relate to frequency measurement circuits.
2. Description of Related Art
In wireless communications, such as digital television broadcasting and cellular phone communication, synthesizers, which generate low-noise clocks at high speeds, may be used in order to transmit high frequency signals and to process high-speed data. Such synthesizers include a Phase-Locked Loop (PLL) circuit that generates a high-frequency clock whose phase is synchronized with the reference clock oscillated by a crystal oscillator.
Related art is disclosed, for example, in Japanese Laid-open Patent Publication No. 2002-76886, Japanese Laid-open Patent Publication No. 2007-110370 and Japanese Laid-open Patent Publication No. 2001-16191, as well as non-patent material, R.B.STASZEWSKI, “All-DIGITAL FREQUENCY SYNTHESIZER IN DEEP SUBMICRON CMOS”, section 5.2 “JUST-IN-TIME DCO GAIN CALCULATION”, ISBN: 0-471-77255-0.
According to one aspects of the embodiments, a frequency measurement circuit is provided with which includes a first counter that counts a number of edges of a clock signal; a counter latch circuit that stores a fist count value of the first counter in response to a reference edge corresponding to a reference clock; a first delay circuit that includes a plurality of first unit delay circuits coupled in series and receives the clock signal; a plurality of first delay latch circuits that latch a respective output among the plurality of first unit delay circuits in response to the reference edge; a first edge detection circuit that detects the edge in the first delay circuit based on the outputs of the plurality of first delay latch circuits; a first calculator that calculates at least one of a cycle and a frequency of the clock signal based on the first count value between two reference edges and position information corresponding to a edge detected between the two reference edges by the first edge detection circuit.
Additional advantages and novel features of the invention will be set forth in part in the description that follows, and in part will become more apparent to those skilled in the art upon examination of the following or upon learning by practice of the invention.
A PLL synthesizer may include a circuit that detects a lock-in state where frequency acquisition has completed in a PLL synthesizer. The lock-in detection circuit detects the lock-in state in response to phase synchronization between a reference clock and a frequency-divided clock signal. The lock-in detection circuit detects the lock-in state of the PLL synthesizer without detecting a high-speed clock frequency, so that the frequency of an output clock signal generated after the lock-in might not coincide with the target frequency.
The reference clock generator 10 generates a reference clock signal CKref with a known frequency or cycle, such as a clock oscillated by a crystal oscillator. The PLL synthesizer outputs an output clock signal CKout having a frequency obtained by multiplying the reference clock signal CKref by the frequency-dividing ratio and having a phase matched with the phase of the reference clock signal CKref.
The PLL synthesizer uses a feedback loop illustrated in
In the phase synchronization state (B-1) illustrated in
In the phase asynchronous state (B-2), the frequency-divided clock signal CKdiv latched at the rising edge of the reference clock signal CKref is at a high level or a low level. Therefore, the AND gate outputs the lock-in signal LOCK at a low level and then locked off.
In the lock-in detection circuit illustrated in
If the output clock CKout is 3 GHz, the periodic error may be 0.05%, 1.5 MHz.
An increase in number of stages of the flip-flop FF leads to a decrease in periodic error but the time for synchronization detection may be prolonged.
In the coarse control mode illustrated in
The PLL synthesizer also includes a control circuit 22 that controls the frequency acquisition of a PLL circuit based on the frequency FCKout of an output clock CKout measured by the frequency measurement circuit 24. The control circuit 22 sets a control code 17 in the VCO 16 based on the frequency FCKout measured in coarse control mode. The PLL synthesizer also includes a lock-in detection circuit 26 for detecting that the frequency FCKout of the measured output clock signal CKout entered an acceptable range of the target frequency Fck and for outputting a lock-in signal LOCK. In
The phase measurement circuit 30 includes a delay circuit that delays the output clock signal CKout to be measured. The delay circuit includes a plurality of unit delay circuits D(1) to D(m). The unit delay circuits D(1) to D(m) may include, for example, a CMOS inverter circuit. The number “m” of stages of the delay circuit may be set so that the delay of the delay circuit may be at least longer than the cycle of the output clock CKout and shorter than, for example, the time of one cycle of the reference clock CKref. The delay of the delay circuit may be shorter than, for example, the time of one cycle of the reference clock CKref even when the position of the rising edge or the falling edge of the clock CKout is detected by a plurality of cycles of the reference clock.
The phase measurement circuit 30 includes a plurality of latch circuits FF1 to FFm that respectively latch a plurality of unit delay circuits D(1) to D(m) of the delay circuit in response to the rising edge or the falling edge, for example, the reference clock CKref. The latch circuit may include a flip-flop that latches input data in synchronization with the reference edge of the reference clock. The phase measurement circuit 30 includes an edge detection circuit 36 that detects the position of the rising edge or the falling edge of the output clock signal CKout based on the outputs of a plurality of the unit delay circuits D(1) to D(m) latched by the respective latch circuits FF1 to FFm.
The inverted outputs of the latch circuits FF1, FF3, . . . on the odd-numbered stages and the non-inverted outputs of the latch circuits FF2, FF4, . . . on the even-numbered stages are input into the edge detection circuit 36, respectively. The edge detection circuit 36 makes a comparison between the outputs of the adjacent latch circuits in order to detect the position of the rising edge of the output clock signal CKout, for example, when the output of the (k−1)-th latch circuit FF(k−1) is at a high level “H” and that of k-th latch circuit FFk is at a low level “L”, respectively, or the falling edge of the output clock signal CKout, for example, when the output of the (k−1)-th latch circuit FF(k−1) is at a low level “L” and that of the k-th latch circuit FFk is at a high level “H”, respectively. The register Reg1 latches the rising edge positions Tr1 and Tr2 or the falling edge positions Tf1 and Tf2 detected by the edge detection circuit 36, respectively.
In
First, the counter CNT1 and the latch circuits FF1 to FFm are reset in response to a reset signal Rst. The counter CNT1 of the phase measurement circuit 30 counts the number of the rising edges of the output clock signal CKout.
In response to the rising edges of the reference clock signal CKref, the counter values C1 and C2 of the counter CNT1 are latched by the register Reg1.
The rising edge of the output clock signal CKout is input into the first-stage unit delay circuit D(1) among the unit delay circuits D(1) to D(m) and then propagated through these delay circuits according to the delay characteristics of the respective unit delay circuits. The outputs of the respective unit delay circuits D(1) to D(m) are latched to the latch circuits FF1 to FFm in response to the rising edges of the reference clock signal CKref, respectively.
The first rising edge of the reference clock signal CKref appears after a certain delay time corresponding to the Tr1 number of the unit delay circuits D(1) to D(m) from the rising edge of the output clock signal CKout corresponding to the counter value C1. Therefore, waveform 36-1 represents the waveform of the output clock signal CKout propagating through the delay circuits. The waveform 36-1 has a time axis direction opposite to that of the waveform of the output clock signal CKout. The edge detection circuit 36 detects the position where a first high level or a first low level is detected among the output levels of the latch circuits FF1 to FFm and then outputs positional information Tr1. Since the first position of latch circuit FFk where the output of delay circuits FF1 to FF(k−1) is at a high level and output of delay circuit FFk is at a first low level is detected, the different edge positions of the clock signal which may exist at FF(k+1) to FFmmay not be detected. The edge detection circuit may detect TR1 and TR2 in a short time using the counter CNT1 and may detect (CycCKout*(C2−C1)+Tr1+Tr2) using the long chain of flip-flop FF's. The number of stages of the delay circuit may be decreased drastically.
The next rising edge of the reference clock signal CKref corresponds to the count value C2 of the counter CNT1. The next rising edge of the reference clock signal CKref appears after a certain delay corresponding to the Tr2 number of the unit delay circuits D(1) to D(m) from the rising edge of the output clock CKout corresponding to the counter value C2. The waveform 36-2 illustrated in
The cycle and frequency of the output clock CKout are obtained based on the rising edge of the reference clock signal CKref, such as the counter values C1 and C2 latched by the reference edge, the position information Tr1 and Tr2 in the delay circuit, the delay time Tinv of the unit delay circuit, and the cycle CycCKref of the known reference clock CKref. The cycle CycCKref of the reference clock CKref is calculated by the following equation.
CycCKref=CycCKout*(C2−C1)+(Tr2−Tr1)*Tinv
“C2−C1” represents the count value obtained between the rising edges of the reference clock signal CKref.
“CycCKout” represents the cycle of the output clock CKout.
“Tr2-Tr1” represents the difference of the position information Tr2 and Tr1. “Tinv” represents the delay time.
From the above equation, the cycle CycCKout of the output clock may be represented as follows.
CycCKout={CycCKref−(Tr2−Tr1)*Tinv}/(C2−C1)
The above calculation may be performed by, for example, the frequency calculation circuit 34 illustrated in
The CycCKref of the reference clock CKref may be one known in the art. The delay time Tinv of the unit delay circuit may be obtained by the unit delay-time measurement circuit 32 illustrated in
In order that phase measurement circuit 30 measure the cycle of output clock CKout at one or multiple cycles of reference clock CKref, a cycle is measured for a short time. The measured cycle and target cycle may be compared and synchronizing detection may be performed in a reduced amount of time.
Since the phase measurement circuit 30 illustrated in
The unit delay-time measurement circuit 32 includes a plurality of delay latch circuits FF and an one-shot pulse generator which includes invertors 42, a XOR(exclusive OR) 46, and an AND 47. By two signal inputs A and BXOR 46 generates short period pulses corresponding to rising and falling edges of reference clock A. The period of those pulses is substantially equal to the delay time of invertors 42. The AND 47 generates the one-shot pulses corresponding to only rising edge of reference clock A based on three inputs signals CLOSE, D, and A. The output one-shot pulses from AND 47 may be stopped based on the control signal CLOSE and remains at a low level. The plurality of delay latch circuits FF latch the plurality of unit delay circuits D(1) to D(2n) of the ring delay circuit in response to a latch signal F generated based on the rising edge of the reference clock signal CKref. The latch signal F obtained by delaying a signal E by the delay time of invertors 43 may be output. The signal E may be generated by the reference clock A, invertors 40, invertors 41, XOR 48, and AND 49 in the same way described about invertors 42, XOR 46, and AND 47. The edge detection circuit 44 detects the position of the one-shot pulse signal E corresponding to a latch signal F in the ring delay circuit based on the outputs of the plurality of unit delay circuits latched by the delay latch circuits FF. The number of stages of the invertors 40, 41, 42, and 43 illustrated in
The unit delay-time measurement circuit 32 includes a counter CNT2 that counts a circulation number of the one-shot pulse signal E which circulates around the ring delay circuit. The count value of the counter CNT2 is reset by a reset signal Reset=H and latched by the latch circuit 45 in response to the latch signal F.
The ring delay circuit includes a switch SW1 provided for the input of the fist-stage unit delay circuit D(1). While the signal G is at a high level, the one-shot pulse signal E is input into the first-stage unit delay circuit D(1). While the signal G is at a low level, the one-shot pulse signal E circulates around the ring delay circuit. Switch SW2 is provided for the input of the unit delay circuit D (n+1), while the reset signal Reset is at a high level, a low-level signal is input into the unit delay circuit D(n+1). While the reset signal Reset is at a low level, the one-shot pulse signal E circulates around the ring delay circuit.
In the unit delay-time measurement circuit 32, a one-shot pulse signal E in synchronization with the rising edge of the reference clock signal CKref is input into the ring delay circuit and circulates around the ring delay circuit.
The counter CNT2 counts up every time the one-shot pulse circulates around the output of the unit delay circuit D (2n). The latch circuit 45 latches the count value I of the counter CNT2 in synchronization with the latch signal F generated based on the reference clock CKref. Then, the latched count value I is output as a count value C11 or C12.
The delay latch circuit FF latches the output of each unit delay circuit in synchronization with the latch signal F. The output of latch is inverted on the odd-numbered state and is delivered to the edge detection circuit 44. The output of latch is not inverted on the even-numbered stage and is delivered to the edge detection circuit 44. The edge detection circuit 44 detects the position of the one-shot pulse signal E among outputs signals from 2n latches, and outputs the position information Eg1 and Eg2.
The unit delay-time measurement circuit 32 measures how many stages of the unit delay circuit a one-shot pulse signal E, which is generated based on the rising or falling edge of the reference clock signal CKref, propagates in the ring delay circuit. The counter CNT2 counts the circulation number of the one-shot pulse signal E. To measure a number of unit delay circuit which is equal to a long period of one reference clock CycCKref, using the ring delay circuit instead of the cascaded delay circuit illustrated in
At time to, the rising reference clock CKref, for example signal A, passes through the inverter 40 and signal B_1 is input into the inverter 41 and an exclusive OR circuit XOR1. In synchronization with the rising edge of the signal B_1, a one-shot pulse signal E having a pulse width corresponding to the delay time of the inverter 41 is generated. Then, the signal B_1 is output as a signal B_3 from each of the inverter 41 and 42 and then input into an exclusive XOR2. In synchronization with the rising edge of the signal A, a one-shot pulse signal D having a pulse width corresponding to the delay time of each of the inverters 40, 41 and 42 is generated. The output signal G of an AND gate AND may be a one-shot pulse signal having a pulse width substantially equal to that of the signal D.
While signal G is at a high level, the switch SW1 couples the input terminal of the unit delay circuit D(1) to the signal E side and inputs a one-shot pulse signal E into the ring delay circuit. After input of the one-shot pulse signal E, the signal G turns to a low level and the switch SW1 couples the input terminal of the unit delay circuit D(1) to the side of the ring delay circuit. The one-shot pulse signal E propagates and circulates through the unit delay circuit D(1) to D(2n) in the ring delay circuit. Here, the one-shot pulse signal E may be a propagation pulse that propagates through the inside of the ring delay circuit.
At time t1, a latch signal F delayed for the inverter 43 from the one-shot pulse signal E turns to a high level, an output from each of the unit delay circuits D(1) to D(2n) is latched into the delay latch circuit FF. At the odd-numbered stage, an inversion signal is input into the edge detection circuit 44. At the even-numbered stage, a non-inversion signal is input into the edge detection circuit 44.
In response to the input signal, the edge detection circuit 44 detects the position Eg1 of the one-shot pulse signal E in the ring delay circuit at time t1. The latch circuit 45 latches count value I at time t1 to output count value C11.
At time t1 illustrated in
If the one-shot pulse signal E is propagated to the output of the final-stage inverter D(2n) of the ring delay circuit, the counter CNT2 counts up output signal H_2n of a high level. As indicated by the arrow 50 shown in
As illustrated in
The frequency calculation circuit illustrated in
The one-shot pulse signal E, which corresponds to a propagation signal, may be generated at arbitrary times.
Edge positions and count values may be detected in synchronization with the reference edge of the reference clock signal CKref having a known cycle.
In operation S12, the counter values C1 and C2 of the counter CNT1 and the edge positions Tr1 and Tr2 are detected at a timing of the reference edge of the clock signal CKref.
In operation S14, both the counter values C1 and C2 and the edge positions Tr1 and Tr2 are stored in the register Reg1. In operation S18, the counter values C11 and C12 of the counter CNT2 and the edge positions Eg1 and Eg2 are detected at a timing of the latch signal F generated based on the reference edge of the reference clock signal CKref. In operation S20, both the counter values C11 and C12 and the edge positions Eg1 and Eg2 are stored in the register Reg2.
The frequency calculation circuit 34 calculates a unit delay time Tinv using the following equation based on the count values C11 and C12, the edge positions Eg1 and Eg2, and the cycle CycCKref of the reference clock CKref.
CcyCKref={(C12−C11)*2n+(Eg2−Eg1)}*Tinv
The cycle CycCKout of the output clock CKout is calculated from the following formula.
CycCKout={CycCKref−(Tr2−Tr1)*Tinv}/(C2−C1)
The inverse number of the cycle CycCKout turns to the frequency of the output clock CKout.
As an application to measure {C1, C2, Tr1 and Tr2} or {C11, C12, Eg1, and Eg2}, two reference edges are set to several cycles of the reference clock CKref, the count values C2 and C1 are increased while the error of the frequency Tinv/(C2−C1) is decreased. If the count values C2 and C1 become large, the time for calculation of cycles may become long.
As illustrated in
In the coarse control mode illustrates in
The fine control circuit 222 outputs a control signal B1 in response to a coarse control mode termination signal A3 from the coarse control circuit 220. The control voltage Vcntrl of the VCO16 is set to the output signal S16 of the filter 14 based on the control signal B1 and the feedback of the PLL synthesizer is activated. The time constant of the filter 14 is set to be short based on the control signal B2 output from the fine control unit 222 and shorten the response time of the filter 14.
In the fine control mode, a lock-in signal LOCK is output when the lock-in detection circuit 26 illustrated in
The controls in fine control mode may be performed by other related art technologies.
The PLL synthesizer, which includes a frequency measuring circuit and the unit delay-time measurement circuit, performs high-precision synchronized detection in fine control mode while shortening the control time in coarse control mode. The time to the lock-in of the PLL synthesizer may be shortened, and the power consumption may be reduced. The frequency measurement circuit and the unit delay-time measurement circuit may be activated, for example, when activating the PLL synthesizer or changing frequency. In other cases, the frequency measurement circuit and the unit delay-time measurement circuit may be deactivated.
Aspects of the present invention have now been described in accordance with the above advantages. It will be appreciated that these examples are merely illustrative of the invention. Many variations and modifications will be apparent to those skilled in the art.
Number | Date | Country | Kind |
---|---|---|---|
2009-222075 | Sep 2009 | JP | national |