PLL cycle slip detection

A cycle slip detector interfaces with a phase/frequency detector (PFD), such as might be used in a phase-locked loop circuit (PLL), and indicates when cycle slips occur in the PFD. Typically, the PFD generates output control signals as a function of the phase difference between first and second input signals, with the first input signal usually serving as a reference signal against which the PLL adjusts the second input signal. The PFD provides linear phase comparison between its input signals, provided their relative phase difference does not exceed ±2π radians. If one of the two signals leads or lags the other by more than that amount, a cycle slip occurs, and the PFD responds nonlinearly. The cycle slip detector provides logic for detecting and indicating leading and lagging cycle slips as they occur in the PDF, and is typically implemented as a minimal arrangement of logic gates and flip-flops.

BACKGROUND OF THE INVENTION

The present invention generally relates to frequency synthesis, and particularly relates to PLL-based frequency synthesis.

Radio frequency (RF) communications equipment, such as mobile terminals within a wireless communication system, use precise timing or frequency reference signals to receive and transmit signals. Often, such a reference signal is used to derive additional signals, possibly of higher or lower frequency, but with the stability and accuracy inherent in the reference signal. This frequent need to slave the frequency or timing of one signal to another, or to monitor the phase or frequency difference between two signals, gives rise to specialized circuits, such as the phase-locked loop (PLL).

A general PLL configuration has a controllable oscillator generating an output signal, a detector generating an error signal based on the phase or frequency difference between a feedback signal derived from the output signal and an input reference signal. The PLL generally includes some type of control circuit to adjust the oscillator based on the error signal generated by the detector. In this manner, the oscillator's output signal may be “locked” to the input reference signal. By setting frequency dividing ratios between the reference and the feedback signals, the output signal may be made to have a higher or lower frequency than the input signal. A mobile terminal might generate a stable reference signal with a precisely fixed frequency, and then use a PLL-based frequency synthesizer to generate higher frequency signals used in transmit signal modulation and down conversion of received signals.

Although PLL circuits vary widely in their implementation, the detector generally provides one or more output signals that, in general, are driven by the phase or frequency difference between two periodic input signals. Often, these two input signals represent a reference clock signal and an adjustable clock signal that is locked to the reference clock signal by operation of the PLL. When the detector's output signal(s) are generated as a function of the phase difference between the two input signals, the output signals accurately reflect the phase difference between the two input signals only when that difference is within a defined range. Generally, phase detectors used within PLL circuits cannot provide linear detection when the phase difference between two signals is greater than ±2π radians.

BRIEF SUMMARY OF THE INVENTION

The present invention is a system and method for detecting cycle slip in a phase/frequency detector (PFD). Cycle slip detectors interface with the PFD and provide cycle slip indicator signals whenever they detect cycle slip within the PFD. The indicator signals may be used to drive additional circuitry that operates to minimize cycle slip induced error in the PFD's output signals, or to alert supervisory or other systems. Typically, the PFD is used in a phase-locked loop (PLL) circuit to determine the phase difference between a reference signal and the output signal of a voltage-controlled oscillator (VCO). The PFD generates output pulses responsive to clock edges in the two input signals, with the output pulses typically used to control current flow in a charge pump or pumps that set the voltage of the VCO.

The PFD typically comprises one input flip-flop or similar latching type circuit for each of the two input signals. The input flip-flops are usually configured for rising-edge operation, thus a rising edge, referred to as a clock transition, in the either of the two input signals will cause the corresponding input flip-flop to generate a latched output signal. The PFD further includes a reset circuit that operates to reset the input flip-flops after both of them have asserted their latched output signals. This action resets both latched output signals. The PFD experiences cycle slip whenever a clock transition occurs in either input signal while the reset signal is asserted. Cycle slip also occurs in the PFD if a second clock transition occurs in one or both input signals before the input flip-flops are reset.

Each cycle slip detector includes slip detection logic for a corresponding input flip-flop in the PFD. The slip detection logic is configured to assert a cycle slip indicator signal based on receiving a clock edge in its corresponding input signal while the reset signal is asserted, or before the PFD has been properly reset. A logic circuit detects whenever a corresponding input flip-flop in the PFD has its output control signal asserted, or when the reset signal is asserted. This detection function operates to provide an output flip-flop with a high data signal if either condition exists. This output flip-flop is clocked by the same input signal that clocks the corresponding input flip-flop in the PFD. Thus, if the output flip-flop receives a clock edge in the corresponding input signal during either condition, it generates a cycle slip indicator signal. Once its data input signal is de-asserted, a subsequent clock edge in the corresponding input signal causes the output flip-flop to clear its cycle slip indicator signal.

DETAILED DESCRIPTION OF THE INVENTION

Turning now to the drawings,FIG. 1is a diagram of a phase-locked loop (PLL), generally referred to by the numeral10. The PLL10comprises a phase/frequency detector (PFD)12, a control circuit14, a loop filter16, a voltage-controlled oscillator (VCO)18, and cycle slip detectors20.

In general, the PFD12generates PLL control signals based on the phase difference between two input signals. As shown, the PFD12receives two input signals, one based on the output from a reference clock (typically a crystal oscillator), and one based on the output signal from the VCO18. The PLL10operates to make the VCO output signal have a frequency that is a desired multiple or fraction of the reference clock's output signal. The PFD12generates the PLL control signals as an OUTPUT UP and an OUTPUT DOWN signal for the control circuit14. The OUTPUT UP and OUTPUT DOWN signals cause the control circuit14to adjust the control voltage applied to the VCO18. The control circuit14may, for example, be a charge pump circuit. The loop filter16translates the output from the control circuit14into a smoothed, voltage-mode control signal for the VCO18. In this manner, the VCO18is controlled as a function of the phase difference between the input signals to the PFD12.

Depending upon its specific capability, the PFD12may operate properly for phase differences of up to ±2π radians, but by nature of its operation, the PFD12cannot detect phase differences in excess of this limit in a linear fashion. If the PFD12experiences cycle slip, which essentially means that the PFD12fails to respond to one or more cycles of either of its input signals, its operation becomes nonlinear. That is, the OUTPUT UP/DOWN signals generated by the PFD12no longer reflect the actual phase difference between the input signals. With no ability to detect this cycle slip, the PFD's output signals permanently miss the slipped cycle. The cycle slip detectors20operate to detect and indicate cycle slips as they occur in the PFD12. Cycle slip indicator signals output by the cycle slip detectors20may be used to alert other circuitry within the host system (not shown), or may be used to drive error correction circuitry (not shown) in the PFD12.

Turning now toFIG. 2, the cycle slip detectors20include an up-slip detector20A and a down-slip detector20B. The up-slip detector20A detects cycle slips in the PFD12with respect to the reference signal, while the down-slip detector20B detects cycle slips in the PFD12with respect to the feedback signal. The up-slip detector20A includes a logic gate22A, an output flip-flop24A, and a delay element26A. Similarly, the down-slip detector20B includes a logic gate22B, an output flip-flop24B, and a delay element26B. The PFD12comprises an optional input divider30, input flip-flops32A and32B, and a reset circuit33, comprising logic gate34and delay element36.

If used, the divider circuit30operates to independently divide down the output signal from a reference clock to produce a reference signal. The divider circuit30also divides down the output signal from the VCO18to produce the feedback signal. The divider30allows the PFD12to operate at lower frequencies, and provides a straightforward mechanism for setting the frequency of the output signal from the VCO18to a desired fraction or multiple of the reference frequency. Additionally, the divider circuit30may be made responsive to the UP- and DOWN-CYCLE SLIP signals output by up-slip detector20A and down-slip detector20B, respectively, to correct for detected cycle slips. The co-pending United States patent application entitled, “PLL Cycle Slip Compensation,” details exemplary cycle slip compensation based on the cycle slip indicator signals, and is incorporated herein by reference.

The two input flip-flops32A and32B are made responsive to either the rising edges or falling edges in the two input signals, the reference and feedback signals. As shown, the two input flip-flops32A and32B are rising-edge sensitive. Because its data input is tied high, the input flip-flop32A asserts its OUTPUT UP signal on a clock transition (rising edge) in the reference signal. Similarly, the input flip-flop32B asserts its OUTPUT DOWN signal on a clock transition (rising edge) in the feedback signal. With their data inputs fixed high, the two input flip-flops32A and32B are unresponsive to subsequent clock transitions in the reference and feedback signals, respectively, until reset via their asynchronous reset inputs.

The reset circuit33comprises logic gate34and delay element36and provides the reset signal RST to the input flip-flops32A and32B. In operation, the logic gate34asserts its output whenever both OUTPUT UP and OUTPUT DOWN are latched high by the input flip-flops32A and32B. A short delay after the logic gate34asserts its output signal the delay element36asserts its output signal, RST, which resets the input flip-flops32A and32B. This reset action de-asserts both OUTPUT UP and OUTPUT DOWN, and makes the input flip-flops32A and32B responsive to the next clock transitions in the reference and feedback signals, respectively.

The delay element36determines the delay between assertion of the output signal from the logic gate34and assertion of the RST signal. As soon as the delay element36asserts its output signal RST, the OUTPUT UP and OUTPUT DOWN signals are de-asserted, which causes the logic gate34to de-assert its output signal to the delay element34. In response to this, the delay element36de-asserts its RST signal after its programmed delay. In this manner, the delay circuit36defines the width of the RST signal pulse, which has the net effect of defining the minimum pulse width that occurs on both OUTPUT UP and OUTPUT DOWN signals. Imposing a minimum pulse width on these signals enhances linear operation of the PFD12when the actual phase difference between the reference and feedback signals is quite small. Without benefit of the minimum reset delay imparted by the delay element36, either OUTPUT UP or OUTPUT DOWN would have too narrow a pulse width to effectively control the control circuit14, particularly when it is implemented as a charge pump circuit.

As a charge pump circuit, the control circuit14causes current to flow into the loop filter16when the OUTPUT UP signal is asserted. This action raises the DC voltage output by the loop filter16, causing the VCO18to increase the frequency of its output signal, which increases the frequency of the feedback signal. Conversely, the control circuit14sinks current from the loop filter16when the OUTPUT DOWN signal is asserted, causing the VCO18to decrease the frequency of its output signal. Thus, when the reference signal leads the feedback signal, the output pulses in OUTPUT UP are wider than the pulses in OUTPUT DOWN, and the voltage applied to the VCO18by the control circuit14gradually increases. When the reference signal lags the feedback signal, the pulses in OUTPUT DOWN are wider than the pulses in OUTPUT UP, and the voltage applied to the VCO18by the control circuit14gradually decreases.

As noted, the up-slip detector20A corresponds to the reference signal and to the input flip-flop32A, and the down-slip detector20B corresponds to the feedback signal and the input flip-flop32B. Operation of the up-slip detector20A is discussed in detail, but it should be understood that the discussion fully applies to down-cycle slip detection for the feedback signal using the down-slip detector20B.

Turning now toFIG. 3, a time-aligned series of operating waveforms includes: the reference and feedback signals; the RST signal; the two control signals OUTPUT UP and OUTPUT DOWN; and the two cycle-slip indicator signals UP-CYCLE SLIP and DOWN-CYCLE SLIP.

The left side of the signal waveforms depicts normal operation of the PFD12. The reference and feedback signals are latched by the input flip-flops32A and32B, respectively. Thus, the input flip-flop32A asserts its OUTPUT UP signal on the first clock edge of the reference signal, while the input flip-flop32B asserts its OUTPUT DOWN signal on the first clock edge in the feedback signal. Once both OUTPUT UP and OUTPUT DOWN are asserted, the logic gate34asserts its output signal. However, delay in the delay element36prevents an immediate assertion of RST, which allows OUTPUT UP to remain asserted a minimum time TCPU. Once RST is asserted, both OUTPUT UP and OUTPUT DOWN return low, and the PFD12is ready for the next clock edges in the reference and feedback signals.

The frequency difference between the reference and feedback signals is such that the PFD12is presented with two reference signal clock edges between RST pulses. These are termed first and second clock edges for the following discussion. The first and second clock edges occur between the second and third RST pulses, moving from left to right. From the earlier description of the PFD12, it should be understood that the input flip-flop32A does not respond to the second clock edge, as the first clock edge latched its OUTPUT UP signal high. Consequently, the PFD12misses the second clock edge, causing Cycle Slip1. Note that PFD12manifests Cycle Slip1by incorrectly controlling its OUTPUT UP signal. Specifically, the PFD12fails to re-assert the OUTPUT UP signal as it should have in response to the missed clock edge.

The up-slip detector20A detects Cycle Slip1and asserts its UP-CYCLE SLIP output signal. Specifically, the logic gate22A drives the data input of the output flip-flop24A high as long as the OUTPUT UP signal is asserted. By design, the PFD12asserts and holds the OUTPUT UP signal high upon occurrence of the first clock edge. Thus, the second clock edge clocks the output flip-flop24A while its data input is high, causing it to assert its output signal, UP-CYCLE SLIP.

The second cycle slip, labeled Cycle Slip2, also occurs with respect to the reference signal, but occurs for different reasons. Here, a reference signal clock edge occurs during the RST pulse. The input flip-flops32A and32B are not responsive when their reset input is actively driven, and thus the PFD12misses this transition in the reference signal. Note that the PFD12manifests Cycle Slip2by failing to assert the OUTPUT UP signal in response to the missed clock edge.

Note that the present invention relates to the co-pending application entitled “Slip-Detecting Phase Detector and Method for Improving Phase-Lock Loop Lock Time,” Ser. No. 09/432,987, which was filed on Nov. 2, 1999. The disclosure of this co-pending application is incorporated herein by reference. While related to the subject matter of this earlier filed application, the present invention considers a comprehensive range of conditions that cause, or may cause cycle slip, including circumstances associated with reset conditions of the PFD12.

The up-slip detector20A detects Cycle Slip2and asserts its UP-CYCLE SLIP output signal. Specifically, the logic gate22A drives the data input of the output flip-flop24A high as long as the RST signal asserted, as it is during the reset pulse. With the logic gate22A driving its data input high during the RST pulse, the output flip-flop24A asserts its output signal, OUTPUT UP, if it receives a reference signal clock edge.

If a reference signal clock edge occurs just as the RST pulse is ending, the logic gate22A might not keep the data input of the output flip-flop24A asserted long enough for that clock edge to register a high at the output of the flip-flop24A. In effect, the up-slip detector20A would not reliably register cycle slips occurring at the falling edge of the RST pulse. The delay element26A overcomes this problem by slightly extending the hold time on the falling edge of the RST pulse. The output signal of the delay element26A drives an input of the logic gate22A, with the logic state of this output signal always lagging that of the RST signal by a defined delay. The net effect of this delay is to cause the logic gate22A to continue asserting its output signal for a short period after the RST pulse falls. This delay is small, and will be determined based on the hold timing of the flip-flop24A, and may include other timing considerations as well.

As noted, the above discussion of operation also applies to the detection of down-cycle slips using the down-slip detector20B. Thus, the cycle slip scenarios discussed above with regard to the reference signal equally apply to the feedback signal. Further, it must be noted that while the cycle slip detectors20are shown separate from the PFD12, they may be incorporated within the PFD12if, for example, the PFD12provides cycle slip compensation like that presented in the previously incorporated co-pending application.

FIG. 4is a simplified diagram of a mobile terminal used in a wireless communications network, such as a cellular radiotelephone network, and is generally indicated by the numeral100. The mobile terminal100includes a system controller102and associated memory104, a frequency synthesizer106, a receiver120, a transmitter130, a duplexer/antenna140, and a user interface150. The frequency synthesizer106is implemented in accordance with the present invention.

In operation, the mobile terminal100sends and receives information via radio frequency signaling between it and a remote base station (not shown). The system controller102is typically implemented as one or more microcontrollers (MCUs) that manage the user interface150, and provide overall control of the mobile terminal100. The memory104generally includes application software, default values for constants used in operation, and working space for data.

The user interacts with the mobile terminal100via the user interface150. The microphone152converts user speech signals into a corresponding analog signal, which is provided to the transmitter130for subsequent conversion, processing, and transmission to the remote base station via the duplexer/antenna140. The receiver120receives signals from the remote base station and extracts received audio information, e.g., speech from a remote user, and provides an audio signal for driving a speaker154included in the user interface150. The user interface150further includes a keypad156for accepting commands and data input from the user, and a display158for providing visual information to the user. In short, the user interface150allows the user to send and receive speech and other audio information, to dial numbers, and to enter other data as needed.

The receiver120includes a receiver/amplifier122, a decoding/data recovery module124, and a digital-to-analog converter (DAC)126. In operation, signals are received via the antenna144, and the duplexer142provides signal isolation between received and transmitted signals. Received signals are routed to the receiver amplifier122, which provides conditioning, filtering, and down conversion of the received signal. In digital implementations, the receiver/amplifier122may use analog-to-digital converters (ADCS) to provide the decoding/data recovery module124with successive digital values corresponding to the incoming received signal. The decoding/data recovery module124recovers the audio information encoded in the received signal, and provides the DAC126with digital values corresponding to the received audio information. In turn, the DAC126provides an analog output signal suitable for driving the speaker154.

The transmitter130includes an ADC132, a baseband processor134, a frequency translation module136, and a transmit amplifier138. In operation, the ADC132converts analog speech signals from the microphone152to corresponding digital values. The baseband processor134processes and encodes these digital values, providing error correction encoding and translation into a format suitable for the frequency translation module136. The frequency translation module136provides the transmit amplifier138with a modulated carrier signal at the desired transmit frequency. In turn, the transmit amplifier138generates the RF output signal RFOUTfor transmission to the remote base station via the duplexer/antenna140.

The frequency synthesizer provides one or more frequency signals for use in the mobile terminal100. Typically, the frequency synthesizer106generates reference frequency signals that are used in received signal down conversion, and in transmit signal modulation. The frequency synthesizer106uses one or more PLLs10to generate these signals.

FIG. 5is a diagram of the frequency synthesizer106. The frequency synthesizer106includes two or more PLLs10, and a reference clock40. At least one of the PLLs10incorporates the PFD12and up-/down-cycle slip detectors20A and20B as discussed above. With regard to the earlier discussion, the upper PLL10derives its reference signal from the reference clock40and derives its feedback signal from the output signal OSC OUT1. Likewise, the lower PLL10derives its reference signal from the reference clock40and derives its feedback signal from the output signal OSC OUT2. As noted above, the frequency synthesizer106may incorporate additional PLLs10, to provide multiple reference frequencies for use in received signal processing or transmit signal generation.

The frequency synthesizer106operates under control of the MCU102, with the MCU102setting, for example, the divider ratios used by the divider circuits30in both PLLs10to control the frequency of OSC OUT1and OSC OUT2. The MCU102might also monitor one or more of the PLLs10for cycle slip events as indicated by the UP-CYCLE and DOWN-CYCLE SLIP indicator signals described earlier. Such monitoring might, for example, provide the MCU102with the ability to estimate the time required for achieving a locked condition in the affected PLL10.