Abstract:
Some embodiments regard a circuit comprising: a first circuit configured to lock a frequency of an output clock to a frequency of a reference clock; a second circuit configured to align an input signal to a phase clock of the output clock; a third circuit configured to use a first set of phase clocks of the output clock and a second set of phase clocks of the output clock to improve alignment of the input signal to the phase clock of the output clock; and a lock detection circuit configured to turn on the first circuit when the frequency of the output clock is not locked to the frequency of the reference clock; and to turn off the first circuit and to turn on the second circuit and the third circuit when the frequency of the output clock is locked to the frequency of the reference clock.

Description:
TECHNICAL FIELD 
       [0001]    The present disclosure is generally related to phase-lock-loop based clock-data recovery (PLL-based CDR) circuitry, and more specifically to a phase-lock assistant circuit. 
       BACKGROUND 
       [0002]    The clock-data recovery (CDR) circuitry based on a phase-lock loop (PLL) usually includes two loops. A first loop brings the frequency of the voltage-controlled oscillator (VCO) (e.g., the CDR frequency) closer to the frequency of the input data (e.g., the input frequency) while a second loop locks the phase of the VCO into that of the input data. In some approaches related to the two-loop structure using the spread spectrum clock (SSC), however, if the input frequency varies at the transition from the first loop to the second loop, the VCO does not lock into the input data. As a result, there is a need to solve the above problem. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0003]    The details of one or more embodiments of the disclosure are set forth in the accompanying drawings and the description below. Other features and advantages will be apparent from the description, drawings, and claims. 
           [0004]      FIG. 1  is a diagram of an illustrative circuit, in accordance with some embodiments. 
           [0005]      FIG. 2  is a graph of a waveform illustrating how a set of three phase clocks and a data signal are used in determining the relative timing relationship between the clock and the data signal in  FIG. 1 , in accordance with some embodiments. 
           [0006]      FIG. 3  is a graph of waveforms illustrating how the relative timing relationship of the clock and the data signal in  FIG. 1  is determined using multiple clock signals, in accordance with some embodiments. 
           [0007]      FIG. 4  is a flowchart illustrating how signals are generated to adjust the frequency of the output of the voltage-controlled oscillator in  FIG. 1 , in accordance with some embodiments. 
           [0008]      FIG. 5  is a diagram of a detailed circuit of the phase detector of  FIG. 1 , in accordance with some embodiments. 
           [0009]      FIGS. 6A-6D  show truth tables illustrating an operation of the circuit in  FIG. 5 , in accordance with some embodiments. 
           [0010]      FIG. 7  is a detailed block diagram of the phase lock assistant of  FIG. 1 , in accordance with some embodiments. 
           [0011]      FIG. 8  is a detailed block diagram of the circuit UPDOWN 01  of  FIG. 7 , in accordance with some embodiments. 
           [0012]      FIG. 9  is a detailed circuit of circuit BB of  FIG. 8 , in accordance with some embodiments. 
           [0013]      FIGS. 10A-10C  show truth tables illustrating an operation of the circuit in  FIG. 8 , in accordance with some embodiments. 
           [0014]      FIG. 11  is a detailed circuit of the circuit UPDOWN in  FIG. 7 , in accordance with some embodiments. 
           [0015]      FIGS. 12A-12D  show truth tables illustrating an operation of the circuit in  FIG. 11 , in accordance with some embodiments. 
       
    
    
       [0016]    Like reference symbols in the various drawings indicate like elements. 
       DETAILED DESCRIPTION 
       [0017]    Embodiments, or examples, illustrated in the drawings are now disclosed using specific language. It will nevertheless be understood that the embodiments and examples are not intended to be limiting. Any alterations and modifications in the disclosed embodiments, and any further applications of the principles disclosed in this document are contemplated as would normally occur to one of ordinary skill in the pertinent art. Reference numbers may be repeated throughout the embodiments, but they do not require that feature(s) of one embodiment apply to another embodiment, even if they share the same reference number. 
         [0018]    Some embodiments have one or a combination of the following features and/or advantages. Some embodiments include a phase-lock assistant circuit that aligns the input data and the VCO output to improve the phase lock between the input data and the VCO output. Some embodiments are used in applications with a SSC input and/or where there is a deviation between the frequency of the input data and the reference clock, but the input and the VCO output are also locked. 
       Exemplary Circuit 
       [0019]      FIG. 1  is a diagram of an exemplary CDR circuit  100  that uses some embodiments. CDR circuit  100  generates a clock (e.g., signal) OVCO based on the input data IN. Those skilled in the art will recognize that a first signal (e.g., a clock) having a frequency higher than that of a second signal (e.g., data) indicates that the clock is faster than the data. Similarly, the data having a frequency lower than that of the clock is slower than the clock. In contrast, the clock is earlier than the data if a relevant edge (e.g., the rising edge) of the clock is before a relevant edge of the data. 
         [0020]    In some embodiments, signal OVCO generates eight phase clocks corresponding to eight phases, including phase 0° (e.g., Clk — 0), phase 45° (e.g., Clk — 45), phase 90° (e.g., Clk — 90), phase 135° (e.g., Clk — 135), phase 180° (e.g., Clk — 180), phase 225° (e.g., Clk — 225), phase 270° (e.g., Clk — 270), and phase 315° (e.g., Clk — 315). Clocks Clk — 0, Clk — 45, Clk — 90, Clk — 135, Clk — 180, Clk — 225, Clk — 270 and Clk — 315 run at the same frequency but at different phases (e.g., different times). In another words, clocks Clk — 0, Clk — 45, Clk — 90, Clk — 135, Clk — 180, Clk — 225, Clk — 270 and Clk — 315 are in an order of being early to being late. For example, clock Clk — 0 transitions earlier than clock Clk — 45, clock Clk — 45 transitions earlier than clock Clk — 90, clock Clk — 90 transitions earlier than clock Clk — 135, etc. 
         [0021]    Divide-by-N circuit DBN divides the frequency of signal OVCO (e.g., frequency FOVCO, not labeled) by an integer N, resulting in frequency FVCODBN where FVCODBN=FOVCO/N. 
         [0022]    Phase frequency detector PFD enables outputfrequency FVCODBN of circuit DBN to be substantially close to (e.g., the same as) the frequency of the reference clock REFCLK (e.g., frequency FREFCLK). For example, if clock OVCO is faster than clock REFCLK (e.g., frequency FVCODBN is higher than frequency FREFCLK), then phase frequency detector PFD generates a “down” signal OPFD for charge pump PFD CP to drive low pass filter LPF to decrease frequency FVCO of oscillator VCO and thus frequency FVCODBN. If clock OVCO is slower than clock REFCLK (e.g., frequency FVCODBN is lower than frequency FREFCLK), phase frequency detector PFD generates an “up” signal OPFD for charge pump PFD CP to drive low pass filter LPF to increase frequency FVCO and thus frequency FVCODBN. 
         [0023]    Phase detector PD enables the phase of input data IN (e.g., PHIN) to be close to (e.g., the same as) the 90° phase of clock OVCO (i.e., the relevant data edge DE of input data IN to be close to (e.g., aligned with) the rising edge of clock Clk — 90). If clock OVCO is earlier than input data IN, phase detector PD generates a “down” signal OPD for charge pump PD CP to drive low pass filter LPF to decrease frequency FVCO. But if clock OVCO is later than input data IN, phase detector PD generates an “up” signal OPD for charge pump PD CP to drive low pass filter LPF to increase frequency FVCO. Decreasing or increasing frequency FVCO respectively decreases or increases the frequency of clock Clk — 90, enabling the data edge DE to be aligned with the rising edge of clock Clk — 90 (e.g., phase locking input data IN to clock Clk — 90). 
         [0024]    In some situations, using only phase detector PD without a phase assistant PLA to phase lock input data IN and clock Clk — 90 enables a data edge DE to be close to but not completely aligned with the rising edge of clock Clk — 90. Phase lock assistant PLA improves the phase lock, e.g., enables data edge DE to be (substantially) aligned with the rising edge of clock Clk — 90. For example, If clock Clk — 90 is earlier than input data IN, phase lock assistant PLA generates a “down” signal OPLA for charge pump PLA CP to drive low pass filter LPF to decrease frequency FVCO to slow down clock OVCO or clock Clk — 90, and thus improves the phase lock. But if clock OVCO is later than input data IN, phase lock assistant PLA generates an “up” signal OPLA for charge pump PLA CP to drive low pass filter LPF to increase frequency FVCO to speed up clock OVCO or clock Clk — 90, and thus improve the phase lock. 
         [0025]    The charge pumps PLA CP, PFD CP, and PD CP function with the phase lock assistant PLA, phase frequency detector PFD, and phase detector PD, respectively. One of the charge pumps PLA CP, PFD CP, or PD CP, depending on the respective input signals OPLA, OPFD, or OPD, generates the appropriate signal OCP corresponding to each respective signal OPLA, OPFD, or OPD.  FIG. 1  shows three charge pumps PLA CP, PFD CP, and PD CP in accordance with some embodiments, but, in accordance with some further embodiments, one charge pump (e.g., a charge pump CP) is used by all three phase lock assistant PLA, phase frequency detector PFD, and phase detector PD. For example, a multiplexer is used to select and thus provides one of the outputs OPLA, OPFD, and OPD of the respective phase lock assistant PLA, phase frequency detector PFD, and phase detector PD to charge pump CP. 
         [0026]    Signal OCP enables low pass filter LPF to generate signal OLPF to increase/decrease frequency FOVCO. 
         [0027]    Lock detector LD compares signal REFCLK and OVCO and generates a signal OLD to control phase lock assistant PLA, phase frequency detector PFD, and phase detector PD. In some embodiments, if frequency FVCODBN is locked to frequency FREFCLK, lock detector LD generates a “locked” signal OLD to turn off phase frequency detector PFD and turn on simultaneously phase lock assistant PLA and phase detector PD. But if frequency FVCODBN is not locked to frequency FREFCLK, lock detector LD generates a “not locked” signal OLD turn on phase frequency detector PFD and turn off simultaneously phase lock assistant PLA and phase detector PD. 
         [0028]    In some embodiments, frequency FVCODBN is locked to the frequency of input data IN (e.g., frequency FIN), and phase PHIN is aligned with (e.g., locked to) clock Clk — 90 (e.g., the data edge DE is aligned with the rising edge of clock Clk — 90). When phase PHIN is locked to clock Clk — 90, input data IN is latched by clock OVCO having sufficient setup and hold time for clock OVCO. 
       Determining the Timing Relationship Between the Data and the Clock 
       [0029]      FIG. 2  is a diagram of waveform  200  illustrating an operation of phase detector PD, in accordance with some embodiments. Phase detector PD samples input data IN by the rising edge of clock OVCO at three phases 0°, 90°, and 180° represented by three respective clocks Clk — 0, Clk — 90, and Clk — 180. In some embodiments, if the sampling result (e.g., RSMP90) of clock Clk — 90 sampling input data IN is the same as the sampling result RSMP0 of clock Clk — 0 sampling input data IN, clock OVCO is earlier than input data IN, but if the sampling result RSMP90 is the same as the sampling result RSM180 of clock Clk — 180 sampling input data IN then clock OVCO is later than input data IN. In the illustration of  FIG. 2 , the sampling result RSMP0 is a logical “0” (e.g., a low logic level, a Low). The sampling result RSMP180 a logical “1” (e.g., a high logic level, a High). As a result, if the sampling result RSMP90 is High, i.e., the same as the sampling result RSMP180, then clock OVCO is later than input data IN. But if the sampling result RSMP90 is Low, i.e., the same as the sampling result RSMP0, then clock OVCO is earlier than input data IN. 
         [0030]      FIG. 3  is a graph of waveforms illustrating the timing relationship (e.g., how late/early) between clock OVCO and input data IN based on different phase clocks of clock OVCO, in accordance with some embodiments. In some embodiments, input data IN is phase locked to the 90° phase of signal OVCO. Stated another way, the data edge DE is aligned to the rising edge of clock Clk — 90, but so that the phase detector PD operating in the areas neighboring the rising edge of clock Clk — 90 (e.g., regions I and II) is not disturbed, the phase lock assistant PLA is configured to operate in regions III and IV (e.g., the signal comparisons are performed in regions III and IV). Even though the comparison regions are shifted from regions I and II to regions III and IV, the comparison results indicating the timing relationship between clocks OVCO and input data IN are the same as if the comparisons are performed in the regions I and II. 
         [0031]    The line “Clk — 0 to data” showing regions late_a and early_a indicates whether clock OVCO is late or early with respect to input data IN using the rising edge of clock Clk — 0 as a reference. The regions late_a and early_a are determined using clocks Clk — 0, Clk — 90 and Clk — 180 sampling input data IN as illustrated in  FIG. 2 . For simplicity, clock Clk — 180 is not shown. For example, if data edge DE is between times t 1  and t 3 , t 5  and t 7 , and t 9  and t 11 , clock OVCO is later than input data IN. If, however, data edge DE is between times t 3  and t 5 , t 7  and t 9 , clock OVCO is earlier than input data IN. 
         [0032]    The line “Clk — 45 to data” showing regions late_b and early_b indicates whether clock OVCO is late or early with respect to input data IN using the rising edge of clock Clk — 45 as a reference. The regions late_b and early_b are determined using clocks Clk — 45, Clk — 135 and Clk — 225 sampling input data IN as illustrated in  FIG. 2  wherein clocks Clk — 45, Clk — 135 and Clk — 225 correspond to clocks Clk — 0, Clk — 90 and Clk — 180, respectively. For simplicity, clock Clk — 225 is not shown. For example, if data edge DE is between times t 2  and t 4 , t 6  and t 8 , and t 10  and t 12 , clock OVCO is later than input data IN. If the data edge DE, however, is between times t 4  and t 6 , t 8  and t 10 , clock OVCO is earlier than input data IN. 
         [0033]    In some embodiments, a combination of the regions late_a, early_a, late_b, and early_b are used to determine the timing relationship (e.g., late/early) between clock OVCO and input data IN and the moving direction of input data IN with respect to clock OVCO. For example, if using the two sets of clocks Clk — 0, Clk — 90 and Clk — 180, and Clk — 45, Clk — 135 and Clk — 225 to sample data edge DE, and the results reveal that data edge DE is in the region III (e.g., between times t 4  and t 5  or regions early_a and early_b) in a first clock cycle (e.g., cycle n−1) and in the region IV (e.g., between times t 5  and t 6  or in regions late_a and early_b) in a subsequent cycle (e.g., cycle n), then input data IN is moving from the left to the right passing time t 5  or input data IN is later than clock OVCO. In contrast, if the sampling results reveal that input data IN is in the region IV (e.g., late_a and early_b) in cycle n−1 and in the region III (e.g., early_a and early_b) in cycle n, then data IN is moving from the right to the left passing time t 5  or input data IN is earlier than clock OVCO. Once the relationship is determined, appropriate signals (e.g., signals UP and DN in  FIG. 7 ) are generated accordingly to increase or decrease the frequency of clock OVCO. 
       Exemplary Method 
       [0034]      FIG. 4  is a flowchart  400  illustrating how signals (e.g., signals UP and DN) are generated to increase/decrease the frequency of clock OVCO, in accordance with some embodiments. For illustration, regions I, II, III, IV, V correspond to the regions between times t 2  and t 3 , t 3  and t 4 , t 4 , and t 5 , t 5  and t 6 , and t 6  and t 7 , respectively. Alternatively expressed, regions I, II, III, IV, and V correspond to the regions late_a and late_b, early_a and late_b, early_a and early_b, late_a and early_b, and late_a and late_b, respectively. 
         [0035]    In block  405 , if condition 1 is true, that is, if input data IN is in region V (e.g., late_a and late_b) in clock cycle n−1 and in region IV (e.g., late_a and early_b) in clock cycle n, then input data IN is moving from the right to the left passing time t 6 , which indicates that clock OVCO is later than input data IN. As a result, phase lock assistance PLA in step  407  generates a logical “1” for the “UP” signal ( FIG. 7 ) of signal OPLA so that charge pump PLA CP generates a corresponding signal OCP to increase frequency FVCO making clock OVCO faster. Method  400  then flows to step  430  where the clock cycle n is increased (e.g., n=n+1), or, stated another way, the clock proceeds to the next cycle. 
         [0036]    If condition 1, however, is not true, then in step  410 , if condition 2 is true, that is, if input data IN is in region III (e.g., early_a and early_b) in cycle n−1 and in region II (e.g., early_a and late_b) in cycle n, then input data IN is moving from the right to the left passing time t 2 , which indicates that clock OVCO has been aligned (e.g., phase locked) with data IN. As a result, phase lock assistant PLA in step  412  generates a logical “0” for the UP signal so that charge pump PLA CP generates a corresponding signal OCP to not increase frequency FVCO. Clock OVCO and input data IN are now aligned (e.g., phase locked). 
         [0037]    In some embodiments, the method  400  loops through steps  405 ,  407 , and  430  many times before proceeding to step  410  then step  412 . Expressed differently, initially clock OVCO is later than input data IN, and it takes many clock cycles for input data IN to transition through regions IV and III before reaching region II or for PLA to increase frequency FVCO many times before data edge DE is aligned with the rising edge of clock Clk — 90. 
         [0038]    In block  415 , if none of the condition 1 or condition 2 is true, and if condition 3 is true, that is, if input data IN is in region II (e.g., ealry_a and late_b) in clock cycle n−1 and in region III (e.g., early_a and early_b) in clock cycle n, then input data IN is moving from the left to the right passing time t 2 , which indicates that clock OVCO is earlier than input data IN. As a result, phase lock assistance PLA in step  417  generates a logical “1” for the “DN” signal ( FIG. 7 ) of signal OPLA so that charge pump PLA CP generates a corresponding signal OCP to decrease frequency FVCO making clock OVCO slower. Method  400  then flows to step  430  where the clock proceeds to the next cycle. 
         [0039]    If condition 3, however, is not true, then in step  420 , if condition 4 is true, that is, if input data IN is in region IV (e.g., late_a and early_b) in cycle n−1 and in region V (e.g., late_a and late_b) in cycle n, then input data IN is moving from the left to the right passing time t 6 , which indicates that clock OVCO has been aligned with input data IN. As a result, phase lock assistant PLA in step  412  generates a logical “0” for the DN signal so that charge pump PLA CP generates a corresponding signal OCP to not decrease frequency FOVCO. Clock OVCO and data IN are now aligned (e.g., phase locked). 
         [0040]    In some embodiments, the method  400  loops through steps  415 ,  417 , and  430  many times before proceeding to step  420  then step  422 . Expressed differently, initially clock OVCO is earlier than input data IN, and it takes many clock cycles for input data IN to transition through regions III and IV before reaching region V or for PLA to decrease frequency FOVCO many times before data edge DE is aligned with the rising edge of clock Clk — 90. 
       The Phase Detector Circuit 
       [0041]      FIG. 5  is a detailed schematic diagram  500  of phase detector PD (e.g., PD  500 ) in accordance with some embodiments. Flip-flops FF, Exclusive-OR gates XO and AND gates AD are means for PD  500  to use clocks Clk — 1, Clk — 2, and Clk — 3 to sample data Data and generates signals Late and Early as illustrated in  FIG. 2 . Clocks Clk — 2 and Clk — 3 are 180° and 90° out of phase with clock Clk — 1, respectively. If the sampling result of clock Clk — 3 is the same as the sampling result of clock Clk — 2, then clock Clk — 1 is later than Data, and signal Late is generated (e.g., high). But if the sampling result of clock Clk — 3 is the same as the sampling result of clock Clk — 1, then clock Clk — 1 is earlier than Data and signal Early is generated “true.” If signal Early is true, then charge pump PD CP generates an “dn” signal OCP for low pass filter LPF to decrease frequency FVCO, but if signal Late is true, then charge pump PD CP generates a “up” signal OCP for low pass filter to increase frequency FVCO. 
         [0042]    In some embodiments, PD  500  is also used in phase lock assistant PLA ( FIG. 7 ). Consequently, clocks Clk — 1, Clk — 2, and Clk — 3 correspond to clocks Clk — 0, Clk — 180, and Clk — 90, data Data correspond to input data IN and signals Late and Early correspond to the respective regions late_a, early_a in  FIG. 3 . As a result, signals (e.g., signals late_A and early_A) are generated corresponding to the regions late_a and early_a, respectively, based on the results of clocks Clk — 0, Clk — 90, and Clk — 180 sampling input data IN. In some further embodiments, clocks Clk — 1, Clk — 2, and Clk — 3 correspond to clocks Clk — 45, Clk — 225, and Clk — 135, data Data correspond to input data IN and signals Late and Early correspond to the respective regions late_b, early_b in  FIG. 3 . As a result, signals (e.g., signals late_B and early_B) are generated corresponding to the regions late_b and early_b, respectively, based on the results of clocks Clk — 45, Clk — 135, and Clk — 225 sampling input data IN. 
         [0043]    In some embodiments, PD  500 , based on signals Q_ 1  and Q_ 2 , also generates signal Toggle for use in  FIG. 7  below. 
         [0044]      FIGS. 6A-6D  show truth tables  600 A-D illustrating an operation of PD  500  of  FIG. 5  in accordance with some embodiments. Truth tables  600 A-C illustrate the operation of the respective outputs Q_ 1 , Q_ 2 , and Q_ 3  having data Data and the respective clocks Clk — 1, Clk — 2, and Clk — 3 as inputs. In tables  600 A,  600 B, and  600 C, the respective outputs Q_ 1 , Q_ 2 , and Q_ 3  follow the input Data at the rising edge of the respective clocks Clk — 1, Clk — 2, and Clk — 3, and are unchanged otherwise. Truth table  600 D shows the operation of signals Late and Early having signals Q_ 1 , Q_ 2 , and Q_ 3  and Clk — 1 as inputs. Signals Late, Early, and Toggle are unchanged when clock Clk — 1 is at a constant level Low or High, and are at a logic level Low or High at the rising edge of clock Clk — 1 as shown in the table. 
       The Phase Lock Assistant Circuit 
       [0045]      FIG. 7  is a block diagram  700  of phase lock assistant PLA (e.g., PLA  700 ) in accordance with some embodiments. In some embodiments, phase detector PD 1  and PD 2  are implemented using PD  500 . Phase detector PD 1  uses clocks Clk — 0, Clk — 90, and Clk — 180 to sample input data IN and generate signals early_A and late_A corresponding to the regions early_a and late_a as illustrated in  FIGS. 2 and 5 . Phase detector PD 2  uses clocks Clk — 45, Clk — 135, and Clk — 225 to sample input data IN and generate signals early_B and late_B corresponding to the regions early_b and late_b as illustrated in  FIGS. 2 and 5 . Clocks Clk — 45, Clk — 135, and Clk — 225 correspond to clocks Clk — 0, Clk — 90, and Clk — 180, and clocks Clk — 1, Clk — 3, and Clk — 2, respectively. Additionally, phase detector PD 1  generates signal Toggle_a to activate circuit UPDOWN and thus signals UP and DN when input data IN is transitioning (e.g., from a low to a high or from a high to a low). 
         [0046]    Circuit UPDOWN 01  receives input signals early_A, late_A, early_B, late_B, and clock Clk — 0 as inputs and generates outputs Up_ 1 , Up_ 0 , Dn_ 1 , and D_ 0 . In some embodiments, circuit UPDOWN 01  includes combinatorial logic circuitry. In some further embodiments, circuit UPDOWN 01  is a state machine. 
         [0047]    Circuit UPDOWN receives input signals Up_ 1 , Up_ 0 , Dn_ 1 , Dn_ 0 , and Toggle_a, and generates signal UP and DN. 
         [0048]      FIG. 8  is a block diagram  800  illustrating a detailed diagram of circuit UPDOWN 01  in  FIG. 7 , in accordance with some embodiments. 
         [0049]    Circuits B 1 , B 2 , B 3 , and B 4  generate signals Up_ 1 , Dn_ 1 , Up_ 0 , and Dn_ 0 , respectively. Each circuit B 1 , B 2 , B 3 , and B 4  is implemented from a circuit “BB” (shown in  FIG. 9  below) having the same input terminals A, B, C, D, and clock, and generating an output Q. As a result, circuits B 1 , B 2 , B 3 , and B 4  function in the same way except that they each receive different inputs at their input terminals and generate different outputs at respective output terminals Q. For example, circuit B 1  receives inputs Late_A, Late_B, Late_A, and Early_B at the respective terminals A, B, C, and D, and generates signal Up_ 1 . Circuit B 2  receives inputs Early_A, Late_B, Early_A, and Late_B at the respective terminals A, B, C, and D, and generates signal Dn_ 1  at the respective output terminal Q, etc. In some embodiments, each circuit B 1 , B 2 , B 3 , and B 4  is a state machine. 
         [0050]      FIG. 9  is a detailed diagram  900  illustrating an implementation of a circuit BB of  FIG. 8 , in accordance with some embodiments. Nodes A_FF and B_FF are the internal outputs of circuit  900  (e.g., the outputs of the respective flip flops FF). Circuit  900  receives inputs A, B, C, and D and clock Clk — 0, and, using flip-flops FF and a four-input AND gate AD 4 , generates an output Q. 
         [0051]      FIGS. 10A-10C  show the truth tables  1000 A,  1000 B, and  1000 C illustrating an operation of circuit BB in  FIG. 9 , in accordance with some embodiments. In table  1000 A, output A_FF depends on input signal A and clock Clk — 0. In some embodiments, at the rising edge of clock Clk — 0, output A_FF follows input A (e.g., output A_FF is High if input A is High, and output A_FF is Low if input A is Low). When clock Clk — 0 is at a constant level (e.g., Low or High), output A_FF is unchanged. Similarly, in table  1000 B, output B_FF depends on input signal B and clock Clk — 0. In some embodiments, at the rising edge of clock Clk — 0, output B_FF follows input B (e.g., output A_FF is High if input A is High, and output B_FF is Low if input A is Low). When clock Clk — 0 is at a constant level (e.g., Low or High), output A_FF is unchanged. In table  1000 C, output Q depends on signals A_FF, B_FF, C, and D. Output Q is High when all signals A_FF, B_FF, C, and D are high. Otherwise, output Q is low. 
         [0052]      FIG. 11  is a detailed diagram  1100  of circuit UPDOWN in  FIG. 7  (e.g., circuit  1100 ), in accordance with some embodiments. Signal UP is generated based on signals Up_ 0  and Up_ 1  passing through OR gate ORUP and AND gate ANDUP and flip-flops FFUP. Similarly, signal DN is generated based on signals Dn_ 0  and Dn_ 1  passing through OR gate ORDN and AND gate ANDDN and flip-flops FFDN. Signals UP and DN are activated when signal Toggle_a is activated (e.g., high, when input data IN is transitioning). 
         [0053]      FIGS. 12A-12D  show truth tables  1200 A,  1200 B,  1200 C, and  1200 D illustrating an operation of circuit  1100  in accordance with some embodiments. In table  1200 A, signal UP_int depends on signals Up_ 0 , Up_ 1 , and clock Clk — 0. Signal UP_int is unchanged when clock Clk — 0 is at a constant level (e.g., Low or High) or both signals Up_ 0  and Up_ 1  are Low. At the rising edge of clock Clk — 0 signal UP_int is Low when signal Up_ 0  is High, and signal UP_int is High when signals UP_ 0  and UP_ 1  are Low and High, respectively. In table  1200 B, signal UP depends on signals UP_int, Toggle, and Clk — 0. Signal UP is unchanged when clock Clk — 0 is at a constant level High or Low. At the rising edge of clock Clk — 0, signal UP is High when both signals UP_int and Toggle are High, and is Low otherwise. 
         [0054]    In table  1200 C, signal DN_int depends on signals Up_ 0 , Up_ 1 , and clock Clk — 0. Signal DN_int is unchanged when clock Clk — 0 is at a constant level Low or High, or both signals Dn_ 0  and Dn_ 1  are Low. At the rising edge of clock Clk — 0 signal DN_int is Low when signal Dn_ 0  is High, and signal DN_int is High when signals DN_ 0  and DN_ 1  are Low and High, respectively. In table  1200 D, signal DN depends on signals DN_int, Toggle, and Clk — 0. Signal DN is unchanged when clock Clk — 0 is at a constant level High or Low. At the rising edge of clock Clk — 0, signal DN is High when both signals DN_int and Toggle are High, and is Low otherwise. 
         [0055]    A number of embodiments have been described. It will nevertheless be understood that various modifications may be made without departing from the spirit and scope of the invention. The above method embodiments show exemplary steps, but they are not necessarily performed in the order shown. Steps may be added, replaced, changed order, and/or eliminated as appropriate, in accordance with the spirit and scope of the disclosed embodiments. Each claim of this document constitutes a separate embodiment, and embodiments that combine different claims and/or different embodiments are within the scope of the disclosure and will be apparent to those of ordinary skill in the art after reviewing this disclosure.