1. Field of the Invention
The present invention relates to a clock generator, and in particular relates to a clock generator utilized in a clock recovery circuit.
2. Description of the Related Art
In a typical communication system, a transmitter generates data signals according to its clock and transmits the data signals to a receiver through channels. To correctly interpret the data signals, the receiver reads the data signals according to a clock synchronized with the clock of the transmitter. The receiver thus requires a clock recovery system to recover the data signal from the transmitter.
At least two clock recovery techniques are currently used. First, the clock of the transmitter may be transmitted to the receiver on a channel parallel with the channel carrying the data signals. The receiver can then estimate the phase of the data signals from the phase of clock of the transmitter. This technique however, is disadvantageous in that it requires an additional channel. Alternately, the phase of the data signals may be recovered directly from information carried in the data signals themselves.
Clock generator 11 comprises an edge detector 111 and an oscillator 112. Edge detector 111 generates a control signal S1 according to the edge of the data signal DIN. Oscillator 112 generates the clock signal CK according to the control signal S1 and controls the phase of the clock signal CK according to a control voltage VC1. Therefore, the clock signal CK synchronizes with the data signal DIN.
However, since the communication system comprises data signals with various transmission speeds, clock generators are required for generating clock signals with various frequencies.
Clock generators are provided. An exemplary embodiment of a clock generator comprises an edge detector, an oscillator, a frequency divider, and a selector. The edge detector generates a detection signal according to an edge of a data signal. The oscillator generates a first clock according to a control signal and controls the phase of the first clock according to the detection signal. The frequency divider processes the first clock to generate a second clock and is reset by the detection signal. The selector selectively outputs the first clock or the second clock according to an external signal.
Another exemplary embodiment of a clock generator comprises an edge detector, an oscillator, a frequency divider, and a selector. The edge detector generates a detection signal according to an edge of a data signal. The oscillator generates a first clock according to a control signal and controls phase of the first clock according to the detection signal. The frequency divider processes the first clock to generate a second clock and a third clock and is reset by the detection signal. The selector selectively outputs the second clock or the third clock according to an external signal.
Clock recovery circuits are also provided. An exemplary embodiment of a clock recovery circuit comprises an edge detector, an oscillator, a frequency divider, a selector, and a sampling circuit. The edge detector generates a first detection signal according to an edge of a data signal. The oscillator generates a first clock according to a control signal and controls phase of the first clock according to the first detection signal. The frequency divider processes the first clock to generate a second clock and is reset by the detection signal. The selector selectively outputs the first clock or the second clock according to an external signal. The sampling circuit samples the data signal according to a signal output from the selector.
Another exemplary embodiment of a clock recovery circuit comprises an edge detector, an oscillator, a frequency divider, a selector, and a sampling circuit. The edge detector generates a first detection signal according to an edge of a data signal. The oscillator generates a first clock according to a control signal and controls phase of the first clock according to the first detection signal. The frequency divider processes the first clock to generate a second clock and a third clock and is reset by the detection signal. The selector selectively outputs the second clock or the third clock according to an external signal. The sampling circuit samples the data signal according to a signal output from the selector.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
a is a schematic diagram of an exemplary embodiment of a clock recovery circuit;
b and 2c are timing diagrams of the clock recovery shown in
a is a schematic diagram of another exemplary embodiment of a clock recovery circuit;
b and 3c are timing diagrams of the clock recovery shown in
a is a schematic diagram of another exemplary embodiment of a clock recovery circuit;
b and 4c are timing diagrams of the clock recovery shown in
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
a is a schematic diagram of an exemplary embodiment of a clock recovery circuit. The clock recovery circuit 20 comprises a clock generator 21 and a sampling circuit 22. Clock generator 21 comprises an edge detector 211, an oscillator 212, a frequency divider 213, and a selector 214.
Edge detector 211 generates a detection signal El according to an edge of the data signal DIN. In this embodiment, edge detector 211 comprises a delay unit 215 and a processor 216. Delay unit 215 delays the data signal DIN to generate a delay signal D1. Processor 216 controls a voltage level of the detection signal E1 according to the data signal DIN and the delay signal D1
The voltage level of the detection signal E1 is a first voltage level when a voltage level of the data signal DIN is equal to that of the delay signal D1. The voltage level of the detection signal E1 is a second voltage level when the voltage level of the data signal DIN differs that of the delay signal D1. In this embodiment, processor 216 is a XOR gate 241, the first voltage level is a low voltage level, and the second voltage level is a high voltage level.
Oscillator 212 generates a clock clk_f according to a control signal VC1 and controls a phase of a clock clk_h according to the detection signal E1. In this embodiment, oscillator 212 is a Gated Voltage Controlled Oscillator (GVCO) 217.
GVCO 217 comprises logic gates 251, 253 and buffers 252a˜252d. The control signal VC1 controls the delay time of logic gate 251 and buffers 252a˜252d for controlling frequency of the clock clk_f. In this embodiment, GVCO 217 comprises four buffers 252a˜252d, but the disclosure is not limited thereto. The operation of a GVCO is well known to those skilled in the art, thus, description thereof is omitted.
Frequency divider 213 receives the detection signal E1 and the clock clk_f for processing the clock clk_f and generating the clock clk_h. Frequency divider 213 is reset by the detection signal E1. In this embodiment, frequency divider 213 is a D-type flip-flop 218. Thus, the frequency of the clock clk_f is double that of the clock clk_h.
D-type flip-flop 218 comprises a data input terminal D, a clock terminal CK, a reset terminal RES, an output terminal Q, and an inverse output terminal
When a voltage level of the clock clk_f is transformed from a low voltage level into a high voltage level, D-type flip-flop 218 is triggered such that output terminal Q outputs a signal received by data input terminal D.
Selector 214 selectively outputs the clock clk_f or the clock clk_h according to an external signal SEL. In this embodiment, selector 214 is a multiplexer 219.
Sampling circuit 22 samples the data signal DIN according to a signal output from selector 214. In this embodiment, sampling circuit 22 is a D-type flip-flop 221. D-type flip-flop 221 comprises a data input terminal D receiving the data signal DIN, a clock terminal CK receiving the signal output from selector 214, a output terminal Q output a response signal DOUT synchronized with the data signal DIN.
When the logic level of the signal output from selector 214 is transformed from high logic level into low logic level, D-type flip-flop 221 is triggered such that the output terminal Q of D-type flip-flop 221 outputs a signal received by data input terminal D of D-type flip-flop 221.
In some embodiments, the control signal VC1 received by oscillator 212 is generated by a Phase Locked Loop (PLL) 23. PLL 23 comprises a phase/frequency detector 231, a charge pump 232, a low-pass filter 233, and a frequency generator 234.
Phase/frequency detector 231 outputs a detection signal SD according to the difference between a reference frequency Ref and a feedback signal SB. Charge pump 232 receives the detection signal SD to generate a charge/discharge signal SC. Low-pass filter 233 filters a high frequency element of the charge/discharge signal SC to generate a control signal VC1. Frequency generator 234 controls frequency of the feedback signal SB according to a control signal VC2.
b and 2c are timing diagrams of the clock recovery shown in
When the voltage levels of the data signal DIN and delay signal D1 are the same, the voltage level of detection signal E1 is the low voltage level. When the voltage level of the data signal DIN differs from that of the delay signal D1, the voltage level of detection signal E1 is the high voltage level.
During a period P1, the phase of GVCO 217 is reset by the detection signal E1 such that the clock clk_f is generated during a period P2. Therefore, the voltage level of the data signal DIN is obtained when the sampling circuit 22 samples the data signal DIN according to a falling edge of the clock clk_f.
In
During a period P3, D-type flip-flop 218 is reset by the detection signal E1 such that the voltage level of the clock clk_h is high. Because the clock terminal of D-type flip-flop 218 receives the clock clk_f, when the clock clk_f is at a rising edge, the voltage level of the clock clk_h output from the output terminal Q of D-type flip-flop 218 is changed. Thus, the clock clk_h shown as
a is a schematic diagram of another exemplary embodiment of a clock recovery circuit.
Oscillator 212 controls the phase of the clock clk_f according to the detection signal E1′. Frequency divider 213 is reset by the detection signal E1. Sampling circuit 22 samples the data signal DIN′ according to a signal output from selector 214 for generating a response signal DOUT′ synchronized with the data signal DIN′.
b and 3c are timing diagrams of the clock recovery shown in
Delay unit 32 delays the detection signal E1 to generate the detection signal E1′. The detection signal E1′ lags behind the detection signal E1 by about 200 ps (T/2). GVCO 212 outputs the clock clk_f according to the detection signal E1′. Since the data signal DIN′ is sampled by sampling circuit 22, the data signal DIN′ is obtained according to a falling edge of the clock clk_f.
In
In a period P4, D-type flip-flop 218 is reset by the detection signal E1 such that the voltage of the clock clk_h is the low voltage level. Since the clock terminal CK of D-type flip-flop 218 receives the clock clk_f, when the clock clk_f is at a rising edge, the voltage level of the clock clk_h output from the output terminal Q of D-type flip-flop 218 is changed. Thus, the clock clk_h shown as
a is a schematic diagram of another exemplary embodiment of a clock recovery circuit.
Additionally, a delay unit 42 coupled between frequency divider 413 and selector 214 delays the clock clk_h to generate a clock clk_h′.
b and 4c are timing diagrams of the clock recovery shown in
When the voltage levels of the data signal DIN and the delay signal D1 are the same, the voltage level of the detection signal E1 is low. When the voltage level of the data signal DIN differs from that of the delay signal D1, the voltage level of the detection signal E1 is high.
In period P5, GVCO 217 is reset by the detection signal E1 such that the clock clk_f is generated in period P6. Therefore, the voltage level of the data signal DIN is obtained according to a falling edge of the clock clk_f
In
In period P7, D-type flip-flop 418 is reset by the detection signal E1 such that the voltage level of the clock clk_h is high. Since the clock terminal CK of D-type flip-flop 418 receives the clock clk_f, when the clock clk_f is at a falling edge, the voltage level of the clock clk_h output from the output terminal Q of D-type flip-flop 418 is changed. Therefore, the clock clk_h shown as
Since a delay unit 42 delays the clock clk_h to generate the clock clk_h′, the clock clk_h′ lags behind the clock clk_h about 400 ps. Sampling circuit 22 samples the data signal DIN and outputs a normal voltage level according to a falling edge of the clock clk_h′.
In this embodiment, frequency divider 51 comprises D-type flip-flops 511 and 512 for generating the clocks clk_h and clk_k. Therefore, the frequency of the clock_h is double that of clock_k and the frequency of the clock_f is double that of clock_h.
D-type flip-flop 511 comprises a data input terminal D, a clock terminal CK receiving the clock clk_f, a reset terminal RES receiving the detection signal E1, an output terminal Q outputting the clock clk_h, and an inverse output terminal Q coupled to the data input terminal D.
D-type flip-flop 512 comprises a data input terminal D, a clock terminal CK receiving the clock clk_h, a reset terminal RES receiving the detection signal E1, an output terminal Q outputting the clock clk_k, and an inverse output terminal Q coupled to the data input terminal D.
Because the clock generator generates clocks with various frequencies, a sampling circuit receives clocks, which have been output from the clock generator and synchronized with a data signal, and detects the phase of the data signal. Additionally, the delay units shown in
While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Number | Date | Country | Kind |
---|---|---|---|
94135183 | Oct 2005 | TW | national |