# Patent

## Title
Adaptive tuning circuit to maximize output signal amplitude for an amplifier

## Abstract

An adaptive tuning circuit to maximize the output signal amplitude of a band-pass amplifier, comprising a control circuit to tune the peak frequency of the amplifier by monitoring the change in the output signal amplitude over two successive time sampling intervals. In some embodiments, the control circuit comprises an envelope detector and a switched capacitor circuit to provide voltages indicative of the difference in the output signal amplitude over two successive time intervals. Other embodiments are described and claimed.

## Background
FIELD
Embodiments of the present invention relate to electronic circuits, and more particularly, to adaptive tuning circuits for tuning band-pass amplifiers.
BACKGROUND
Band-pass amplifiers are used in a wide variety of electronic systems. In particular, inductor-load amplifiers may be used to receive and amplify narrow band clock signals in high-speed serial input-output communication links. It is desirable for the peak of the response of the amplifier to match the center frequency of the narrow band clock signal. However, the peak of the response may depend upon the inductance of the inductor-load, as well as the capacitance of capacitors connected in parallel with the inductor-load. Accordingly, once a band-pass amplifier has been fabricated in an integrated circuit process technology, it would be useful to provide a control circuit to adaptively tune the band-pass amplifier when used in a system, so as to match the center frequency of a received narrow band clock signal.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1a illustrates some embodiments of the present invention.
FIG. 1b illustrates the relative timing diagrams of three clock signals used in the embodiments of FIG. 1a. 
FIG. 2 illustrates in more detail an embodiment of the tunable band-pass amplifier in the embodiments of FIG. 1a. 
FIG. 3 illustrates in more detail an embodiment of the sampler circuit in the embodiments of FIG. 1a. 
FIG. 4 illustrates in more detail an embodiment of the envelope detector in the embodiments of FIG. 1a. 
FIG. 5 illustrates an application of some embodiments of the present invention to a computer system.



DESCRIPTION OF EMBODIMENTS
In the descriptions that follow, the scope of the term “some embodiments” is not to be so limited as to mean more than one embodiment, but rather, the scope may include one embodiment, more than one embodiment, or perhaps all embodiments.
FIG. 1a is a high-level abstraction representing some embodiments of the present invention, and depicts a control loop for tuning amplifier 102. Amplifier 102 is a tunable band-pass amplifier. A control loop comprising control circuit 108 and finite state machine 110 tunes amplifier 102. For some embodiments, tuning is accomplished by changing the reactance of a load in amplifier 102, which may be realized by switching in or switching out various capacitive circuits in the reactive load. For other embodiments, tuning of amplifier 102 may be accomplished by changing various bias currents, or perhaps other parameters, of amplifier 102.
Finite state machine 110 has a set of states, and as it sequences through states in the set of states, amplifier 102 is tuned. For some embodiments, finite state machine 110 may comprise a counter having a counter value. For some embodiments, the counter initially counts down from its maximum counter value. Each time its counter value is decremented by one, a capacitive circuit is switched out, and amplifier 102 is tuned so that its peak frequency is shifted higher. Peak frequency refers to the band-pass center frequency of amplifier 102, that is, the frequency for which the transfer function of amplifier 102 has a maximum absolute value.
Amplifier 102 receives a differential input signal at input ports 104a and 104b to provide a differential output signal at its output ports 106a and 106b. While tuning amplifier 102, control circuit 108 samples the amplitude of the differential output signal. For some embodiments, if control circuit 108 detects that the amplitude has decreased from one time interval to the next, then finite state machine 110 is disabled so that tuning of amplifier 102 stops.
In applications where amplifier 102 amplifies a differential clock signal, control circuit 108 disables finite state machine 110 if it detects that tuning has caused the peak frequency to shift past the frequency of the differential clock signal. In this way, it is expected that if the various reactance values available for tuning are properly chosen, amplifier 102 will be tuned so that its peak frequency is close to that of the received clock frequency.
FIG. 2 provides a circuit representation of amplifier 102 according to some embodiments. Amplifier 102 comprises a differential pair, transistors 202a and 202b, with a tail current provided by transistor 204. The gate of transistor 204 is biased by a voltage VBIAS. A reactive load comprising inductor L and a set of capacitive circuits Cj loads the drains of the differential pair, where j is an index ranging over the integers 0,1, . . . , n−1. Switching in or switching out capacitive circuits Cj tunes amplifier 102.
Inductor L may in practice comprise two or more discrete inductors. For simplicity, the circuit diagram of FIG. 2 shows inductor L as a center-tapped inductor, but for some embodiments, there may be one inductor coupling one drain of the differential pair to the drain of transistor 208 and a second inductor coupling the other drain of the differential pair to the drain of transistor 208.
A set of control voltages, [bn-1, bn-2, . . . , b0] switches in or switches out various capacitive circuits in the set of capacitive circuits Cj, where the control voltage bj is associated with capacitive circuit Cj for each j=0,1, . . . , n−1. Each capacitive circuit Cj comprises two capacitors, one connected to one drain of the differential pair and the other connected to the other drain of the differential pair. For bj HIGH, its associated capacitive circuit Cj is switched in so that each capacitor in capacitive circuit Cj has a terminal connected to ground (or substrate) 206 via a switch, such as a nMOSFET (n-Metal Oxide Semiconductor Field Effect Transistor) that is switched ON.
The control voltage bj effectively switches in or switches out its associated capacitive circuit Cj. When a capacitive circuit is switched in, a first capacitor within the capacitive circuit is effectively connected in parallel with a first inductive load connected to a first drain of the differential pair, and a second capacitor is effectively connected in parallel with a second inductor connected to a second drain of the differential pair. By switching out more capacitive circuits, the peak frequency (band-pass center frequency) of amplifier 102 shifts higher, whereas by switching in more capacitive circuits, the peak frequency shifts lower.
The particular subset of the set of capacitive circuits that are adaptively switched out is determined by the state of finite state machine 110. As an example, suppose finite state machine 10 comprises a counter where the state is the value of the counter. Let c denote the counter value of counter, and write the set of control voltages [bn-1, bn-2, . . . , b0] as [ bH  bL], where bL is a vector of dimension m where m≦n. For those embodiments for which finite state machine 110 is realized by a counter, the vector bL is set by the counter by establishing a correspondence between the counter value c and bL.
This correspondence may be designed in a number of ways. For example, a thermometer encoder may be used to encode the counter value c into a set of m logic voltages, where the counter value is a M bit word where 2M=m. The encoding may be chosen such that initially each [ bL]j, j=0,1, . . . , m−1, is HIGH, and when the counter is enabled to start counting down, each time the counter value decrements, [ bL]j is brought LOW where c=j. If the counter is decremented all the way to zero, then each [ bL]j, j=0,1, . . . , m−1, would have been brought LOW, and all capacitive circuits would have been switched out.
The subscripts H and L for bH and bL provide the mnemonic that bH represents the higher indexed voltages in the set [bn-1, bn-2, . . . , b0] and bL represents the lower indexed voltages. The higher indexed voltages bH may be chosen by any method, and may be set in a non-adaptive fashion. For some embodiments, the control voltages may be chosen such that choosing the higher indexed voltages bH sets the band of frequencies over which amplifier 102 is tuned. Note that bH may be the null vector if m=n, in which case all of the voltages [bn-1, bn-2, . . . , b0] are adaptively controlled by the control loop.
Control circuit 108 in the embodiment illustrated in FIG. 1a comprises envelope detector 112, sampler circuit 114, and comparator 116. Representing the differential output signal of amplifier 102 as the differential small-signal voltage {vP(t)vN(t)}, envelope detector 112 provides a differential small-signal envelope {eP(t)eN(t)} approximately given by eP(t)=LP{|vP(t)|} and eN(t)=−LP{|vN(t)|}, where LP denotes low pass filtering. The amplitude, a(t), of the differential output signal of amplifier 102 may be defined as a(t)=eP(t)−eN(t). Sampler circuit 114 effectively samples the amplitude a(t) over two consecutive time intervals. If the amplitude a(t) decreases from one sampling time interval to the next, then control circuit 108 provides a signal to disable finite state machine 110.
Three clock signals, a reset signal φ1, a pre-charge signal φ2, and an evaluate signal φ3, are utilized in the embodiment of FIG. 1a. FIG. 1b shows the relative timing for these three clock signals. FIG. 3 illustrates sampler circuit 114 in more detail, and how the reset and evaluate clock signals are utilized by sampler circuit 114. Referring to FIG. 3, sampler circuit 114 is a switched capacitor circuit comprising sampling capacitors 302a and 302b, inverters 304a and 304b, switches 306a and 306b that are closed when the reset signal φ1 is HIGH, and switches 308a and 308b that are closed when the evaluate signal φ3 is HIGH.
As FIG. 1b shows, during one complete cycle the reset signal will go from LOW to HIGH to LOW, after which the pre-charge signal will go from LOW to HIGH to LOW, and after which the evaluate signal will go from LOW to HIGH to LOW. When the reset signal φ1 is HIGH, switches 306a and 306b close so that the output port of inverter 304a is connected to its input port, and the output port of inverter 304b is connected to its input port. When switch 306a is closed, node 310a settles to some voltage V0, the voltage for which the output voltage of inverter 304a is equal to its input voltage. Similarly, when switch 306b is closed, node 310b settles to some voltage V0′, the voltage for which the output voltage of inverter 304b is equal to its input voltage. Preferably, inverters 304a and 304b should be matched so that the voltages V0 and V0′ are sufficiently close to each other.
During a reset time interval for which the reset signal is HIGH, capacitor 302a stores a charge Q approximately given by Q=C(eP(t0)−V0)+Q0, where C is the capacitance of capacitor 302a, eP(t0) is the small-signal voltage envelope at output port 312a at some time t0 within the reset time interval, and Q0 is some fixed charge due to the common-mode voltage of output port 312a. In a sense, the information represented by eP(t0) is stored in capacitor 302a. Similarly, capacitor 302b stores a charge Q′ approximately given by Q′=C(eN(t0)−V0′)+Q0, where eN(t0) is the small-signal voltage envelope at output port 312b at time t0.
In the expressions for Q and Q′, for simplicity the capacitance of capacitor 302b is taken to be equal to that of capacitor 302a, and the common-mode voltages for output ports 312a and 312b are taken to be equal, although these are not requirements. Also, the typical convention for distinguishing small-signal voltages from actual voltages is followed, where the variable for a small-signal voltage is lower case and the variable for the actual corresponding voltage is upper case. For example, referring to FIG. 3, the envelope at output port 312a for some arbitrary time t is denoted as Ep(t), whereas the corresponding small-signal envelope is written as ep(t).
After the reset signal goes LOW, the pre-charge signal φ2 goes HIGH, causing finite state machine 110 to change state, provided it has not been disabled. For some embodiments, finite state machine 110 is a counter in which it counts down when the pre-charge signal φ2 goes HIGH, provided it has not been disabled.
During the pre-charge time interval, all switches shown in FIG. 3 are open. In the approximation that the input impedances of inverters 304a and 304b may be taken as infinite, nodes 310a and 310b are floating so that the charges on capacitors 302a and 302b do not change, in which case the voltages at nodes 310a and 310b move up or down depending upon the new values of ep(t) and eN(t) during the pre-charge time interval.
That is, for constant charge, the following approximately holds:
Q=C(eP(t0)−V0)+Q0=C(eP(t1)−V(node310a))+Q0, where t1 is now some time value within the pre-charge time interval, and V(node310a) denotes the voltage at node 310a at the end of the pre-charge time interval. From this expression, it is seen that the voltage at node 310a at the end of the pre-charge time interval is given approximately by eP(t1)−eP(t0)+V0, so that the voltage at node 310a is indicative of the change in the small-signal voltage envelope eP(t) at output port 312a from the reset time interval to the pre-charge time interval.
Similarly, the voltage at node 310b at the end of the pre-charge time interval is given approximately by eN(t1)−eN(t0)+V0′, so that the voltage at node 310b is indicative of the change in the small-signal voltage envelope eN(t) at output port 312b from the reset time interval to the pre-charge time interval.
During the evaluate time interval, switches 308a and 308b are closed, so that inverters 304a and 304b are cross-coupled. For the case in which the amplitude a(t) has increased from the time reset time interval to the pre-charge time interval, a(t1)>a(t0), the voltage at node 310a is |a(t1)−a(t0)| above V0, the trip-threshold point for inverter 304a, and the voltage at node 310b is |a(t1)−a(t0)| below V0′, the trip-threshold point for inverter 304b. Cross-coupled inverters 304a and 304b amplify this difference so that node 314a is brought towards LOW and node 314b is brought towards HIGH.
Comparator 116 is clocked by the evaluate clock signal φ3 so that finite state machine 110 ignores the output of sampler circuit 114 except during the evaluate time interval. Comparator 116 helps ensure that the signal provided to finite state machine 110 is at a full logic level. For the above case in which the amplitude a(t) has increased from the time reset time interval to the pre-charge time interval, the signal provided by comparator 116 is LOW, and the interface between finite state machine 110 and comparator 116 is designed so that finite state machine 110 is enabled for a LOW control signal.
For the case in which the amplitude a(t) has decreased from the time reset time interval to the pre-charge time interval, a(t1)<a(t0), the voltage at node 310a is |a(t1)−a(t0)| below V0 and the voltage at node 310b is |a(t1)−a(t0)| above V0′. Cross-coupled inverters 304a and 304b amplify this difference so that node 314a is brought towards HIGH and node 314b is brought towards LOW. Comparator 116 provides a HIGH signal to finite state machine 110, and the interface between finite state machine 110 and comparator 116 is designed so that finite state machine 110 is disabled for a HIGH control signal.
Envelope detector 112 may be implemented in a number of ways. An example of an embodiment is shown in FIG. 4, where the input ports are denoted as INN and INP, and output ports 312a and 312b provide, respectively, the voltages EP(t) and EN(t). The circuit of FIG. 4 comprises four so-called Gilbert multipliers: transistors 402 and 404, transistors 406 and 408, transistors 410 and 404, and transistors 412 and 408.
Transistors 402 and 404 form a multiplier to sink a current at node 414 proportional to the square of the voltages on the gates of transistors 402 and 404. With capacitor 416 coupling the gate of transistor 404 to input port INN, the small-signal current sunk at node 414 by the multiplier comprising transistors 402 and 404 is proportional to the square of the small-signal voltage at input port INN. Transistors 406 and 408 form a multiplier to also sink current at node 414, but where the small-signal current is proportional to the square of the small-signal voltage at input port INP. These small-signal currents add at node 414. Diode-connected transistor 418 provides a voltage at node 414 proportional to the square root of the current sunk at node 414. As a result, after applying low pass filter 420, the voltage envelope EN(t) is provided at output port 312b. 
Transistors 410 and 404 form a multiplier to sink at node 422 a small-signal current proportional to the multiplication of the small-signal voltages on input port INP and input port INN, and transistors 412 and 408 form a multiplier to sink at node 422 a small-signal current proportional to the multiplication of the small-signal voltages on input port INN and input port INP. With diode-connected transistor 424 providing a voltage at node 422 proportional to the square of the current sunk at node 422, and low pass filter 426 providing a low pass filtering function to node 422, the voltage envelope EP(t) is provided at output node 312a. 
Transistors 404 and 408 have their gates DC biased at a bias voltage VBIAS, so that transistor 404 provides a DC tail current to transistors 402 and 410, and transistor 408 provides a DC tail current to transistors 406 and 412.
One particular application of the above-described embodiments is for the amplification of a clock signal communicated from one module to another module via a communication link, such as a point-to-point interconnect or bus. Such a communication link may generally be viewed as a transmission line. As one example, FIG. 5 illustrates a portion of a computer system comprising microprocessor 502, chipset 504, and system memory 506. FIG. 5 is a simplification of a computer system, and in practice, other functional units are most likely employed. Furthermore, some computer systems may employ more than one microprocessor. Some of the functional units in FIG. 5 may be realized by more than one discrete chip. For example, memory 506 may represent a hierarchy of memory functional units, and chipset 504 may be realized by more than one discrete chip. Embodiments of the present invention, represented as embodiment 1 in FIG. 5, may reside in chipset 504, as well as other functional units.
In the example of FIG. 5, driver 508 drives transmission line 510 with a differential clock signal, received by receiver 512, providing the received differential signal to embodiment 1. Embodiments of the present invention may find applications to other systems, and to signals other than clock signals.
Various modifications may be made to the disclosed embodiments without departing from the scope of the invention as claimed below. For example, various actions performed in the embodiments were described depending upon whether various nodes or ports were brought LOW or HIGH. However, these are often merely conventions, and various logic circuits may be designed so that the described actions occur for the complementary case in which a LOW voltage is substituted for a HIGH voltage and a HIGH voltage is substituted for a LOW voltage.
As a particular example, comparator 116 may be designed so that for the case in which the amplitude a(t) has increased from the time reset time interval to the pre-charge time interval, a(t1)>a(t0), comparator 116 provides a HIGH signal to finite state machine 110, and an interface circuit between finite state machine 110 and comparator 116 may be designed so that finite state machine 110 is enabled for a HIGH signal. This may be generalized by viewing comparator 116 as providing a Boolean voltage level when the difference in amplitudes a(t1)−a(t0) satisfies an ordered relationship with zero, where for some embodiments the Boolean voltage level may be HIGH and the ordered relationship may be >.
As another example, for some embodiments in which finite state machine 110 is a counter, finite state machine 110 may be incremented rather than decremented, so that capacitive circuits are sequentially switched in rather than switched out. In some embodiments, finite state machine 110 may be a counter that is decremented as described earlier, but where capacitive circuits are sequentially switched out rather than switched in. This merely involves designing various interface circuits between finite state machine 110 and amplifier 102. Stated in other words, different correspondences between the state of finite state machine 110 and the set of control voltages bL may be designed. The use of a thermometer encoder described earlier is merely one example of designing such a correspondence.
In other variations in the embodiments, the duals to various circuits may be employed, as is well known in the art of circuit design, where nMOSFETs are substituted for pMOSFETs, and pMOSFETs are substituted for nMOSFETs. For example, for amplifier 102, pMOSFETs rather than nMOSFETS may be used for a differential pair.
Other embodiments may utilize other types of digitally controlled tunable band-pass amplifiers than the one illustrated in FIG. 2. The embodiment of FIG. 2 is an example of a tunable band-pass amplifier in which tuning is achieved by digitally changing the reactance of its load by switching in various capacitors. However, other tunable band-pass amplifiers may be employed, where the peak frequency is tuned in a manner different from the particular embodiment of FIG. 2. For example, digitally controlled current sources, or current mirrors, may be used to change various bias currents in an amplifier so as to tune its peak frequency. Accordingly, the scope of the claims below are not necessarily limited to tunable band-pass amplifiers having a tunable reactive load, but may encompass other types of amplifiers having a tunable peak frequency that is digitally controlled.
It is to be understood in these letters patent that the meaning of “A is connected to B”, where A or B may be, for example, a node or device terminal, is that A and B are connected to each other so that the voltage potentials of A and B are substantially equal to each other. For example, A and B may be connected together by an interconnect (transmission line). In integrated circuit technology, the interconnect may be exceedingly short, comparable to the device dimension itself. For example, the gates of two transistors may be connected together by polysilicon, or copper interconnect, where the length of the polysilicon, or copper interconnect, is comparable to the gate lengths. As another example, A and B may be connected to each other by a switch, such as a transmission gate, so that their respective voltage potentials are substantially equal to each other when the switch is ON.
It is also to be understood in these letters patent that the meaning of “A is coupled to B” is that either A and B are connected to each other as described above, or that, although A and B may not be connected to each other as described above, there is nevertheless a device or circuit that is connected to both A and B. This device or circuit may include active or passive circuit elements, where the passive circuit elements may be distributed or lumped-parameter in nature. For example, A may be connected to a circuit element, which in turn is connected to B.
It is also to be understood in these letters patent that a “current source” may mean either a current source or a current sink. Similar remarks apply to similar phrases, such as, “to source current”.
It is also to be understood in these letters patent that various circuit blocks, such as current mirrors, amplifiers, etc., may include switches so as to be switched in or out of a larger circuit, and yet such circuit blocks may still be considered connected to the larger circuit because the various switches may be considered as included in the circuit block.

## Claims

1. A circuit comprising:
an amplifier to provide an output signal, the amplifier having a tunable peak frequency;
a finite state machine, having a set of states, to tune the peak frequency of the amplifier in response to sequencing through states in the set of states; and
a control circuit to provide a signal indicative of the difference in amplitudes of the output signal over two consecutive time intervals, and to disable the finite state machine from sequencing through the states when the difference in amplitudes satisfies an ordered relationship with zero.

2. The circuit as set forth in claim 1, wherein the ordered relationship is satisfied if the difference in amplitudes is less than zero.

3. The circuit as set forth in claim 1, wherein the output signal is a differential signal.

4. The circuit as set forth in claim 1, wherein the finite state machine comprises a counter.

5. The circuit as set forth in claim 1, the amplifier further comprising a tunable reactive load.

6. The circuit as set forth in claim 5, the tunable reactive load comprising a set of capacitive circuits, the counter having a counter value and coupled to the tunable reactive load so that the capacitance of the tunable reactive load decreases as the counter value decreases.

7. A computer system comprising:
a transmission line;
a microprocessor comprising a driver to drive the transmission line;
a memory;
a chipset coupled to the transmission line and to the memory, the chipset comprising:
an amplifier to provide an output signal, the amplifier having a tunable peak frequency;
a finite state machine, having a set of states, to tune the amplifier in response to sequencing through states in the set of states; and
a control circuit to provide a signal indicative of the difference in amplitudes of the output signal at a first time and a second time subsequent to the first time, and to disable the finite state machine from sequencing through the states when the difference in amplitudes satisfies an ordered relationship with zero.

8. The computer system as set forth in claim 7, wherein the ordered relationship is satisfied if the difference in amplitudes is less than zero.

9. The computer system as set forth in claim 7, wherein the output signal is a differential signal.

10. The computer system as set forth in claim 7, wherein the finite state machine comprises a counter.

11. The computer system as set forth in claim 10, the amplifier comprising a tunable reactive load comprising a set of capacitive circuits, the counter having a counter value and coupled to the tunable reactive load so that the capacitance of the tunable reactive load decreases as the counter value decreases.