Abstract:
A dual-mode detector which has phase-detection and phase-and-frequency-detection modes of operation, each mode of operation having the same gain. The detector includes a detection and feedback circuit for detecting phase and frequency differences, and for generating first and second feedback signals for controlling the voltage-controlled oscillator in response to the phase and frequency differences. A mode-switching circuit switches the detection and feedback circuit between the phase-detection and the phase-and-frequency-detection modes of operation. A programmable delay circuit delays signals from the mode-switching circuit and provides delayed signals to the detection and feedback circuit. Finally, an optional edge detection circuit converts predetermined data signals to a format recognizable by the detection and feedback circuit.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to phase-locked loop circuitry, and more specifically to a phase-and-frequency mode/phase mode detector with the same gain in both modes. 
     Phase-locked loop (PLL) circuits are widely used in electronic systems for clock recovery, frequency synthesis, and many other applications. PLL circuits are discussed in the following references: 
     1. &#34;Phaselock Techniques&#34;, by Floyd M. Gardner, John Wiley &amp; Sons, 1979. 
     2. Phase-locked Loops-Theory, Design, and Applications, by Dr. Roland E. Best, McGraw-Hill, 1984. 
     These references are hereby incorporated by reference. 
     A phase detector is usually required to compare the phase difference between a PLL clock signal and a reference signal. The requirements of a phase detector are determined by its application. For example, in a PLL circuit for frequency synthesis, the phase detector must also be able to detect frequency differences before measuring phase differences. However, in other applications, a phase-only detector may be required if the input reference signal is not a periodic waveform. 
     For example, for clock recovery in the read channel of a disk drive, a PLL circuit must lock to a crystal clock source during the initial power-up period or during the period in which the drive is not reading data from the disk. Since it is possible to have the PLL circuit driven out of frequency lock by a write-splice, it is important for the PLL circuit to be able to detect both phase and frequency difference during those periods. When the disk drive starts reading data, the PLL circuit has to remain locked at the crystal clock frequency. If the industry standard Modified Frequency Modulation (MFM) encoding scheme is employed, the frequency of the data may vary by a factor of two. Since the rising edge of the data pulse is located at the center of a bit cell and the rising edge of the clock pulses are located at the beginning of a bit cell, the frequency of the PLL clock signal must be twice the data rate. Thus, to avoid locking to the sub-harmonics of the crystal frequency, a phase-only detector must be used when the drive is reading data from the disk. 
     A common solution to the problem is to switch between two phase detectors in the PLL circuit: a phase-only detector and a phase-and-frequency detector. However, it is difficult to design a PLL circuit with two phase detectors, since the gains of the detectors may not be the same. Consequently, a complicated circuit may be required to compensate for the difference in detector gains. 
     Therefore, it would be desirable to produce a phase detector which may be used for both phase-only and phase-and-frequency operation and whose gain does not change when switched from one mode to the other. 
     SUMMARY OF THE INVENTION 
     In accordance with the teachings of the present invention, a dual-mode detector is provided. The detector includes a detection and feedback circuit for detecting phase and frequency differences between a clock signal and an output signal from a voltage-controlled oscillator in the phase-and-frequency-detection mode, for detecting phase differences between a data signal and the output signal from the voltage-controlled oscillator in the phase-detection mode, and for generating first and second feedback signals for controlling the voltage-controlled oscillator in response to the phase and frequency differences. A mode-switching circuit switches the detection and feedback circuit between the phase-detection and the phase-and-frequency-detection modes of operation. A programmable delay circuit delays signals from the mode-switching circuit and provides delayed signals to the detection and feedback circuit. Finally, an optional edge detection circuit converts predetermined data signals to a format recognizable by the detection and feedback circuit. 
     It is a feature of the present invention that the dual-mode detector of the present invention has two modes of operation, a phase-detection mode and a phase-and-frequency-detection mode. 
     It is another feature of the present invention that the gain of the dual-mode detector is the same for each operating mode. 
     It is another feature of the present invention that the dual-mode detector recognizes a plurality of different data formats. 
     It is yet another feature of the present invention that the dual-mode detector includes programmable delay. 
     It is accordingly an object of the present invention to provide dual-mode detector. 
     It is another object of the present invention to provide a dual-mode detector which has a phase-detection mode of operation and a phase-and-frequency-detection mode of operation. 
     It is another object of the present invention to provide a dual-mode detector having a gain which is the same for each operating mode. 
     It is yet another object of the present invention to provide a dual-mode detector which is universal in application, being able to accept a plurality of different data formats and a plurality of different data rates. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Additional benefits and advantages of the present invention will become apparent to those skilled in the art to which this invention relates from the subsequent description of the preferred embodiments and the appended claims, taken in conjunction with the accompanying drawings, in which: 
     FIG. 1 is a block diagram of a phase-locked loop (PLL) circuit containing the dual-mode detector of the present invention; 
     FIGS. 2A and 2B form a schematic diagram of the dual-mode detector of the present invention; 
     FIG. 3 is a schematic diagram of a particular type of delay cell within the delay circuit of the dual-mode detector; 
     FIG. 4 is a schematic diagram of an edge-detection circuit for allowing the dual-mode detector to operate with other data formats; 
     FIG. 5 is a first timing diagram illustrating operation of the dual-mode detector; 
     FIG. 6 is a second timing diagram illustrating operation of the dual-mode detector; 
     FIG. 7 is a third timing diagram illustrating operation of the dual-mode detector; and 
     FIG. 8 is a fourth timing diagram illustrating operation of the dual-mode detector. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to FIG. 1, PLL circuit 10 includes dual-mode detector 12, charge pump 14, loop filter 16, and voltage-controlled oscillator (VCO) 18. 
     Dual-mode detector has a phase-detection mode and phase-and-frequency-detection mode. In the phase-detection mode, dual-mode detector 12 detects a phase difference between a PLL clock signal (PLL clock) and an incoming data signal (data). The data signal may be encoded in one of many formats, such as an MFM data signal. In the phase-and-frequency-detection mode, dual-mode detector 12 detects a phase and a frequency difference between the PLL clock signal and a crystal clock signal (clock) in order to become locked at the crystal clock frequency. In either mode, dual-mode detector 12 produces &#34;voltage up&#34; and &#34;voltage down&#34; feedback signals for causing VCO 18 to stabilize at a constant frequency. 
     Dual-mode detector 12 includes detection and feedback circuit 20, delay circuit 22, mode-switching circuit 24, programmable divider 26, and optional edge-detection circuit 28. Detection and feedback circuit 20 detects phase differences and generates the voltage up and voltage down signals. 
     Delay circuit 22 delays the data signal when the clock signal leads the data signal in order to allow detection and feedback circuit 20 to detect a phase difference. Preferably, delay is selectable. 
     Mode-switching circuit 24 switches dual-mode detector 12 between phase-detection and phase-and-frequency-detection modes of operation. 
     Programmable divider 26 divides the output signal from VCO 18 by a predetermined number in order to produce a predetermined PLL clock frequency. The predetermined number is determined by the amount of delay selected. Programmable divider 26 may be any commercially available divide-by-n circuit. Preferably, delay is about one fourth of a bit cell for MFM data, which means that the predetermined number is four. 
     Edge-detection circuit 28 may be necessary to convert certain data formats to a format that dual-mode detector 12 can process. 
     VCO 18 produces an output signal whose frequency varies with input voltage. Preferably, VCO 18 is a high-speed ring oscillator based on a differential amplifier design, which provides a high degree of noise immunity and a good output duty cycle. Delay is inherent in such a design and must be considered when programming delay circuit 22. 
     Loop filter 16 contains capacitive elements which control the voltage input to VCO 18 in response to voltage up and voltage down signals from dual-mode detector 12. 
     Charge pump 14 receives voltage up and voltage down corrective feedback signals from dual-mode detector 12. It charges and discharges capacitive elements within loop filter 16 in response to voltage up and voltage down signals, in order to lock the PLL clock frequency to the crystal clock frequency in the phase-and-frequency-detection mode, and to lock the rising edge of the PLL clock signal to the rising edge of the data signal in the phase-detection mode. 
     Turning now to FIGS. 2A abd 2B, dual-mode detector 12 is shown in more detail. Detection and feedback signal circuit 20 is similar to the circuit found in the incorporated reference by Best on page 8, Table 2-1, and includes NAND gates 30-44, AND gate 46, and inverters 48-54. NAND gates 38 and 40, and 42 and 44 form SR-type flip-flops. PLL clock signal couples to dual-mode detector through inverter 50. Delayed data signal (phase-detection mode) and crystal clock signal (phase-and-frequency-detection mode) couple to inverter 48. Voltage up and voltage down signals output from inverters 52 and 54. Operation of detection and feedback circuit 20 may be found in the incorporated reference. 
     Delay circuitry 22 may be any circuit for delaying a signal, although the preferred design includes a series of delay cells 56. A preferred delay cell 56 is based on an amplifier design and includes inverter 58, transistor 60, and capacitor 62 (FIG. 3). Data signal (phase-detection mode) and crystal clock signal (phase-and-frequency-detection mode) couple to inverter 58. The output voltage of loop filter 16 couples to transistor 60. Here, transistor 60 is a field-effect transistor (FET), with the output voltage of loop filter 16 being coupled to the gate of the FET. 
     Delay is programmable by selecting one of the outputs of multiplexer 64. For example, for a four-input multiplexer 64, a two-bit input is required. The amount of delay is determined by the data rate, the encoding scheme, and allowable phase jitter in the data stream. For MFM data, a delay of one-fourth of the bit cell period of the data signal may be employed to achieve the maximum allowable phase jitter. 
     Since delay circuit 22 is controlled by the same voltage that controls the output frequency of VCO 18, the delay is proportional to the period of the VCO output signal. For example, if the data signal is formatted as an MFM data signal, the PLL clock signal may have a frequency that is twice the frequency of the data signal. Thus, for a 5-cell VCO, a 10-cell delay circuit would be required to produce a delay equal to the period of VCO 18. 
     Mode-switching circuitry 24 includes multiplexer 66, D-type flip-flop 68, NAND gate 70, and NOR gates 72 and 74. Mode signal controls multiplexer 66 and couples to NOR gate 72. Output Q of D-type flip-flop 68 couples to NOR gate 72 as well. D-type flip flop 68 is coupled to crystal clock or data signal through multiplexer 66. D-type flip-flop 68 is reset by a signal from NAND gate 70. The data input is coupled to voltage V DD . NAND gate 70 receives data edge and clock edge signals from detection and feedback circuit 20. Data edge signal is generated by NAND gate 30, while clock edge signal is generated by NAND gate 36. NOR gate 74 receives inputs from NOR gate 72 and AND gate 46. NOR gate 74 outputs to NAND gates 32 and 34. 
     Edge-detection circuitry 28 is not necessary for processing MFM formatted data. For formats such as NRZ, NRZI, or bi-phase formatted data, which have timing information embedded in both edges, edge-detection circuit 28 includes inverters 76-82 and exclusive nor (EX-NOR) gate 84 (FIG. 4) for generating a short pulse which has rising and falling edges which can be easily detected by mode-switching circuitry 24. 
     Turning now to FIGS. 5-8, the operation of dual-mode detector 12 may be understood by comparing signals at various points in the circuit of FIG. 2. In the phase-detection mode (MODE signal is at logical &#34;0&#34; state), dual-mode detector 12 is enabled when there is a rising edge in the incoming data stream. The output of multiplexer 66 switches to data signal. A rising edge in the data stream causes the &#34;enable&#34; signal from NOR gate 72 to be asserted. When the &#34;data edge&#34; signal from NAND gate 30 and &#34;clock edge&#34; signal from NAND gate 36 are asserted, the phase comparison is complete for the current bit cell and the &#34;enable&#34; signal is deasserted. Dual-mode detector 12 then awaits the next rising edge of the data signal. 
     Since the phase comparison is triggered by the rising edges of the data stream, a missing pulse in the bit cell, which is equivalent to a frequency difference, will be ignored when dual-mode detector 12 is in the phase-detection mode. 
     Dual-mode detector 12 is in the phase-and-frequency-detection mode when the mode signal is asserted (MODE signal is at logical &#34;1&#34; state). The output of NOR gate 72 is low because mode signal is high. Thus, standard phase-locked loop operation occurs as only the output of AND gate 46 determines the output of NOR gate 74. Mode-switching circuit 24 is effectively disabled. 
     Dual-mode detector 12 may be switched to the phase-detection mode by deasserting the mode signal (logic &#34;0&#34; state). Switching from the phase-detection mode to the phase-and-frequency-detection mode preferably occurs automatically. Data edge and clock edge signals from the outputs of NAND gates 30 and 36 reset D-type flip-flop 68 through NAND gate 70. 
     FIG. 5 illustrates the case in which the clock signal lags the data signal and the data and clock signals have the same frequency. Phase difference can be measured since the rising edge of the clock signal occurs after dual-mode detector 12 is enabled by the rising edge of the data signal. 
     FIG. 6 illustrates the case in which the clock signal leads the data signal in phase and the data and clock signals have the same frequency. The phase difference cannot be measured because dual-mode detector 12 has not been enabled. Therefore, the data signal is delayed by delay circuit 22 and the phase difference between the delayed data signal and the PLL clock signal is measured. 
     FIGS. 7 and 8 represent normal phase-locked loop operation in the phase-and-frequency-detection mode of operation. FIG. 7 illustrates the case in which the PLL clock signal lags the crystal clock signal and the PLL clock and crystal clock signals have different frequencies. 
     FIG. 8 illustrates the case in which the PLL clock signal leads the crystal clock signal and the PLL clock and crystal clock signals have different frequencies. 
     Although the present invention has been described with particular reference to certain preferred embodiments thereof, variations and modifications of the present invention can be effected within the spirit and scope of the following claims.