CLOCK PHASE SHIFTING METHOD AND APPARATUS

Abstract: A circuit for providing a phase controlled clock output (22) includes a ring oscillator (34) having a delay line (38) for providing an internal clock signal whose period varies with on-chip variations due to temperature, voltage, and process. The circuit also includes a clock phase select circuit (16) having a counter (24) and divider (26) for determining the number of delays in one external clock period and an input for a phase select value. A delay line (18) having delay elements similar to those of the ring oscillator (34) provides multiple delayed clock signals from the reference clock signal. A multiplexor (32) having odd and even sides is used to select the desired clock signal in a glitchless manner. The phase controlled clock signal output (22) is controlled by the phase select signal and is compensated for on-chip variations due to temperature, voltage, and process.

Description: CLOCK PHASE SHIFTING METHOD AND APPARATUS This invention relates to method and apparatus for phase shifting a reference clock signal and is particularly concerned with providing a phase controlled clock signal which is relatively stable over a range of variations caused by temperature, process, and voltage. Silicon CMOS integrated circuits introduce wide time differences or deltas between their best case propagation delays and their worst case propagation delays. The deltas are primarily due to operating temperature variation, supply voltage variation and chip processing variation. An object of the present invention is to provide an improved circuit for phase shifting a reference clock signal. In accordance with an aspect of the present invention there is provided a method of providing a phase controlled clock signal, in an integrated circuit comprising the steps of: providing an internal reference clock signal generated on-chip; providing an external reference clock signal generated off-chip having a period shorter than that of internal reference clock signal; determining an integral number of external reference clock signal periods in one internal reference clock signal period; providing a phase select value indicative of a desired phase shift from the external reference clock signal; providing a plurality of delayed clock signals derived from the external reference clock signal; and selecting one of the plurality of delayed clock signals in dependence upon the integral number of external reference clock signal periods and the phase select value. Preferably, the step of providing an internally generated reference clock signal includes the steps of providing an on-chip ring oscillator, including a delay line, and having a clock signal period T ocs , which is dependent upon temperature, process, and voltage variations and frequency dividing the clock signal by an integral value n to provide the internal reference clock signal having a period nT 0 sc* Preferably, the step of providing a plurality of delayed clock signals includes the steps of providing a delay line having a plurality of delay cells similar to the delay line of the ring oscillator, inputting the external reference clock signal into the delay line, tapping the delay line after each of the plurality of delay cells to provide the plurality of delayed clock signals. Conveniently, the step of selecting includes subtracting from the number of delays a predetermined delay to compensate for delay in selecting. In accordance with another aspect of the present invention there is provided an apparatus for providing a phase controlled clock signal on an integrated circuit comprising: a ring oscillator including a delay line for providing an internal reference clock signal; an input for an external clock signal; an input for a phase select value; a circuit for determining an integral number of delays in one period of the external clock signal, connected to the ring oscillator and the input for the external clock signal; a circuit for deriving a number of delays for the desired phase shift, connected to the circuit for determining an integral number of delays and the input for a phase select value; a multitapped delay line connected to the input for the external clock signal for providing a plurality of delayed clock signals; and a multiplexor connected to the multitapped delay line and the circuit for deriving a number of delays for selecting one of the plurality of delayed clock signals. Preferably, the circuit for determining an integral number of delays includes a counter connected to the ring oscillator and the input for the external clock signal and having an output and a divider connected to the output of the counter for dividing a value from the counter by a predetermined integer characteristic of the ring oscillator. Preferably, the circuit for deriving a number of delays for a desired phase shift includes a multiplier connected having a first input connected to the circuit for determining an integral number of delays and a second input connected to the input for a phase select value and an output for a number of delays value. Conveniently, the circuit for deriving a number of delays for a desired phase shift includes a subtractor connected to the output for a number of delays value for subtracting from the value a predetermined delay. An advantage of the present invention is providing a desired clock phase output for a given phase select value. The programmable nature of the phase selection allows embodiments of the present invention to be implemented in a variety of integrated circuit technologies, in entirely digital circuits, which can be tested using digital testing techniques. The present invention will be further understood from the following description with reference to the drawings in which: Fig. 1 illustrates, in a block diagram, a clock phase shifting circuit in accordance with an embodiment of the present invention; Fig. 2 illustrates, in a block diagram, the multitapped delay line and multiplexor of Fig. 1; Fig. 3 illustrates, in a flow chart, a state machine for converting φ* n to mux-value; Fig. 4 graphically illustrates a timing diagram for the signals of Fig. 2; and Fig. 5 schematically illustrates the circuit for converting the mux-value, odd/NOT even signals to even- select, odd-select, NOT even-4th-stage and NOT odd-4th- stage. Referring to Fig. 1, there is illustrated, a clock phase shifting circuit in accordance with an embodiment of the present invention. The circuit includes a clock input 10, a phase selection input 12, an internal clock circuit 14, and a clock phase selection circuit 16. The clock phase selection circuit 16 includes a multitapped delay line 18 and a multiplexor (MUX) 20 for providing a phase controlled clock output at an output 22. The clock phase selection circuit 16 also includes, in series connection, a counter 24, a divider 26, a multiplier 28, and a subtractor 30. The clock input 10 and the internal clock circuit 14 are connected to the counter 24. The phase selection input 12 is connected to the multiplier 28. The output of the subtractor 30 is connected to a select input 32 of the MUX 20. The internal clock circuit 14 includes a ring oscillator 34 and a frequency divider 36, that together provide the internal reference clock connected to the counter 24. The ring oscillator 34 comprises a delay line 38 having a plurality of series connected buffers 40 and a feedback path 42. The multitapped delay line 18 comprises a plurality of series connected buffers 44. The buffers 40 and 44 are identical in the respect that delays through them are the same and are equally affected by process, temperature and voltage variations. The multitapped delay line 18 is tapped following each buffer 44, with each tap connected to inputs of the MUX 20. In operation, the circuit of Fig. 1 provides a phase controlled clock signal from a reference clock signal in response to a phase selection value. The reference clock signal, having a clock period T re f, is applied to the clock input 10 and the phase selection value φ, ranging from 0 to 1, is applied to the phase selection input 12. The reference clock signal is also applied to the multitapped delay line 18 to produce multiple phase-shifted clocks which are input to the MUX 20 for selection of the desired clock phase to be provided at the output 22 as the phase controlled clock signal. The selection of the desired clock phase is dependent upon the output of the ring oscillator 34 and the phase select value at input 12. The ring oscillator 34 is used to monitor the variation in buffer delay due to process, temperature, and voltage. The phase select value ranges from 0 to 1 corresponding to a desired clock phase 0' to 360', respectively, relative to the reference clock signal. For the ring oscillator 34, given that the delay through each of the plurality of buffers 40 is.δ, and there are 1 buffers in the delay line, the period of oscillation of the ring oscillator, TQSC- is given by: T OS c =21δ (1) . Since TQSC is directly proportional to buffer delay δ, variations in the buffer delay δcan be monitored by monitoring the ring oscillator period TQSC- A convenient way to monitor T osc is to measure the number of reference clock periods, T re f, in one oscillator period, T σ sc • However, as the sampling error is proportional to T re f/Tosc- it is preferred to lengthen the period being sampled. In the embodiment of the invention of Fig. 1, this is accomplished by the frequency divider 36. The output of the frequency divider 36 provides an internal clock signal having a period, nτ 0 sc- where n is the integral divisor used by the frequency divider 36. The lengthened oscillator period is still proportional to the buffer delay δ and can be used to monitor it. The counter 24 uses the internal clock period nT osc to determine a number, N, of reference clock periods T re f in one internal clock period. Thus, N is given by: N = nT^ = 2lδn (2) * ■ ref * * «/ assuming the sampling error is small enough to ignore. The propagation delay through a single buffer 38 is given by: If identical elements, ' with respect to delay, are used in the ring oscillator 34 and the multitapped delay line 18, then: δosc = δdelayline, with an error proportional to the skew in process, temperature and voltage across the chip. The output of counter 24, N, is applied to the divider 26 as the divisor. The dividend used by the divider 26 is the constant 2nl. The output of divider 26, the quotient 2nl/N, which approximately equals the ratio T ef/δ (ignoring the sampling error) , is applied as input to the multiplier 28. The phase selection value φ, which ranges from 0 to 1, is used to provide the programmed internal delay Δp rθ g, and provides the desired clock phase given by: pr <, s = Tr f ( 4 ) . A number of delay elements, φn- required to produce the programmed internal delay, Δp rθ g, is given by: _ A. ro . _ 2nlφT rtf = 2nl Ψn δ NT^ N In the phase selection circuit 16, the phase selection value φ is used by the multiplier 28 to multiply 2nl/N to provide the number φ n to be applied to the subtractor 30. The number φn could be used to select the number of buffer delays by applying it directly to the select input 32 of MUX 20 if there were no delays introduced by the clock phase selection circuit 16 and the MUX 20. These delays also vary with process, temperature and voltage. By using circuitry in the clock phase selection circuit 16 and the MUX 20 that varies in the same way as the ring oscillator 34, the delays can be represented as an integral number of buffer delays, δ, with a maximum error of one-half δ. The integral number can be thought of, in terms of buffer delays, as a fixed delay value, Δfixed- which is a function of the circuitry used in the clock phase selection circuit 16 and the MUX 20. The fixed delay value, Δfiχ e d- is used to compensate for internal circuit delay. The compensated number of delay elements, φ'n* is given by: . - -^ ( 6 ) . Both N and φn involve sampling that introduces errors of as much as one-half of their least significant bit. Thus the equation for δ (equation 3) and the equation for φn (equation 5) become the following when sampling errors are considered: By substituting equation 7 into equation 8, a maximum error in selected phase , ξ, is given by: In a particular embodiment of the present invention, the ring oscillator 34 includes inverters connected back-to- back with the load on each controlled to be equal to the load on the inverters of the delay line 18. The ring oscillator includes circuitry to allow it to be reset to a known state so that multiple oscillations can be cleared without powering down. The total length of the ring oscillator, 1, is 35. In a particular embodiment of the present invention, the frequency divider 36 includes six flip-flops clocking each other thereby providing a clock output divided down by n = 64. In a particular embodiment of the present invention, the counter 24 used to generate the value of N comprises a 9-bit binary counter. The counter counts for a complete oscillation of the internal clock period nT Q sc- Tne counter is capable of starting on a rising or falling edge thereby reducing synchronization delay with the asynchronous output of the frequency divider. With regard to the particular embodiment of the present invention having 1=35 and n=64, the maximum phase error given by equation 9 are summarized in Table A. Frequency of Process Value of N Maximum Phase Operation Variation Error 16 MHz worst 47 1.0 ns best 14 2.4 ns 25 MHz worst 74 0.6 ns best 22 1.0 ns 33 MHz worst 89 0.5 ns best 27 0.7 ns 40 MHz worst 118 0.4 ns best 36 0.4 ns Table A Referring to Fig. 2, there is illustrated, in a block diagram, the multitapped delay line 18 and MUX 20 of Fig. 1 in accordance with a preferred embodiment of the present invention. The Mux 20 includes odd and even multiplexors 50 and 52, each having three cascaded stages and a shared fourth stage multiplexor 54. The odd multiplexor 50 includes inputs from odd inverters 44, an odd select input 56, and an output 58. The even multiplexor 52 includes inputs from even inverters 44, an even select input 60, and an output 62. The fourth stage multiplexor 54 includes inputs 64 and 66 from the odd and even multiplexors 50 and 52, respectively, odd and even select inputs 68 and 70, respectively, and the phase controlled clock output 22. In the preferred embodiment, the multitapped delay line 18 includes 128 inverters connected back-to-back, each having a three-state buffer output. The load on each inverter is identical to that of the inverters of the ring oscillator. The MUX 20 has the following attributes: equal delay through all paths, any of 128 delay line inputs selectable from which buffered and inverted versions are created, effectively doubling the number of delay line inputs, and an ability to move to adjacent inputs without introducing glitches into the clock output. In operation, the reference clock signal, at input 10, enters the multitapped delay line 18 and progresses through all 128 inverters 44. The outputs from inverters numbered 0, 2, 4, ..., 126 enter the even multiplexor 52, the outputs from inverters numbered 1,3, 5, ... , 127 enter the odd multiplexor 50. The first stage of each multiplexor 50 and 52 reduces these 64 inputs into 8 possible selections. Each of these is buffered and inverted to create 16 signals. These 16 signals pass through two additional levels of multiplexing until a single signal is selected from the odd and even multiplexors 50 and 52 and provided at outputs 58 and 62, respectively. The fourth stage multiplexor 54 selects between these two signals, making the transition once the inactive half of the multiplexor has stabilized. Equal delay through all paths is achieved by careful selection of the components in the clock path and by control of the circuit layout to ensure equal loading, as is known to one of ordinary skill in the art. Glitchless transition between adjacent input is achieved by dividing the MUX 20 into two halves, one odd and one even. As moving to an adjacent input means going from an odd input to an even one, or vice versa, the multiplexor freezes the active half while the inactive half is being set up. Once the inactive half has been set up and all glitches have had time to settle out, the fourth stage multiplexor 54 makes the odd-to-even or even-to-odd transition while the clock signal is low. The doubling of input signals (buffering and inverting) within the MUX 20 provides an economy of gates that takes advantage of the fact that an inverted clock signal is the same as one delayed 180 degrees. This is possible if the clock signal has a 50% duty cycle and the delay through the inverter is accounted for. Referring to Fig. 3, there is illustrated in a flow chart a state machine for converting φ' n to mux-value of Figs. 4 and 5. A block 100 queries whether calculations for φ' n are complete, a no causes a loop back to the block 100. A yes to the block 200 leads to a block 102 that eliminates obvious error conditions on φ' n by setting Φn" = Φn' - x 180° value. A block 104 determines the shorter path from mux-value to φ n " and assigns up/down approximately. A block 106 queries whether φ n " = mux-value. A yes returns the state machine to the block 100. A no leads to a block 108 representing a wait state. During this wait state the resynchronized signals (NOT even-4th-state) and (NOT odd-4th-stage) switch. Following the wait state a block 110 sets either to-oddn or to-evenn to equal zero dependent upon the value of φ n "<0> unless odd/NOT even equals φ n "<0>. This leads to a block 112, that increments or decrements the mux-value by one in dependence upon the values of to_oddn, to_evenn and up/NOT down. Referring to Fig. 4, there is graphically illustrated a timing diagram for the signals of Fig. 2. Multiplexor control circuits, not shown in Figs. 1, 2, and 4, operating in accordance with the state flow diagram of Fig. 3 convert the multiplexor position and timing signals, mux_value, to_odd, to_even, and odd/NOT even, to select signals for all four stages of MUX 20. These select signals are even_select, NOT even_4th_stage, odd_select, and NOT odd_4th_stage. The sequence of events labelled: A, B, C, D, E, F, Al, Bl, Cl, Dl, El, FI on Fig. 4 represent a complete cycle for the MUX 20 that is an output from both the even multiplexor 52 and the odd multiplexor 50. In detail, the sequence is as follows: A) Latch the current odd value; B) Schedule the mux clock output to switch in three clock periods 120 from now; C) Open the even side latches so the even side buffers of the mux can be selected but not enabled yet; D) Enable the even side buffers (but not the final stage) ; E) Enable 122 final stage, mux output = even side; F) Disable the whole odd side of mux (power down) ; Al) Latch the even side latches; Bl) Schedule the mux clock to switch over in three clocks 124 from now; Cl) Release the old odd value; Dl) An odd mux value is applied to the mux input to prepare for switch over by enabling the odd side of the buffer (but not the final stage) ; and El) Enable 126 final stage, mux/output = odd side. Referring to Fig. 5 there is schematically illustrated the circuit for receiving the signals of Figs. 1 and 4. The circuit includes two D-type flip-flops 130 and 132 connected in series for converting the odd/NOT even signal to the not even 4th_stage and NOT odd_4th_stage signals. The D-type flip-flop 130 has applied to its D input 134 the odd/NOT even signal. The D-type flip-flop 132 has its D input 136 connected to the Q output 138 of D-type flip-flop 130. The clock inputs 140, 142 of D-type flip-flops 130 and 132, respectively, have the inverted shifted clock signal applied as input. The Q and not Q outputs 144 and 146 of the D-type flip-flop 132 provide the NOT even-4th-stage and NOT odd- 4th-stage signals respectively. The circuit also includes a transparent latch 150 having a D input 152, a clock input 154 and a Q output 156 for providing the even-select signal. The mux-value signal is applied as input to the D input 152. The NOT even-4th- stage signal from D-type flip-flop 132 is applied as input to the clock input 154. The even-select signal is output from the Q output 156. Similarly, a transparent latch 160 having a D input 162, a clock input 164 and a Q output 166 provides the odd- select signal. The mux-value signal is applied as input to the D input 162. The NOT odd-4th-stage signal is applied as input to the clock input 164. The odd-select signal is output from the Q output 166. Numerous modifications, variations and adaptations may be made to the particular embodiment of the invention described above without departing from the scope of the invention, which is defined in the claims.

Claims: WHAT IS CLAIMED IS: 1. A method of providing a phase controlled clock signal, in an integrated circuit comprising the steps of: providing an internal reference clock signal generated on-chip; providing an external reference clock signal generated off-chip having a period shorter than that of internal reference clock signal; determining an integral number of external reference clock signal periods in one internal reference clock signal period; providing a phase select value indicative of a desired phase shift from the external reference clock signal; providing a plurality of delayed clock signals derived from the external reference clock signal; and selecting one of the plurality of delayed clock signals in dependence upon the integral number of external reference clock signal periods and the phase select value. 2. A method as claimed in claim 1 wherein the step of providing an internally generated reference clock signal includes the steps of providing an on-chip ring oscillator, (34) including a delay line (38) , and having a clock signal period T 0 cs < which is dependent upon temperature, process, and voltage variations and frequency dividing the clock signal by an integral value n to provide the internal reference clock signal having a period nT OS c- 3. A method as claimed in claim 1 wherein the step of providing a plurality of delayed clock signals includes the steps of providing a delay line (18) having a plurality of delay cells (44) similar to the delay line (38) of the ring oscillator (34) , inputting the external reference clock signal into the delay line (18) , tapping the delay line after each of the plurality of delay cells to provide the plurality of delayed clock signals. 4. A method as claimed in claim 1 wherein the step of selecting one of the delayed clock signals includes the step of dividing the integral number of external reference clock signal periods by a predetermined integer characteristic of the ring oscillator. 5. A method as claimed in claim 4 wherein the step of selecting includes the step of multiplying the divided integral number by the phase select value to provide a number of delays required to yield the desired phase shift. 6. A method as claimed in claim 5 wherein the step of selecting includes subtracting from the number of delays a predetermined delay to compensate for delay in selecting. 7. Apparatus for providing a phase controlled clock signal on an integrated circuit comprising: a ring oscillator (34) including a delay line (38) for providing an internal reference clock signal; an input (10) for an external clock signal; an input (12) for a phase select value; a circuit (24, 26) for determining an integral number of delays in one period of the external clock signal, connected to the ring oscillator (34) and the input (10) for the external clock signal; a circuit (28, 30) for deriving a number of delays for the desired phase shift, connected to the circuit (24, 26) for determining an integral number of delays and the input for a phase select value; a multitapped delay line (18) connected to the input (10) for the external clock signal for providing a plurality of delayed clock signals; and a multiplexor (20) connected to the multitapped delay line (18) and the circuit for deriving a number of delays for selecting one of the plurality of delayed clock signals. 8. Apparatus as claimed in claim 7 wherein the delay line of the ring oscillator (34) and the multitapped delay line (18) comprise substantially similar delay cells (40, 44) . 9. Apparatus as claimed in claim 7 wherein the circuit for determining an integral number of delays includes a counter (24) connected to the ring oscillator (34) and the input (10) for the external clock signal and having an output and a divider (26) connected to the output of the counter (24) for dividing a value from the counter by a predetermined integer characteristic of the ring oscillator (34) . 10. Apparatus as claimed in claim 7 wherein the circuit for deriving a number of delays for a desired phase shift includes a multiplier (28) connected having a first input connected to the circuit (24, 26) for determining an integral number of delays and a second input (12) connected to the input for a phase select value and an output for a number of delays value. 11. Apparatus as claimed in claim 8 wherein the circuit for deriving a number of delays for a desired phase shift includes a subtractor (30) connected to the output for a number of delays value for subtracting from the value a predetermined delay. 12. Apparatus as claimed in claim 7 wherein the multiplexor (20) includes an odd side (50) and an even side (52) , the odd side (50) connected to outputs of odd taps of the multitapped delay line and the even side (52) connected to outputs of even taps of the multitapped delay line. 13. Apparatus as claimed in claim 12 wherein the multiplexor (20) includes four stages (40, 52, 54) on each side. 14. Apparatus as claimed in claim 13 wherein the first three stages (50, 52) of each side are cascaded and have an input (56, 60) for enabling by a first respective select signal. 15. Apparatus as claimed in claim 12 wherein the fourth stage (54) is shared by each side, is connected to the first three stages (50, 52) and has an input (68, 70) for enabling by a second respective select signal.

Inventors: IRELAND HAL HERBERT, MAITLAND ROGER JAMES, IRELAND, HAL, HERBERT, MAITLAND, ROGER, JAMES
Applicants: NORTHERN TELECOM LTD, NORTHERN TELECOM LIMITED
Application year: 1994
Main classification: H03K5
IPC codes: H03K5