Method and apparatus for offset calibration of a multi-mode high-speed comparator
09780763 · 2017-10-03
Assignee
Inventors
Cpc classification
H02M1/0009
ELECTRICITY
H02M1/0025
ELECTRICITY
H02M3/156
ELECTRICITY
International classification
G01R35/00
PHYSICS
H02M1/08
ELECTRICITY
H02M3/156
ELECTRICITY
Abstract
A calibration circuit including mode, bias, calibration, offset, resistance and code modules. The mode module selects operation in a first or second mode. The bias module generates, for the preamplifier, a first and second bias currents respectively while in first and second modes. The calibration module, during calibration of first mode, connects inputs of preamplifier together to receive a predetermined voltage. The offset module determines an offset based on output voltages of preamplifier or output voltage of comparator and generates a control signal based on whether the offset is within a predetermined range. The resistance module, based on control signal and during calibration of first mode, adjusts a resistance of a resistor in a first resistance set of preamplifier for the first mode. The code module generates a calibration code based on the resistance. The resistance module calculates a second resistance set for second mode based on the calibration code.
Claims
1. A calibration circuit comprising: a mode module to select operation in a first mode or a second mode; a bias module to generate (i) a first bias current for a preamplifier of a comparator while in the first mode, and (ii) a second bias current for the preamplifier while in the second mode; a calibration module to, during calibration of the first mode, (i) connect inputs of the preamplifier together to receive a predetermined voltage; an offset module to (i) determine an offset based on (a) output voltages of the preamplifier, or (b) an output voltage of the comparator, and (ii) generate a control signal based on whether the offset is within a first predetermined range; a resistance module to, based on the control signal and during calibration of the first mode, adjust a first resistance of a resistor in a resistance set of the preamplifier for the first mode; and a code module to generate a calibration code based on the first resistance, wherein the resistance module is to, subsequent to calibrating the first mode, calculate a second resistance set for second mode based on the calibration code determined during the calibration of the first mode.
2. The calibration circuit of claim 1, wherein: the offset module is to: generate the control signal to adjust the first resistance, monitor the output voltage of the comparator while the first resistance is being adjusted, and when a digital state or a polarity of the output voltage changes, generate the control signal to cease adjustment of the first resistance; the first resistance is a calibrated resistance for the first mode when the digital state or polarity of the output voltage changes; and the code module is to generate the calibration code to include the calibrated resistance.
3. The calibration circuit of claim 1, wherein: the offset is a first offset; and the offset module is to: monitor two or more of (i) the output voltages of the preamplifier, and (ii) the output voltage of the comparator; determine a plurality of offsets based respectively on (i) the output voltages of the preamplifier, and (ii) the output voltages of the comparator, wherein the plurality of offsets include the first offset; and generate the control signal based on the plurality of offsets.
4. The calibration circuit of claim 1, wherein: the code module is to generate the calibration code to include for the first mode the first resistance, the first bias current and a first gain of the preamplifier; and the resistance module is to calibrate the first mode based on (i) the first resistance, (ii) the first bias current, and (iii) the first gain of the preamplifier for the first mode.
5. The calibration circuit of claim 4, wherein: the resistance module is to calculate the second resistance set based on (i) the second bias current, (ii) a second gain of the preamplifier for the second mode; and (iii) the first resistance set, and the resistance module is to determine a second resistance of the resistor based on the calibration code.
6. The calibration circuit of claim 1, wherein the offset module is to: determine a total offset of the calibration circuit for the first mode based on (i) an offset for the preamplifier, and (ii) an offset for the comparator; and based on the total offset, generate the control signal to adjust the first resistance.
7. The calibration circuit of claim 6, wherein the code module is to generate the calibration code if the total offset is within a second predetermined range.
8. The calibration circuit of claim 6, wherein: the offset module is to determine a total offset of the calibration circuit for the first mode; and based on the total offset determined for the first mode, generate the control signal to adjust the first resistance; and the code module is to generate the calibration code if the total offset is within a predetermined range.
9. A comparator module comprising: the calibration circuit of claim 1; the preamplifier comprising (i) two input differential pair transistors, and (ii) two resistors connected in series respectively with the two input differential pair transistors; and the comparator.
10. A power converter comprising: the comparator module of claim 9; a power stage comprising a power transistor, a diode, an inductor, and an output capacitor; an output voltage sense circuit to receive an output voltage from the output capacitor; an error amplifier to (i) receive the output voltage, and (ii) generate a first input voltage for the comparator module; and a sensing circuit to (i) detect an amount of current passing through the inductor, and (ii) based on the amount of current passing through the inductor, generate a second input voltage for the comparator module, wherein the comparator is to (i) compare the first input voltage to the second input voltage, and (ii) based on the comparison, control a state of the transistor to adjust the amount of current passing through the inductor.
11. A calibration circuit comprising: a mode module to select operation in a first mode or a second mode; a bias module to generate (i) a first bias current for a preamplifier of a comparator while in the first mode, and (ii) a second bias current for the preamplifier while in the second mode; an offset module to, during calibration of the first mode, monitor an output voltage of the comparator, and (ii) generate a control signal based on the output voltage; a resistance module to, based on the control signal and during calibration of the first mode, adjust a first resistance of a resistor of the preamplifier for the first mode; and a code module to generate a calibration code based on the first resistance, wherein the resistance module is to, subsequent to calibrating the first mode, calibrate the second mode based on the calibration code in the first mode.
12. The calibration circuit of claim 11, wherein: the offset module is to: generate the control signal to adjust the first resistance, monitor the output voltage of the comparator while the first resistance is being adjusted, and when a digital state or a polarity of the output voltage changes, generate the control signal to cease adjustment of the first resistance; the first resistance is a calibrated resistance for the first mode when the digital state or polarity of the output voltage changes; and the code module is to generate the calibration code to include the calibrated resistance.
13. The calibration circuit of claim 11, wherein: the code module is to generate the calibration code to include for the first mode the first resistance, the first bias current and a first gain of the preamplifier; the resistance module is to calibrate the second mode based on the first resistance, the first bias current, the first gain of the preamplifier for the first mode, the second bias current, and a second gain of the preamplifier for the second mode; and the resistance module is to, while calibrating the second mode, determine a second resistance of the resistor based on the calibration code.
14. The calibration circuit of claim 11, wherein the offset module is to: determine a total offset of the calibration circuit for the first mode based on (i) an offset for the preamplifier, and (ii) an offset for the comparator; and based on the total offset, generate the control signal to adjust the first resistance.
15. A method of calibrating a comparator circuit comprising: selecting operation in a first mode or a second mode; generating (i) a first bias current for a preamplifier of a comparator while in the first mode, and (ii) a second bias current for the preamplifier while in the second mode; during calibration of the first mode, (i) connecting inputs of the preamplifier together to receive a predetermined voltage, (ii) determining an input referred offset of the preamplifier based on (a) output voltages of the preamplifier, and (b) an output voltage of the comparator, and (iii) generating a control signal based on whether the offset is within a first predetermined range; based on the control signal and during calibration of the first mode, adjusting a first resistance of a resistor in a resistance set of the preamplifier for the first mode; generating a calibration code based on the first resistance; and subsequent to calibrating the first mode, calculating a second resistance set for second mode based on the calibration code determined during the calibration of the first mode.
16. The method of claim 15, further comprising: generating the control signal to adjust the first resistance; monitoring the output voltage of the comparator while the first resistance is being adjusted; when a digital state or a polarity of the output voltage changes, generating the control signal to cease adjustment of the first resistance, wherein the first resistance is a calibrated resistance for the first mode when the digital state or polarity of the output voltage changes; and generating the calibration code to include the calibrated resistance.
17. The method of claim 15, further comprising: generating the calibration code to include for the first mode the first resistance, the first bias current and a first gain of the preamplifier; calculating the second resistance set based on the first resistance, the first bias current, the first gain of the preamplifier for the first mode, the second bias current, and a second gain of the preamplifier for the second mode; and while calculating the second resistance set, determining a second resistance of the resistor.
18. The method of claim 15, further comprising, while calculating the second resistance set, refraining from monitoring the (a) the output voltages of the preamplifier, and (b) the output voltage of the comparator.
19. The method of claim 15, further comprising: determining, for the first mode, a total offset of the preamplifier and the comparator based on (i) an offset for the preamplifier, and (ii) an offset for the comparator; and based on the total offset, generating the control signal to adjust the first resistance.
20. The method of claim 15, further comprising: determining, for the first mode, a total offset of the preamplifier and the comparator based on (i) an offset for the preamplifier, and (ii) an offset for the comparator; based on the total offset, generating the control signal to adjust the first resistance; and generating the calibration code if the total offset is within a second predetermined range.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6) In the drawings, reference numbers may be reused to identify similar and/or identical elements.
DESCRIPTION
(7) Many semiconductor components, such as a power converter, need a high-speed and high-precision comparator module. The high-speed and high-precision comparator module may include a preamplifier followed by a comparator. The preamplifier amplifies input signals prior to being received by the comparator. This amplification decreases time for the comparator to detect and respond to changes in the input signals and allows for accurate detection of the input signals due to pre-amplification. As a result, high-speed/high-accuracy comparisons are conducted by this comparator module.
(8) A high-speed comparator receives a high-bias current, which is selected for an application of the corresponding semiconductor component. An output of the high-speed comparator can be accurate by (i) including input devices, such as p-channel metal-oxide-semiconductor field-effect transistor (MOSFET) transistors, in the preamplifier that are capable of receiving high-bias current levels, and (ii) calibrating one or more resistances of the preamplifier to compensate for voltage offsets associated with the preamplifier and the comparator.
(9) In certain applications, a high-speed comparator may be operated in different modes, such as a high-bias current mode or a low-bias current mode. As an example, the high-bias current mode may be a pulse width modulation (PWM) mode that requires high-speed comparisons with a high-bias current. The low-bias current mode may be a pulse frequency modulation (PFM) mode that requires a low-bias current and a highly accurate comparator. The low-bias current mode may be used during a low power mode (e.g., a sleep mode) of a network device. The accuracy of this comparator while operating in the low-power mode is high in order to satisfy certain system level accuracy specifications.
(10) The examples set forth below include comparator modules that are capable of operating in any number of modes. The comparator modules allow for high-speed operation while providing highly accurate outputs. The operating modes have respective bias currents and resistance settings for minimal voltage offsets to provide highly accurate comparator outputs.
(11) Although each of the comparator modules operates in multiple modes, each of the comparator modules may be calibrated once. A calibration code is determined during the single calibration and while operating in one of the modes (e.g., a first mode). One or more other modes use the same calibration code determined for the first mode. Although the calibration code is determined while operating in and for calibration of the first mode, the other modes use the same calibration code without re-doing the calibration again. By generating a single calibration code and using the single calibration code for multiple modes rather than determining multiple calibration codes respectively for the modes, total calibration time for the modes is decreased.
(12) Also, as disclosed below a same calibration module, calibration feedback loop, and corresponding devices may be used for calibrating the modes of a comparator module. By sharing the same calibration module, calibration feedback loop and devices, semiconductor area associated with calibration for multi-mode comparators is minimized. Semiconductor area is minimized because a minimal number of devices and processing power is needed to calibrate the modes of the comparator module. Also since the calibration is performed once for first mode and is not repeated for the other modes, the calibration processing time is reduced while the comparator experiences high-accuracy based on the first calibration while the comparator operates in the other modes.
(13)
(14) The preamplifier 108 receives and amplifies input signals. The amplified input signals are provided to the comparator 110, which compares the amplified input signals to generate an output signal. In one embodiment, the output signal is HIGH (e.g., a digital ‘1’ or equivalent voltage) if V.sub.OA is greater than V.sub.OB and is LOW (e.g., a digital ‘0’ or equivalent voltage) if V.sub.OA is less than V.sub.OB. In another embodiment, the output signal is ‘1’ or ‘−1’.
(15) The calibration module 112 performs a calibration process to calibrate operating modes of the comparator module 106. The calibration module 112 provides the two input signals V.sub.INP, V.sub.INN of the pre-amplifier 108 with a same pre-determined voltage. The calibration module 112 then receives and monitors the amplified signals V.sub.OA, V.sub.OB of the pre-amplifier 108 and a voltage of the output control signal V.sub.CTRL from the comparator. One voltage offset calibration code may be determined based on the output control signal V.sub.CTRL. In one embodiment, values of a calibration code are determined for a first mode based on the voltage offsets. The values of the calibration code include a bias (or quiescent) current and one or more resistance values for the preamplifier 108. One or more resistance values for one or more other modes are determined based on the calibration code. The calibration process is further described below.
(16)
(17) The source resistor R.sub.S is connected in series with the transistor T and the diode D between a voltage input terminal 206 and a ground terminal (or reference terminal) 208. The source resistor R.sub.S, the transistor T and the diode D perform as a voltage divider. The voltage input terminal 206 receives an input voltage V.sub.IN, which may be from a power source 210. The power source 210 may be a power supply, such as a battery or utility power source, or other power source of the network device 10 of
(18) The current-sense amplifier A.sub.CS detects and amplifies a voltage across the source resistor R.sub.S. The voltage across the source resistor R.sub.S is representative of an amount of current passing through the inductor L. An output of the current-sense amplifier A.sub.CS is provided to the first summer 204 and is summed with a corrective ramp signal 212 provided to the first summer 204. The corrective ramp signal 212 is provided to prevent sub-harmonic oscillation for duty cycles of the input voltage V.sub.IN of larger than 50% therefore slope compensation of current passing through the inductor L is performed for duty cycles greater than 50%. The output of the summer 204 is a first input voltage V.sub.INP to the preamplifier 108.
(19) The transistor T is connected in series between the source resistor R.sub.S and the diode D. An output of the transistor T is provided to the inductor L. The diode D may be a Zener diode as shown and is connected between the output of the transistor T and the ground terminal 208. The inductor L is connected at a first end to the transistor T and the diode D and at a second end to the capacitor C and an output terminal 214. The capacitor is connected in series with the second resistance R2 between (i) the inductor L and the output terminal 214, and (ii) the ground terminal 208. The output terminal 214 may be connected to a load resistance R.sub.L, which in turn may be connected to the ground terminal 208. The power converter 104 converts the input V.sub.IN to the output voltage V.sub.OUT. As an example, the input voltage V.sub.IN may be 5V and the output voltage V.sub.OUT may be 1.2V. The gain of the power converter 104 is not affected by varying V.sub.IN, but rather changes with variation of load resistance R.sub.L. The output voltage V.sub.OUT can be regulated due to feedback loop 205 and remains stable with regard to changes of the input voltage V.sub.IN, and load current.
(20) The feedback circuit 205 includes a second summer 216 and a second amplifier 218. The second summer 216 receives a reference voltage V.sub.REF and subtracts the output voltage V.sub.OUT from the reference voltage V.sub.REF to generate an error signal. The second amplifier 218 amplifies and/or integrates an output of the second summer 216 (i.e. the error signal), which is provided to a compensation network 219 to generate a second input voltage V.sub.INN. The second input voltage V.sub.INN is generated based on the error signal and is provided to the preamplifier 108. The second amplifier 218 determines an error between the reference voltage V.sub.REF, which is a target voltage, and the output voltage V.sub.OUT. The comparator module 106 operates to control the transistor T to adjust the output voltage V.sub.OUT to match the reference voltage V.sub.REF.
(21) The preamplifier 108 amplifies the input voltages V.sub.INP, V.sub.INN to generate the amplified voltages V.sub.OA, V.sub.OB, which are provides as input voltages to the comparator 110. The comparator 110 generates a control signal V.sub.CTRL based on the voltages V.sub.OA, V.sub.OB. The comparator 110 is a high-speed comparator as it receives amplified input voltages from the preamplifier 108, which allows for fast detection of the input voltages and quick response time to generate the control signal V.sub.CTRL. The comparator 110 determines whether V.sub.OA is greater than V.sub.OB and based on this determination generates the control signal V.sub.CTRL.
(22) The comparator module 106 has many offset sources including: 1) mismatch of the two transistors T1 and T2; 2) mismatch of the resistors R.sub.A and R.sub.B shown in
(23) A total offset (also referred to as the “input referred offset”), which is the offset seen at the input of the preamplifier 108, may be determined based on equation 1, where V.sub.OS.sub._.sub.TOT is a total offset experienced by the preamplifier 108 and the comparator 110, V.sub.OSPREAMP is the offset experienced by the preamplifier 108, V.sub.OS.sub._.sub.COMP is an offset experienced by the comparator 110, and g.sub.Pre-amp is a gain of the pre-amplifier 108. V.sub.OSPREAMP is the offset seen at the inputs of the preamplifier 108 and contributed by the preamplifier 108. V.sub.OS.sub._.sub.COMP divided by g.sub.Pre-amp is the offset seen at the inputs of the preamplifier 108 and contributed by the comparator 110.
(24)
(25) During the calibration phase, the calibration module 112 provides the two input signals of the pre-amplifier (V.sub.INP and V.sub.INN) a same pre-determined voltage and monitors comparator output signal V.sub.CTRL and the amplified signals (or voltages) V.sub.OA, V.sub.OB. In one embodiment and as a first offset calibration example, the calibration module 112 monitors the control signal V.sub.CTRL and not the voltages V.sub.OA, V.sub.OB. The calibration module 112 generates a digital resistance adjustment code RES based on the monitored voltages and offsets, which are determined based on the monitored voltages. The digital adjustment code RES sets and/or adjusts values (e.g., R.sub.A, R.sub.B) of resistors of the preamplifier 108. As an example, an offset calibration value may be determined based on the control signal V.sub.CTRL and then changes may be made in the first digital resistance adjustment code RES to calibrate the offset calibration value. The calibration module 112 adjusts the digital resistance adjustment code RES within a small step period until V.sub.CTRL toggles state of the transistor T from previous state. The digital resistance adjustment code RES is then selected as a final code. This way the total offset V.sub.OS.sub._.sub.TOT is calibrated.
(26) As another example, a second offset calibration may be performed based on a difference between the voltages V.sub.OA, V.sub.OB. The calibration module 106 adjusts the digital resistance adjustment code RES during a small step period until V.sub.OA is equal to V.sub.OB. Then the digital resistance adjustment code RES is selected as the final code. This way only the pre-amplifier offset V.sub.OSPREAMP is calibrated. The first offset calibration provides a higher offset coverage than the second offset calibration.
(27)
(28) The comparator module 106 further includes switches 230 and the calibration module 112 includes switches 232 and a power source 234. The power source 234 provides a predetermined voltage to the inputs of the preamplifier 108 when the switches 230 are open and the switches 232 are closed, which occurs during the calibration mode. The switches 230, 232 may be implemented as transistors. The calibration module 112 controls operation of the switches 230, 232 and or selection of the predetermined voltage generated by the power source 234.
(29) Due to variances in the transistors T1, T2 and the variable resistors R.sub.A, R.sub.B, a first offset may exist between the voltages V.sub.INP, V.sub.INN. A second offset may exist between the voltages V.sub.OA, V.sub.OB due to the first offset and variability between components in the comparator 110 (or second stage). The second offset is not as dominate as the first offset in general, since the second offset is attenuated by the gain of the preamplifier 108 (first stage). The first offset is represented by the ±voltage source V.sub.OFFSET, which is connected to the control terminal of transistor T2, such that when V.sub.INP and V.sub.INN are connected to receive the same predetermined voltage during the calibration mode, the V.sub.OFFSET is the intrinsic offset from the pre-amplifier 108. A transconductance gain g.sub.m of the preamplifier 108 changes with change in (i) the bias current I provided by the bias current source 300, and (ii) resistances of the variable resistors R.sub.A, R.sub.B. The transconductance g.sub.m for the preamplifier 108 may be represented by equation 2, where ΔI=I.sub.A−I.sub.B, I.sub.A is an amount of current passing through transistor T1, and I.sub.B is an amount of current passing through transistor T2 during the calibration mode with V.sub.INP and V.sub.INN connected together to receive the predetermined voltage.
ΔI=g.sub.m−V.sub.OFFSET (2)
Since I.sub.A and I.sub.B are different, R.sub.A and R.sub.B should be different in order for V.sub.OA to be equal to V.sub.OB. Equation 3 provides a relationship between the bias current I and the resistances R.sub.A, R.sub.B. Equation 3 can be deducted from a product of I.sub.A and R.sub.A being equal to a product of I.sub.B and R.sub.B, such that V.sub.OA is equal to V.sub.OB after calibration.
(30)
(31) Referring to
(32)
(33) The systems disclosed herein may be operated using numerous methods, an example method is illustrated in
(34) The method may begin at 500. At 501, the calibration module 112 selects operation in the calibration mode. At 502, the mode module 400 selects a first mode to calibrate and initiates operation in the first mode. This includes generating an indication signal MODE to indicate the operating mode selected. In one embodiment, the first mode is a high-bias current mode and/or a PWM mode. The high-bias current mode has a higher bias current provided by the bias current source 300 than bias current provided during a low-current mode. As an example, the high-bias current mode may include the bias current source 300 providing a bias current that is 10 times or more higher than the bias current provided by the bias current source 300 during the low-current mode. As another example, the bias current is 50 micro amperes (μA) during the high-bias current mode and 5 μA during the low-current mode. In one embodiment, the high-bias current mode is calibrated subsequent to calibration of the low-bias current mode. As an alternative, the low-bias current mode may be calibrated subsequent to the high-bias current mode.
(35) At 504, the bias module 402, based on the indication signal MODE, controls operation of the bias current source 300 to generate a bias current I associated with the first mode. This may include generating a high-bias current if operating in the high-bias current mode. The bias current I is low if operating in low-bias current mode and high if operating in the high-bias current mode.
(36) At 506, the resistance module 404, based on the indication signal MODE, sets resistances of one or more of the variable resistors R.sub.A, R.sub.B to initial values for the first mode. The resistance values may be set based on a default code. In one embodiment, a resistance of one of the resistors R.sub.A, R.sub.B is set at an initial value and is maintained at the initial value throughout calibration of the first mode, whereas resistance of the second resistor may be adjusted during the calibration of the first mode. The goal of the second resistor R.sub.1B (resistor R.sub.B for the first mode) change is to minimize the input referred offset from the comparator module 106. After calibration is done, one resistance set (R.sub.1A, R.sub.1B) is generated for the first mode to maintain low input referred offset. If the total input referred offsets for different bias current modes are slightly different, calibrations could be performed for other bias current modes to aid in providing high-precision. However, this would increase circuit and/or processor requirements and require more computing time to achieve. Instead, the disclosed method may only calibrate the offset for one mode (e.g., the first mode), and perform calculations to automatically generate appropriate resistance value sets (R.sub.A, R.sub.B value sets) for one or more other modes. The disclosed hardware and method minimizes hardware and computing time requirements while maintaining low-input referred offset for all corresponding modes.
(37) At 508, the offset module 406, based on the indication signal MODE, connects V.sub.INP and V.sub.INN (or inputs of the preamplifier 108 together and to a power source, such the inputs receive a same predetermined voltage during the calibration mode. This causes V.sub.INP to be equal to V.sub.INN. The inputs of the preamplifier 108 are later separated during the normal operation mode.
(38) At 509, the calibration module 112 monitors one or more of the voltages V.sub.CTRL, V.sub.OA, V.sub.OB, and determines one or more of the offsets. The control signal V.sub.CTRL is monitored until the transistor T is toggled from a current state to a next state. A main offset V.sub.OS comes from mismatch from T1 and T2, which is represented by equation 4, where σ is a device specific coefficient and/or constant value, W is a width of T1 or T2, and L is the width of T1 or T2. The offset of the preamplifier 108 is a function of and/or is based substantially on the main offset V.sub.OS. The width and length of T1 may be equal to respectively the width and length of T2. The main offset V.sub.OS may remain the same. If the main offset V.sub.OS is small, then the size (width and/or length) of T1 and T2 is large. If the main offset V.sub.OS is large, then the size of T1 and/or T2 is small. Other smaller offset sources are associated with the resistance mismatch and the offset of the comparator 110.
(39)
(40) At 510, the offset module 406 determines whether the input referred offset for the module (i.e. V.sub.OS.sub._.sub.TOT) is within a corresponding predetermined range of a minimum offset value. This may include determining whether V.sub.CTRL has toggled and/or whether V.sub.OA is equal to V.sub.OB. If the V.sub.CTRL changes state from a previous state (e.g., from 1 to 0, or from 0 to 1) with small change of R.sub.B and/or if V.sub.OA is equal to V.sub.OB, then the calibration is done for determining the resistance set (i.e. R.sub.A and R.sub.B values) for the first mode. The resistance set for the first mode is represented as RES1 in
(41) In one embodiment, tasks 508 and 510 are performed such that the offsets are also determined for one or more other modes. At 510, if the input referred offsets are not within predetermined ranges for the one or more other modes, task 512 is performed, otherwise task 513 is performed. Once task 513 is finished, the calibration for first mode is done and the calibration code has been determined.
(42) At 512, the offset module 406 may generate the control signal CTRL to adjust the resistances of the resistors R.sub.B to reduce the offsets. The resistance module 404 generates the digital resistance adjustment signal RES based on the control signal CTRL. In one embodiment, the offset module 406 adjusts R.sub.B in a certain direction to change state (e.g., digital state) based on polarity of the control signal V.sub.CTRL. For example, to determine whether the resistances R.sub.A, R.sub.B are set, such that V.sub.OFFSET is minimized or within a predetermined range of a minimum offset value (e.g., 0), the resistance R.sub.B is adjusted until the state and/or polarity of the control signal V.sub.CTRL changes. When the state and/or polarity of the control signal V.sub.CTRL changes, this is an indication that the resistances R.sub.A, R.sub.B are set such that V.sub.OFFSET is minimized or within a predetermined range of a minimum offset value (e.g., 0). Task 509 is performed subsequent to task 512.
(43) When the calibration module 112 has finished iteratively performing tasks 509, 510 and 512, calibration of the first mode is completed. At 513, the code module 408 generates a calibration code and may generate a calibration code signal CODE indicating the calibration code based on the control signal CTRL and a clock signal CLK generated by the clock generator 410. The calibration code may include resistances of the resistors R.sub.A, R.sub.B set during calibration of the first mode and/or other information as described above. The resistances may be the final resistances of the resistors R.sub.A, R.sub.B at the end of calibrating the first mode. The calibration code may further include the bias current and the gain of the preamplifier for the first mode that existed at the end of calibrating the first mode. The resistances for the first mode may be represented as R.sub.1A, R.sub.1B. The bias current I for the first mode is represented as 11 and the gain of the preamplifier 108 for the first mode is represented as g.sub.m1.
(44)
(45)
The calibration code may be stored in memory and used for calibrating one or more other modes.
(46) At 514, the mode module 400 determines whether another mode is to be calibrated. The comparator module 106 may be operated in any number of modes. If no other mode is to be calibrated, task 516 may be performed, otherwise task 520 is performed. At 516, the calibration module 112 exits the calibration mode, connects V.sub.INP, V.sub.INN back to summer 204 and compensation network 219, and returns to normal operation mode. This may include the resistance module 404 maintaining states of the resistors R.sub.A, R.sub.B at the resistances calibrated for the first mode as shown or may adjust the resistances for another operating mode. The bias current I may also be adjusted, via for example the bias module 402, for the selected operating mode. The method may end at 518.
(47) At 520, the resistance module 404 determines one or more resistances for the resistors R.sub.A, R.sub.B for the newly selected mode based on the calibration code determined at 513, the bias current for the newly selected mode, and/or a predetermined fixed resistance of one of the resistors R.sub.A, R.sub.B. Calibration of the newly selected mode does not include monitoring one or more of the voltages V.sub.CTRL, V.sub.OA, V.sub.OB to determine the offsets. Instead, the resistance module 404 calculates the resistances based on the previously determined calibration code. As an example, the resistance of the resistor R.sub.A may be a predetermined fixed resistance for the newly selected mode. The resistance of the resistor R.sub.B may be calculated using known values provided in the calibration code.
(48) In one embodiment, the resistance of the resistor R.sub.A may be a predetermined fixed resistance for the newly selected mode. The resistance of the resistor R.sub.B may be calculated using, for example, equations 7-13 and is represented as R.sub.nB, where n refers to the n.sup.th mode.
ΔI.sub.n=I.sub.nA−I.sub.nB (7)
ΔI.sub.n=g.sub.mn.Math.V.sub.OFFSET (8)
(49)
(50)
(51)
(52)
(53)
(54) As can be seen by the above equations 7-13, a linear relationship exists between the operating modes, which allows for determining resistances for one of the modes based on resistances calibrated for another one of the modes. For this reason, the calibration code determined for the first mode can be used to determine resistance values for the other modes.
(55) By using the calibration code, determined for the first mode, for the nth mode together with corresponding bias currant and resistance values, the total input referred offsets are kept small similar to that of the first mode. The total offset for the comparator module 106 may be represented by equation 14 for the n.sup.th mode. Based on equation 14, assuming the g.sub.COMPn and g.sub.COMP1 are relatively big (>10) and assuming the offset in the first mode is fully calibrated out, the input referred offsets for the nth first mode is small, which results in the comparator 110 maintaining high-precision operation. For example, if g.sub.COMPn is equal to g.sub.COMP1 then the offset of the comparator 110 may be near or equal to zero.
(56)
(57) The above-described tasks are meant to be illustrative examples; the tasks may be performed sequentially, synchronously, simultaneously, continuously, during overlapping time periods or in a different order depending upon the application. Also, any of the tasks may not be performed or skipped depending on the implementation and/or sequence of events.
(58) The above-described examples provide a comparator module including a preamplifier, a comparator and a calibration module that operate in multiple modes and provide high-precision output control for each mode. Resistance values of variable resistors of the preamplifier are able to be precisely set for each of the modes based on a calibration code determined for first one of the modes. As a result, calibration of the other modes is simplified and performed quickly.
(59) The above-described method may be applied to a high-speed comparator module, such as that disclosed above for a DC-to-DC power converter having two operating modes (a PWM mode and a PFM mode). The above-described method provides a comparator module that provides high-speed comparisons while operating in the PWM mode and implementing a high-bias current. The comparator module also provides high precision comparisons while operating in the PFM mode and implementing a low-bias current.
(60) The above-described method further allows for a calibration code to be determined for a first mode and used to determine parameters including resistances for any number of other operating modes. Since calibration loop(s) for monitoring voltages of a comparator module may only be utilized for the first mode, the number of calibration loops may be minimized. This minimization reduces the number of calibration loops used to monitor voltages for offset determinations of the different modes. Reducing the number of calibration loops, results in a reduction in hardware, chip area associated with calibration, and/or corresponding die size. Also, with less parameters being monitored and evaluated, calibration processing time and processor requirements to calibrate the modes are reduced.
(61) The foregoing description is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. The broad teachings of the disclosure can be implemented in a variety of forms. Therefore, while this disclosure includes particular examples, the true scope of the disclosure should not be so limited since other modifications will become apparent upon a study of the drawings, the specification, and the following claims. It should be understood that one or more steps within a method may be executed in different order (or concurrently) without altering the principles of the present disclosure. Further, although each of the embodiments is described above as having certain features, any one or more of those features described with respect to any embodiment of the disclosure can be implemented in and/or combined with features of any of the other embodiments, even if that combination is not explicitly described. In other words, the described embodiments are not mutually exclusive, and permutations of one or more embodiments with one another remain within the scope of this disclosure.
(62) Spatial and functional relationships between elements (for example, between modules, circuit elements, semiconductor layers, etc.) are described using various terms, including “connected,” “engaged,” “coupled,” “adjacent,” “next to,” “on top of,” “above,” “below,” and “disposed.” Unless explicitly described as being “direct,” when a relationship between first and second elements is described in the above disclosure, that relationship can be a direct relationship where no other intervening elements are present between the first and second elements, but can also be an indirect relationship where one or more intervening elements are present (either spatially or functionally) between the first and second elements. As used herein, the phrase at least one of A, B, and C should be construed to mean a logical (A OR B OR C), using a non-exclusive logical OR, and should not be construed to mean “at least one of A, at least one of B, and at least one of C.”
(63) In the figures, the direction of an arrow, as indicated by the arrowhead, generally demonstrates the flow of information (such as data or instructions) that is of interest to the illustration. For example, when element A and element B exchange a variety of information but information transmitted from element A to element B is relevant to the illustration, the arrow may point from element A to element B. This unidirectional arrow does not imply that no other information is transmitted from element B to element A. Further, for information sent from element A to element B, element B may send requests for, or receipt acknowledgements of, the information to element A.
(64) In this application, including the definitions below, the term “module” or the term “controller” may be replaced with the term “circuit.” The term “module” may refer to, be part of, or include: an Application Specific Integrated Circuit (ASIC); a digital, analog, or mixed analog/digital discrete circuit; a digital, analog, or mixed analog/digital integrated circuit; a combinational logic circuit; a field programmable gate array (FPGA); a processor circuit (shared, dedicated, or group) that executes code; a memory circuit (shared, dedicated, or group) that stores code executed by the processor circuit; other suitable hardware components that provide the described functionality; or a combination of some or all of the above, such as in a system-on-chip.
(65) The module may include one or more interface circuits. In some examples, the interface circuits may include wired or wireless interfaces that are connected to a local area network (LAN), the Internet, a wide area network (WAN), or combinations thereof. The functionality of any given module of the present disclosure may be distributed among multiple modules that are connected via interface circuits. For example, multiple modules may allow load balancing. In a further example, a server (also known as remote, or cloud) module may accomplish some functionality on behalf of a client module.
(66) The term code, as used above, may include software, firmware, and/or microcode, and may refer to programs, routines, functions, classes, data structures, and/or objects. The term shared processor circuit encompasses a single processor circuit that executes some or all code from multiple modules. The term group processor circuit encompasses a processor circuit that, in combination with additional processor circuits, executes some or all code from one or more modules. References to multiple processor circuits encompass multiple processor circuits on discrete dies, multiple processor circuits on a single die, multiple cores of a single processor circuit, multiple threads of a single processor circuit, or a combination of the above. The term shared memory circuit encompasses a single memory circuit that stores some or all code from multiple modules. The term group memory circuit encompasses a memory circuit that, in combination with additional memories, stores some or all code from one or more modules.
(67) The term memory circuit is a subset of the term computer-readable medium. The term computer-readable medium, as used herein, does not encompass transitory electrical or electromagnetic signals propagating through a medium (such as on a carrier wave); the term computer-readable medium may therefore be considered tangible and non-transitory. Non-limiting examples of a non-transitory, tangible computer-readable medium are nonvolatile memory circuits (such as a flash memory circuit, an erasable programmable read-only memory circuit, or a mask read-only memory circuit), volatile memory circuits (such as a static random access memory circuit or a dynamic random access memory circuit), magnetic storage media (such as an analog or digital magnetic tape or a hard disk drive), and optical storage media (such as a CD, a DVD, or a Blu-ray Disc).
(68) In this application, apparatus elements described as having particular attributes or performing particular operations are specifically configured to have those particular attributes and perform those particular operations. Specifically, a description of an element to perform an action means that the element is configured to perform the action. The configuration of an element may include programming of the element, such as by encoding instructions on a non-transitory, tangible computer-readable medium associated with the element.
(69) The apparatuses and methods described in this application may be partially or fully implemented by a special purpose computer created by configuring a general purpose computer to execute one or more particular functions embodied in computer programs. The functional blocks, flowchart components, and other elements described above serve as software specifications, which can be translated into the computer programs by the routine work of a skilled technician or programmer.
(70) The computer programs include processor-executable instructions that are stored on at least one non-transitory, tangible computer-readable medium. The computer programs may also include or rely on stored data. The computer programs may encompass a basic input/output system (BIOS) that interacts with hardware of the special purpose computer, device drivers that interact with particular devices of the special purpose computer, one or more operating systems, user applications, background services, background applications, etc.
(71) The computer programs may include: (i) descriptive text to be parsed, such as HTML (hypertext markup language), XML (extensible markup language), or JSON (JavaScript Object Notation) (ii) assembly code, (iii) object code generated from source code by a compiler, (iv) source code for execution by an interpreter, (v) source code for compilation and execution by a just-in-time compiler, etc. As examples only, source code may be written using syntax from languages including C, C++, C#, Objective-C, Swift, Haskell, Go, SQL, R, Lisp, Java®, Fortran, Perl, Pascal, Curl, OCaml, Javascript®, HTML5 (Hypertext Markup Language 5th revision), Ada, ASP (Active Server Pages), PHP (PHP: Hypertext Preprocessor), Scala, Eiffel, Smalltalk, Erlang, Ruby, Flash®, Visual Basic®, Lua, MATLAB, SIMULINK, and Python®.
(72) None of the elements recited in the claims are intended to be a means-plus-function element within the meaning of 35 U.S.C. §112(f) unless an element is expressly recited using the phrase “means for,” or in the case of a method claim using the phrases “operation for” or “step for.”