Phase detectors are used in a variety of circuits, such as delay locked loops (DLLs), duty cycle correctors, and other circuits in which the phase between two signals is used to adjust some portion of a circuit. Phase detectors are typically used in memories such as Random Access Memory (RAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), and Double Data Rate SDRAM (DDR-SDRAM).
One type of phase detector receives two input signals and provides two output signals. The phase detector evaluates the phase difference between the two input signals to provide the two output signals. If the first input signal leads the second input signal, the phase detector activates the first output signal and deactivates the second output signal. If the first input signal lags the second input signal, the phase detector activates the second output signal and deactivates the first output signal. The first output signal can be used to adjust a circuit to increase a delay of the first input signal or decrease a delay of the second input signal to bring the phase of the first input signal closer to the phase of the second input signal. The second output signal can be used to adjust the circuit to decrease the delay of the first input signal or increase the delay of the second input signal to bring the phase of the first input signal closer to the phase of the second input signal.
Typical phase detectors may produce errors when operating at high frequencies. When the phase difference between the two input signals is small, a race condition between the two input signals through the phase detector may lead to incorrect output signals.
One embodiment of the present invention provides a phase detector. The phase detector includes a first circuit, a second circuit, and a third circuit. The first circuit is configured to provide a first signal in response to a feedback signal and a clock signal. The second circuit is configured to provide a second signal in response to the clock signal and an inverted clock signal. The third circuit is configured to provide a third signal indicating whether the clock signal leads the feedback signal and a fourth signal indicating whether the feedback signal leads the clock signal in response to the first signal and the second signal.
The accompanying drawings are included to provide a further understanding of the present invention and are incorporated in and constitute a part of this specification. The drawings illustrate the embodiments of the present invention and together with the description serve to explain the principles of the invention. Other embodiments of the present invention and many of the intended advantages of the present invention will be readily appreciated as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale relative to each other. Like reference numerals designate corresponding similar parts.
Memory circuit 106 includes a phase detector 108 that receives a feedback (FB) signal on FB signal path 110 and a clock (CLK) signal on CLK signal path 112. In one embodiment, phase detector 108 receives an external clock signal on CLK signal path 112 through memory communications path 104. In other embodiments, phase detector 108 receives an external clock signal or internal clock signal on CLK signal path 112 from any suitable device, such as a dedicated clock circuit that is located inside or outside memory circuit 106.
Phase detector 108 provides the down (DW) signal on DW signal path 114 and the up (UP) signal on UP signal path 116. Phase detector 108 determines the phase difference between the FB signal on FB signal path 110 and the CLK signal on CLK signal path 112 to provide the DW signal on DW signal path 114 and the UP signal on UP signal path 116. In response to the CLK signal leading the FB signal, phase detector 108 activates the DW signal and deactivates the UP signal. In response to the FB signal leading the CLK signal, phase detector 108 activates the UP signal and deactivates the DW signal. The UP signal and the DW signal can be provided to another circuit and used as control signals to adjust a delay of the CLK signal or a delay of the FB signal to bring the phase of the FB signal closer to the phase of the CLK signal.
A second input of NAND gate 158 is electrically coupled to the output of NAND gate 162 through signal path 164. The output of NAND gate 158 is electrically coupled to a first input of NAND gate 162 and to the input of inverter 166 though signal path 160. The output of inverter 174 is electrically coupled to a second input of NAND gate 162 through signal path 176.
The output of inverter 146 is electrically coupled to a first input of NAND gate 150 through ZCLK_FB_P signal path 148. The output of inverter 166 is electrically coupled to a first input of NAND gate 154 through ZCLK_P signal path 168. The output of NAND gate 150 is electrically coupled to a second input of NAND gate 154 and a first input of NAND gate 170 through pulse down (P_DW) signal path 152. The output of NAND gate 154 is electrically coupled to a second input of NAND gate 150 and a first input of NAND gate 172 through pulse up (P_UP) signal path 156. The output of NAND gate 170 provides the DW signal and is electrically coupled to a second input of NAND gate 172 through DW signal path 114. The output of NAND gate 172 provides the UP signal and is electrically coupled to a second input of NAND gate 170 through UP signal path 116.
NAND gates 138 and 142 provide a first flip-flop indicated at 130. NAND gates 158 and 162 provide a second flip-flop indicated at 132. NAND gates 150 and 154 provide a third flip-flop indicated at 134. NAND gates 170 and 172 provide a fourth flip-flop indicated at 136.
In response to a logic high FB signal on FB signal path 110 and the logic high signal on signal path 144, NAND gate 138 outputs a logic low signal on signal path 140. In response to a logic low FB signal on FB signal path 110 or a logic low signal on signal path 144, NAND gate 138 outputs a logic high signal on signal path 140. In response to a logic high CLK signal on CLK signal path 112 and a logic high signal on signal path 140, NAND gate 142 outputs a logic low signal on signal path 144. In response to a logic low CLK signal on CLK signal path 112 or a logic low signal on signal path 140, NAND gate 142 outputs a logic high signal on signal path 144. Inverter 146 inverts the signal on signal path 144 to provide the ZCLK_FB_P signal on ZCLK_FB_P signal path 148.
In response to a logic high CLK signal on CLK signal path 112 and a logic high signal on signal path 164, NAND gate 158 outputs a logic low signal on signal path 160. In response to a logic low CLK signal on CLK signal path 112 or a logic low signal on signal path 164, NAND gate 158 outputs a logic high signal on signal path 160. Inverter 174 inverts the CLK signal on CLK signal path 112 to provide the signal on signal path 176. In response to a logic high signal on signal path 160 and a logic high signal on signal path 176, NAND gate 162 outputs a logic low signal on signal path 164. In response to a logic low signal on signal path 160 or a logic low signal on signal path 176, NAND gate 162 outputs a logic high signal on signal path 164. Inverter 166 inverts the signal on signal path 160 to provide the ZCLK_P signal on ZCLK_P signal path 168.
In response to a logic high ZCLK_FB_P signal on ZCLK_FB_P signal path 148 and a logic high P_UP signal on P_UP signal path 156, NAND gate 150 outputs a logic low P_DW signal on P_DW signal path 152. In response to a logic low ZCLK_FB_P signal on ZCLK_FB_P signal path 148 or a logic low P_UP signal on P_UP signal path 156, NAND gate 150 outputs a logic high P_DW signal on P_DW signal path 152. In response to a logic high P_DW signal on P_DW signal path 152 and a logic high ZCLK_P signal on ZCLK_P signal path 168, NAND gate 154 outputs a logic low P_UP signal on P_UP signal path 156. In response to a logic low P_DW signal on P_DW signal path 152 or a logic low ZCLK_P signal on ZCLK_P signal path 168, NAND gate 154 outputs a logic high P_UP signal on P_UP signal path 156.
In response to a logic high P_DW signal on P_DW signal path 152 and a logic high UP signal on UP signal path 116, NAND gate 170 outputs a logic low DW signal on DW signal path 114. In response to a logic low P_DW signal on P_DW signal path 152 or a logic low UP signal on UP signal path 116, NAND gate 170 outputs a logic high DW signal on DW signal path 114. In response to a logic high DW signal on DW signal path 114 and a logic high P_UP signal on P_UP signal path 156, NAND gate 172 outputs a logic low UP signal on UP signal path 116. In response to a logic low DW signal on DW signal path 114 or a logic low P_UP signal on P_UP signal path 156, NAND gate 172 outputs a logic high UP signal on UP signal path 116.
In operation, with the rising edge of the CLK signal leading the rising edge of the FB signal, flip-flop 130 outputs a logic low signal on signal path 144 in response to the rising edge of the CLK signal. With the falling edge of the FB signal leading the falling edge of the CLK signal, flip-flop 130 outputs a logic low signal on signal path 144 in response to the falling edge of the FB signal. In response to a logic low signal on signal path 144, inverter 146 provides a logic high ZCLK_FB_P signal.
Flip-flop 132 outputs a logic low signal on signal path 160 in response to the rising edge of the CLK signal. In response to a logic low signal on signal path 160, inverter 166 provides a logic high ZCLK_P signal. The rising edge of the ZCLK_P signal is delayed from the rising edge of the CLK signal by at least one gate delay.
With the rising edge of the ZCLK_FB_P signal leading the rising edge of the ZCLK_P signal, flip-flop 134 outputs a logic low P_DW signal in response to the rising edge of the ZCLK_FB_P signal. With the rising edge of the ZCLK_P signal leading the rising edge of the ZCLK_FB_P signal, flip-flop 134 outputs a logic low P_UP signal in response to the rising edge of the ZCLK_P signal. In response to a logic low P_DW signal, flip-flop 136 outputs a logic high DW signal and a logic low UP signal. In response to a logic low P_UP signal, flip-flop 136 outputs a logic low DW signal and a logic high UP signal.
In response to the CLK signal leading the FB signal, the ZCLK_FB_P signal transitions to logic high before the ZCLK_P signal transitions to logic high. In response to the ZCLK_FB_P signal transitioning to logic high before the ZCLK_P signal, the P_DW signal transitions to logic low. In response to the P_DW signal transitioning to logic low, the DW signal transitions to logic high. In response to the FB signal leading the CLK signal, the ZCLK_P signal transitions to logic high before the ZCLK_FB_P signal transitions to logic high. In response to the ZCLK_P signal transitioning to logic high before the ZCLK_FB_P signal, the P_UP signal transitions to logic low. In response to the P_UP signal transitioning to logic low, the UP signal transitions to logic high.
Rising edge 220 of CLK signal 202 leads rising edge 222 of FB signal 204. In response to rising edge 220 of CLK signal 202, flip-flop 138 and inverter 146 provide rising edge 224 of ZCLK_FB_P signal 206. Also in response to rising edge 220 of CLK signal 202, inverter 174, flip-flop 132, and inverter 166 provide rising edge 226 of ZCLK_P signal 208. Rising edge 226 of ZCLK_P signal 208 lags rising edge 220 of CLK signal 202 by at least one gate delay. Therefore, rising edge 224 of ZCLK_FB_P signal 206 is as much as one gate delay before rising edge 226 of ZCLK_P signal 208. In response to rising edge 224 of ZCLK_FB_P signal 206, flip-flop 134 provides falling edge 228 of P_DW signal 210 and maintains P_UP signal 212 logic high. In response to falling edge 228 of P_DW signal 210, flip-flop 136 provides rising edge 230 of DW signal 214 and falling edge 232 of UP signal 216.
Therefore, if rising edge 220 of CLK signal 202 leads rising edge 222 of FB signal 204, flip-flop 134 reacts to rising edge 224 of ZCLK_FB_P signal 206 no matter where rising edge 222 of FB signal 204 occurs within the logic high time of CLK signal 202. Rising edge 224 of ZCLK_FB_P signal 206 leads rising edge 226 of ZCLK_P signal 208 by as much as one gate delay. The logic low pulse of P_DW signal 210 starting at falling edge 228 lasts as long as the logic high time of CLK signal 202. In this way, any race condition within phase detector 108 generated between rising edge 220 of CLK signal 202 and rising edge 222 of FB signal 222 is avoided.
In this embodiment, rising edge 260 of CLK signal 202 lags rising edge 262 of FB signal 204. In response to rising edge 260 of CLK signal 202, inverter 174, flip-flop 132, and inverter 166 provide rising edge 266 of ZCLK_P signal 208. In response to falling edge 274 of FB signal 204, flip-flop 130 and inverter 146 provide rising edge 264 of ZCLK_FB_P signal 206. In response to rising edge 266 of ZCLK_P signal 208, flip-flop 134 provides falling edge 268 of P_UP signal 212 and maintains P_DW signal 210 logic high. In response to falling edge 268 of P_UP signal 212, flip-flop 136 provides falling edge 270 of DW signal 214 and rising edge 272 of UP signal 216.
Therefore, if rising edge 262 of FB signal 204 leads rising edge 260 of CLK signal 202, flip-flop 134 reacts to rising edge 266 of ZCLK_P signal 208 no matter where rising edge 262 of FB signal 204 occurs within the logic low time of CLK signal 202. Rising edge 266 of ZCLK_P signal 208 leads rising edge 264 of ZCLK_FB_P signal 206. The logic low pulse of P_UP signal 212 starting at falling edge 268 lasts as long as the logic high time of CLK signal 202. In this way, any race condition within phase detector 108 generated between rising edge 260 of CLK signal 202 and rising edge 262 of FB signal 204 is avoided.
Embodiments of the present invention provide a phase detector. The phase detector is easily scalable to higher operating frequencies. Even a small phase difference between the two input signals does not lead to a race condition within the phase detector. In addition, the phase detector is substantially process insensitive.