CLOCK RECOVERY DIGITAL PHASE-LOCKED LOOP

Abstract: A digital phase-locked loop circuit for recovering an external clock signal from an input serial data stream includes an up/down counter (16) respon­ sive to both the serial data stream and to the clock pulse output of a variable divider (24) driven by an exter­ nal clock (26). The up/down counter counts in a direction which depends upon whether the input data stream leads or lags the variable divider's clock pulse output. The output of the up/down counter drives an n-bit memory (18) and a comparator (20) such that the n-bit memory stores the n most significant bits of the up/down counter for a predetermined period of time and then provides them to the comparator for comparison with the present value of the up/down counter. A binary code is provided to the variable divider (24) to determine its divisor depending upon whether the memory count is greater than, equal to, or less than the present count of the up/down counter. This enables an external clock to be synchro­ nized to the input data stream while removing random noise.

Description: Digital phase-locked loop circuits have been in use as FM demodulators and may be used in any application in which it is desired to synchronize an input data stream with an external clock. Examples of such circuits are shown in "Analysis and Synthesis of a Digital Phase Locked Loop for FM Demodulation", Pasternack and Whalin, The Bell System Technical Journal , December 1968, pages 2207-2237 and "Jitter Reduction of a Digital Phase Locked Loop", Yamashita et al., Proceedings of the IEEE , November 1976, pages 1640, 1641. A problem with digital phase-locked loops is the presence of noise in the input data stream which may be interpreted as data. If registers or counters are used in the phase detector, the noise will be interpreted as data which is out of phase with the output of a voltage controlled oscillator. It would be desirable to filter this noise from the input data stream while at the same time locking an external clock to the input data stream. An article in Electrical Design News Volume 17, No. 6, 15 March 1972, pages 36-39, Cahners Publishing Company, Denver, USA, entitled "Low-Power Digital Phase Locked Loop utilises CMOS Logic" by D. A Johnson describes a phase-locked loop used to lock the locally generated data clock in phase with the received signal. This is done by dividing a high-speed local clock by a variable count. The actual count used is a function of the phase relationship between the zero crossings in the received signal and those of the locally generated signal. The phase comparator used provides an up down command together with the transition pulses to the counter. The clock is divided by 8 to determine an integration period over which the counts of the counter are averaged, and decoders examine the counter at the completion of the integration to determine if the counter is above, below or within threshold. The control logical provides the proper divisor accordingly for the variable clock. SUMMARY OF THE INVENTION The present invention provides a digital phase-locked loop circuit for recovering clock pulses from a pseudorandom serial data stream while at the same time providing noise filtering capability. The invention includes a variable clock which produces a series of clock pulses whose frequency is a function of a coded input signal. An up/down counter responsive to an input data stream and to the clock pulses from the variable clock, counts in one direction when the phase of the data stream leads the clock pulses, and in a second direction when the phase of the data stream lags the clock pulses. A comparator compares a present count of the up/down counter with a previous count and provides a coded signal to the variable clock to increase or decrease the frequency depending upon whether the input data stream leads or lags the output of the variable clock. The comparator utilizes an n-bit memory responsive to the output of the up/down counter for storing the two most significant bits of the counter. The output of the up/down counter is also applied directly to the comparator, and this output is compared with the contents of the n-bit memory. The contents of the memory are delayed for a predetermined period of time before they are gated into the comparator. The delayed output of the n-bit memory is controlled by an m-bit divider which is driven by the variable clock output so that the present most significant bits of the counter are compared with a previous value of the counter. This comparison is used to determine the frequency of the variable clock output. The digital comparator provides control signals to a variable divider circuit which is driven by an external clock generator. The coded output of the digital comparator chooses one of three integral values to be used as the divisor in the variable divider depending upon whether the counter is counting "up" or "down" from its previous value. An integer x is the divisor when the input data stream and the variable clock pulses are in phase (i.e. previous count and present count are the same). The divisor is x +1 when the variable clock pulses lead the input serial data stream (the up/down counter is counting down from the previous count), and is x -1 when the input serial data stream leads the clock pulses (the up/down counter is counting up from the previous count). Since the memory stores the two most significant bits of the up/down counter for a predetermined period of time, the loop is unaffected by random noise which might be interpreted as data. Random noise spikes are ignored because the coded signal at the digital comparator output is a function of the change in only the two most significant bits of the up/down counter. It therefore requires a low frequency condition such as a phase difference between the input data stream and the variable clock pulses which persists for a number of clock cycles to produce a coded signal which changes the divisor of the variable divider. It is a principal object of this invention to provide a clock recovery digital phase-locked loop circuit for locking an incoming serial input data stream to an external clock, thereby recovering clock pulses from the data stream. Yet a further object of this invention is to provide a clock recovery ditial phase-locked loop circuit which filters out the effects of random noise in the serial input data stream. The foregoing and other objectives, features and advantages of the present invention will be more readily understood upon consideration of the following detailed description of the invention taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block schematic diagram of a digital phase-locked loop constructed according to the present invention. DETAILED DESCRIPTION OF THE INVENTION A digital phase-locked loop circuit 10 is responsive to a transmitter 12 which transmits a stream of serial data. The data is applied to a differentiator 14 which produces spikes at the leading and trailing edges of each of the data pulses in the serial data stream. These pulses are applied to an up/down counter 16. The up/down counter 16, which may be a 4-bit counter, includes an output for its two most significant bits which are connected to a 2-bit memory 18. Output lines containing the two most significant bits of the up/down counter 16 are also connected to a digital comparator 20. The 2-bit memory also includes a pair of output lines which apply the two most significant bits of the up/down counter 16 to the digital comparator 20 after a predetermined period of time determined by divider 22. The divider 22 is a 3-bit divider driven by variable divider 24 and provides a gating control to 2-bit memory 18 every eight clock cycles of the output of divider 24. The variable divider 24 is driven by an external clock generator 26 which is, in turn, driven by a reference oscillator 28. The output of the variable divider 24 is applied to a node 30 which includes outputs to divider 22, up/down counter 16 and a latching circuit 32. The input data line is also connected to the latch circuit 32. In actual operation, a serial data stream is transmitted by transmitter 12 where it is provided to latch circuit 32 and also the differentiator 14. Differentiator 14 converts the leading and trailing edges of each pulse in the serial data stream to spikes which are provided to up/down counter 16. The pulse width of the data pulses is larger than the width of the variable clock pulses, and the variable clock pulses are in the form of a series of rectangular pulses of uniform width. Thus, the clock input line to the up/down counter 16 from node 30 is always either high or low, and for equal periods of time. The up/down counter 16 will count up when a data spike occurs when the input line is high, and will count down when the input line is low. Therefore, when the serial data stream and the external clock 26 are in phase, the counter will alternately count up and down on successive data spikes. When the phase between the data input and the external clock shifts, however, the up/down counter will count either up or down depending upon whether the data leads or lags the clock pulses. As the up/down counter 16 begins to count, the two most significant bits of the counter will remain unchanged until the count reaches 4. The two most significant bits are stored in the 2-bit memory 18 but are held there by divider 22 for either cycles of the divided external clock 26 from divider 24. At the same time, however, the same two most significant bits are provided to digital comparator 20. Digital comparator 20 provides an output binary code which instructs variable divider 24 to chose one of three possible divisors. In the preferred embodiment, variable divider 24 is nominally a divide-by-24 divider, but depending upon whether the input data stream leads or lags the divided clock pulses, variable divider 24 may divide by 23 or divide by 25, respectively. The code that is provided to variable divider 24 is a function of whether the delayed values of two most significant bits of up/down counter 16 which are held in 2-bit memory 18 are greater than, equal to, or less than the present value of the two most significant bits of counter 16. Since the two most significant bits of up/down counter 16 change only every fourth count, the system will be unaffected by most random noise. Moreover, since the present state of the up/down counter 16 is compared to a previous state which is held in 2-bit memory 18 for eight clock cycles, only low frequency phase imbalances are detected. Holding the previous state of the up/down counter 16 in 2-bit memory 18 for eight clock cycles filters out small variations in the direction in which the up/down counter 16 is counting. Since changes in phase between the clock pulses from variable divider 24 and the input data stream tend to be low frequency phenomena, these are properly interpreted in the digital comparator 20 as calling for a change in the frequency of variable divider 24, while short-term phenomena such as transient noise are ignored. It should be appreciated that the values chosen for the up/down counter 16, the 2-bit memory 18 and the divider 22 are arbitrary and could be adjusted to meet the needs of the user. In the preferred embodiment, up/down counter 16 is a 4-bit counter, 2-bit memory 18 is a 2-bit memory, and divider 22 is a divide-by-8 clock pulse divider. However, the up/down counter 16 could be as small or as large as desired; the memory 18 could be an n-bit memory, and divider 22 could be an m-bit divider. Moreover, the variable divider 24 could be adjusted to provide for division by integers other than those chosen. The result of use of the circuit 10 is that the clock pulses from variable divider 24 may be utilized to latch the input data stream in latch circuit 32. The data will therefore be valid data which has been filtered and which is synchronized with external clock generator 26. Thus, any clock pulses inherent in a pseudorandom serial data stream may be recovered because the data in latch circuit 32 is synchronized with a known clock. The terms and expressions which have been employed in the foregoing specification are used therein as terms of description and not of limitation, and there is no intention, in the use of such terms and expressions, of excluding equivalents of the features shown and described or portions thereof, it being recognized that the scope of the invention is defined and limited only by the claims which follow.

Claims: A digital phase-locked loop circuit (10) for synchronizing a clock (CLK) to a serial data stream (12), the digital phase-locked loop circuit being of the type having a variable clock means (24-28) for producing the clock, the frequency of which is a function of a coded input signal, and an up/down counter means (16) for counting in a first direction when the phase of the serial data stream leads the clock and for counting in a second direction when the phase of the serial data stream lags the clock, characterized by: comparator means (18-22) for comparing a present count from the up/down counter means with a previous count from the up/down counter means to provide the coded input signal to the variable clock means, the up/down counter means counting transitions of the serial data stream in the first direction when the clock is at a first level and counting the transitions of the serial data stream in the second direction when the clock is at a second level. The digital phase-locked loop circuit of claim 1 further wherein the comparator means is characterized by means (18, 22) for storing the n most significant bits of the count from the up/down counter means for a predetermined period of time before providing the n most significant bits as the previous count to the comparator means for comparison with the n most significant bits of the count from the up/down counter means as the present count. The digital phase-locked loop circuit of claim 2 wherein the storing means is characterized by: an n-bit memory (18) for storing the n most significant bits of the count from the up/down counter means; and an m-bit divider (22) responsive to the clock for controlling the predetermined period of time before the previous count is provided from the n-bit memory for comparison with the present count. The digital phase-locked loop circuit of claim 1 wherein the variable clock means is characterized by: an external clock (26, 28) ; and a variable divider (24) coupled to receive the output of the external clock to produce the clock. The digital phase-locked loop circuit of claim 4 wherein the coded input signal is characterized by a binary code that determines the divisor for the variable divider. A digital phase-locked loop circuit (10) for synchronizing a clock (CLK) to a serial data stream (12) , the digital phase-locked loop circuit being of the type having a variable clock means (24-28) for producing the clock, the frequency of which is a function of a coded input signal, and an up/down counter means (16) for counting in a first direction when the phase of the serial data stream leads the clock and for counting in a second direction when the phase of the serial data stream lags the clock, characterized by: filter means (18-22) responsive to an output from the up/down counter means for providing the coded input signal to the variable clock means to vary the frequency of the clock wherein the coded input signal changes only after a predetermined number of cycles of the clock so that noise in the serial data stream is filtered from the serial data stream. The digital phase-locked loop circuit of claim 6 wherein the filter means is characterized by a comparator (20) for comparing an instantaneous output of the up/down counter means with a delayed output of the up/down counter means. The digital phase-locked loop circuit of claim 7 wherein the filter means is further characterized by: an n-bit memory (18) responsive to the output from the up/down counter means and to a gate signal; and a gating means (22) for gating the contents of the n-bit memory into the comparator as the delayed output after the predetermined number of cycles of the clock. The digital phase-locked loop circuit of claim 8 wherein the gating means is characterized by an m-bit divider responsive to the clock.

Inventors: AGOSTON, AGOSTON, SPARKES, ROBERT G
Applicants: TEKTRONIX, INC.
Application year: 1987
Main classification: H04L7
IPC codes: H03L7, H04L7