Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
DAC WEIGHT CALIBRATION
Document Type and Number:
WIPO Patent Application WO/2021/110268
Kind Code:
A1
Abstract:
A method of weight calibration in a DAC (25) is disclosed. The DAC (25) comprises an input port (100) for receiving a sequence of digital input words (x[n]), each representing a digital input sample, and a digital control circuit (110) configured to encode each digital input word (x[n]) into a control word (z[n]) representing the same digital input sample. Each bit (Z i ) in the control word (z[n]) has a corresponding bit weight (w i ) and is in the following considered to adopt values in {-1, 1}. Furthermore, the DAC (25) comprises a set (120) of analog weights, each associated with a unique one of the bits (Z i ) in the control word (z[n]), and summation circuitry (130) configured to generate an analog sample corresponding to the digital input sample by summing the bits in the control word (Z i ) weighted by the respective associated analog weights. The DAC (25) also has an output (140) for outputting the analog sample. The method comprises, during a measurement procedure, for a first set of at least one bit of the control word (z[n]), generating (300) the bits of the first set, such that a first sum of the bits in the first set weighted by their respective bit weights is, on average, above zero. Furthermore, the method comprises, during the measurement procedure, for a second set of at least one bit of the control word (z[n]), generating (310) the bits of the second set, such that a second sum of the bits in the second set weighted by their respective bit weights is, on average, below zero and such that the sum of the first sum and the second sum is, on average, equal to zero. The method also comprises detecting (330) a DC level at the output of the DAC during the measurement procedure. The method further comprises adjusting (340) at least one analog weight in response to the detected DC level. A corresponding DAC, a corresponding electronic apparatus, and a corresponding integrated circuit are also disclosed.

Inventors:
FREDRIKSSON HENRIK (SE)
Application Number:
PCT/EP2019/083806
Publication Date:
June 10, 2021
Filing Date:
December 05, 2019
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ERICSSON TELEFON AB L M (SE)
International Classes:
H03M1/06; H03M1/10; H03M1/68; H03M1/74
Foreign References:
US9991900B12018-06-05
US20020008651A12002-01-24
Other References:
K.O. ANDERSSON: "PhD dissertation", 2005, LINKOPINGS UNIVERSITET, article "Modeling and Implementation of Current-Steering Digital-to-Analog Converters"
Attorney, Agent or Firm:
ERICSSON (SE)
Download PDF:
Claims:
CLAIMS

1. A method of weight calibration in a digital-to-analog converter, DAC, (25) the DAC (25) comprising an input port (100) for receiving a sequence of digital input words (x[n]), each representing a digital input sample; a digital control circuit (110) configured to encode each digital input word (x[n]) into a control word (z[n]) representing the same digital input sample, each bit (Zi) in the control word (z[n]) having a corresponding bit weight (wi) and in the following considered to adopt values in {-1, 1}; a set (120) of analog weights, each associated with a unique one of the bits (Zi) in the control word (z[n]); summation circuitry (130) configured to generate an analog sample corresponding to the digital input sample by summing the bits in the control word (Zi) weighted by the respective associated analog weights; and an output (140) for outputting the analog sample; the method comprising, during a measurement procedure: for a first set of at least one bit of the control word (z[n]), generating (300) the bits of the first set, such that a first sum of the bits in the first set weighted by their respective bit weights is, on average, above zero; for a second set of at least one bit of the control word (z[n]), generating (310) the bits of the second set, such that a second sum of the bits in the second set weighted by their respective bit weights is, on average, below zero and such that the sum of the first sum and the second sum is, on average, equal to zero; and detecting (330) a DC level at the output of the DAC during the measurement procedure; and the method further comprising: adjusting (340) at least one analog weight in response to the detected DC level. 2. The method according to claim 1, comprising for each of the bits of the control word (z [n]) not in the first set or the second set: generating (320) the bit such that the bit is, on average, zero.

3. The method according to claim 1 or 2, wherein each of the first set and the second set consists of a single bit. 4. The method according to claim 1 or 2, wherein the first set and the second set consist of different numbers of bits.

5. The method according to any one of claims 1, 2, and 4, wherein each of the first set and the second set consists of multiple bits.

6. The method according to any preceding claim, wherein said measurement procedure is iterated with different bits in the first or second set, thereby resulting in a plurality of detected DC levels. 7. The method of claim 6, wherein the step of adjusting (340) at least one analog weight comprises adjusting, in each iteration of the measurement procedure, at least one analog weight associated with bits in the first set or the second set in that iteration of the measurement procedure in response to the detected DC level in that iteration of the measurement procedure.

8. The method according to claim 6, wherein the method comprises computing (370) weight adjustments in response to the plurality of detected DC levels after the iterations of the measurement procedure; and wherein the step of adjusting (340) at least one analog weight comprises performing the computed adjustments.

9. A digital-to-analog converter, DAC, (25) comprising an input port (100) for receiving a sequence of digital input words (x[n]), each representing a digital input sample; a digital control circuit (110) configured to encode each digital input word (x[n]) into a control word (z[n]) representing the same digital input sample, each bit (Zi) in the control word (z[n]) having a corresponding bit weight (wi) and in the following considered to adopt values in (-1, 1}; a set (120) of analog weights, each associated with a unique one of the bits (Zi) in the control word (z[n]); summation circuitry (130) configured to generate an analog sample corresponding to the digital input sample by summing the bits in the control word (Zi) weighted by the respective associated analog weights; and an output (140) for outputting the analog sample; wherein the digital control circuit (110), in at least one weight-calibration mode, is configured to: during a measurement procedure: for a first set of at least one bit of the control word (z[n]), generate the bits of the first set such that a first sum of the bits in the first set weighted by their respective bit weights is, on average, above zero; and for a second set of at least one bit of the control word (z[n]), generate the bits of the second set such that a second sum of the bits in the second set weighted by their respective bit weights is, on average, below zero and such that the sum of the first sum and the second sum is, on average, equal to zero; wherein the DAC (25) comprises: a DC-detection circuit (150) configured to detect a DC level at the output of the DAC (25) during the measurement procedure; and a calibration circuit (160) configured to adjust at least one analog weight in response to the detected DC level.

10. The DAC (25) according to claim 9, wherein the digital control circuit (110) is configured to, in the at least one of the weight calibration modes, - for each of the bits of the control word (z [n]) not in the first set or the second set: generate the bit such that the bit is, on average, zero.

11. The DAC (25) according to claim 9 or 10, wherein, in at least one of the weight- calibration modes, each of the first set and the second set consists of a single bit.

12. The DAC (25) according to any one of claims 9 to 11, wherein, in at least one of the weight-calibration modes, the first set and the second set consist of different numbers of bits.

13. The DAC (25) according to any one of claims 9 to 12, wherein, in at least one of the weight-calibration modes, each of the first set and the second set consists of multiple bits.

14. The DAC (25) according to any one of the claims 9 to 13, wherein the control circuit (110) is configured to iterate said measurement procedure with different bits in the first or second set, thereby resulting in a plurality of detected DC levels by the DC-detection circuit (150).

15. The DAC (25) according to claim 14, wherein the calibration circuit (160) is configured to, in each iteration of the measurement procedure, adjust at least one analog weight associated with bits in the first set or the second set in that iteration of the calibration procedure in response to the detected DC level in that iteration of the calibration procedure.

16. The DAC (25) according to claim 14, wherein the control circuit (110) is configured to compute weight adjustments in response to the plurality of detected DC levels after the iterations of the measurement procedure; and the calibration circuit (160) is configured to perform the computed adjustments.

17. An electronic apparatus (1, 2) comprising the DAC according to any one of the claims 9 - 16.

18. The electronic apparatus (1, 2) of claim 17, wherein the electronic apparatus is a communication apparatus. 19. The electronic apparatus (1) of claim 18, wherein the communication apparatus is a wireless communication device for a cellular communications system.

20. The electronic apparatus (2) of claim 18, wherein the communication apparatus is a base station for a cellular communications system.

21. An integrated circuit (500) comprising the DAC (25) according to any one of the claims 9-16.

Description:
DAC WEIGHT CALIBRATION

Technical field

The present invention relates to weight calibration in a digital-to-analog converter.

Background Digital-to-analog converters (DACs) are interface circuits between the digital and the analog domain and are used whenever a conversion from a digital signal representation to an analog signal representation is needed. For instance, in radio transmitters, a lot of the signal processing is typically done in the digital domain. However, the signal to be fed into the antenna typically uses an analog representation. Hence, a DAC is used somewhere in the signal chain leading up to the antenna.

Some types of DAC utilize analog weights that are selectively summed in the analog domain under control of a digital control word derived from the digital input of the DAC in order to generate the analog output of the DAC. Mismatch between nominal and actual values of the analog weights give rise to unwanted nonlinear distortion in the analog output of the DAC. This can be counteracted to some extent using so called dynamic element matching (DEM). DEM utilizes a redundant configuration where multiple different digital control words can be used to represent a given digital input value and randomizes between those different digital control words in order to alter the characteristics of the errors resulting from the mismatch. DEM does not remove the mismatch errors, but rather spreads the energy of the errors over a wider frequency range (than if no DEM had been applied).

Other methods of mitigating the effect of weight mismatches include calibration. With this, distortion is not spread out but rater removed or subtracted from the output signal. Due to changes in physical properties (for example temperature changes, transistor aging, supply valuations etc) calibration typically needs to be performed in regular intervals. The traditional way of making calibration is to disrupt normal data through the DAC and send some form of known test pattern through the DAC and detect specific mismatch imperfections based on measurements of the output of the DAC. Other calibration methods include swapping parts of the DAC out of normal operations (swapping in extra parts instead) and calibrate critical propertied of the swapped-out part. These calibration methods either require disruption of DAC functionality during calibration or extra hardware to calibrate individual parts of the DAC at the same time performing normal operation. Both are disadvantageous from a performance and complexity point of view due to extra hardware in critical signal paths. Summary

Embodiments of the present disclosure relates to detection of mismatch between analog weights in a DAC such that these mismatch errors can be reduced through calibration. Embodiments of the present disclosure are based on the inventor’s insight that the mismatch between two analog weights, or two sets of analog weights, can be selectively detected as a DC offset at the output of the DAC provided that the generation of the digital control word follow certain criteria. Thereby, mismatch calibration of DACs is enabled without a need to interrupt normal operation or swapping parts of the DAC out of normal operation for offline calibration. According to a first aspect, a method of weight calibration in a DAC is provided. The DAC comprises an input port for receiving a sequence of digital input words, each representing a digital input sample, and a digital control circuit configured to encode each digital input word into a control word representing the same digital input sample. Each bit in the control word has a corresponding bit weight and is in the following considered to adopt values in {-1, 1 }. Furthermore, the DAC comprises a set of analog weights, each associated with a unique one of the bits in the control word, and summation circuitry configured to generate an analog sample corresponding to the digital input sample by summing the bits in the control word weighted by the respective associated analog weights. The DAC also has an output for outputting the analog sample. The method comprises, during a measurement procedure, for a first set of at least one bit of the control word, generating the bits of the first set, such that a first sum of the bits in the first set weighted by their respective bit weights is, on average, above zero. Furthermore, the method comprises, during the measurement procedure, for a second set of at least one bit of the control word, generating the bits of the second set, such that a second sum of the bits in the second set weighted by their respective bit weights is, on average, below zero and such that the sum of the first sum and the second sum is, on average, equal to zero. The method also comprises detecting a DC level at the output of the DAC during the measurement procedure. The method further comprises adjusting at least one analog weight in response to the detected DC level.

The method may comprise, for each of the bits of the control word not in the first set or the second set, generating the bit such that the bit is, on average, zero.

According to some embodiments, each of the first set and the second set consists of a single bit.

According to some embodiments, the first set and the second set consist of different numbers of bits. According to some embodiments, each of the first set and the second set consists of multiple bits.

Said measurement procedure may be iterated with different bits in the first or second sets, thereby resulting in a plurality of detected DC levels. The step of adjusting at least one analog weight may comprise adjusting, in each iteration of the measurement procedure, at least one analog weight associated with bits in the first set or the second set in that iteration of the measurement procedure in response to the detected DC level in that iteration of the measurement procedure.

The method may comprise computing weight adjustments in response to the plurality of detected DC levels after the iterations of the measurement procedure, and the step of adjusting at least one analog weight may comprise performing the computed adjustments.

According to a second aspect, there is provided a DAC. The DAC comprises an input port for receiving a sequence of digital input words, each representing a digital input sample, and a digital control circuit configured to encode each digital input word into a control word representing the same digital input sample. Each bit in the control word has a corresponding bit weight and is in the following considered to adopt values in {-1, 1 }. Furthermore, the DAC comprises a set of analog weights, each associated with a unique one of the bits in the control word, and summation circuitry configured to generate an analog sample corresponding to the digital input sample by summing the bits in the control word weighted by the respective associated analog weights. The DAC also has an output for outputting the analog sample. In at least one weight-calibration mode, the digital control circuit is configured to, during a measurement procedure, for a first set of at least one bit of the control word, generate the bits of the first set such that a first sum of the bits in the first set weighted by their respective bit weights is, on average, above zero. Furthermore, in the at least one weight- calibration mode, the digital control circuit is configured to, during the measurement procedure, for a second set of at least one bit of the control word, generate the bits of the second set such that a second sum of the bits in the second set weighted by their respective bit weights is, on average, below zero and such that the sum of the first sum and the second sum is, on average, equal to zero. Furthermore, the DAC comprises a DC-detection circuit configured to detect a DC level at the output of the DAC during the measurement procedure. Moreover, the DAC comprises a calibration circuit configured to adjust at least one analog weight in response to the detected DC level. The digital control circuit is configured to, in the at least one of the weight calibration modes, for each of the bits of the control word not in the first set or the second set, generate the bit such that the bit is, on average, zero.

In some embodiments, each of the first set and the second set consists of a single bit in at least one of the weight-calibration modes.

In some embodiments, the first set and the second set consist of different numbers of bits in at least one of the weight-calibration modes.

In some embodiments, each of the first set and the second set consists of multiple bits in at least one of the weight-calibration modes. In some embodiments, the control circuit is configured to iterate said measurement procedure with different bits in the first or second sets, thereby resulting in a plurality of detected DC levels by the DC-detection circuit.

The calibration circuit may be configured to, in each iteration of the measurement procedure, adjust at least one analog weight associated with bits in the first set or the second set in that iteration of the calibration procedure in response to the detected DC level in that iteration of the calibration procedure.

The the control circuit may be configured to compute weight adjustments in response to the plurality of detected DC levels after the iterations of the measurement procedure. The calibration circuit may be configured to perform the computed adjustments. According to a third aspect, there is provided an electronic apparatus comprising the DAC according to the second aspect.

The electronic apparatus may, for instance, be a communication apparatus, such as a wireless communication device or a base station for a cellular communications system.

According to a fourth aspect, there is provided an integrated circuit comprising the DAC according to the second aspect.

Further embodiments are defined in the dependent claims. It should be emphasized that the term “comprises/comprising” when used in this specification is taken to specify the presence of stated features, integers, steps, or components, but does not preclude the presence or addition of one or more other features, integers, steps, components, or groups thereof. Brief description of the drawings

Fig. 1 illustrates a communication environment.

Fig. 2 illustrates a transceiver circuit.

Fig. 3 is a diagram of a DAC according to some embodiments. Fig. 4 is a diagram of a DAC according to some embodiments.

Fig. 5 illustrates an implementation of a weighted current source.

Fig. 6 is a circuit diagram of a bias circuit configured to generate multiple bias voltages.

Fig. 7 is a circuit diagram of a current source with controllable bias voltage. Figs. 8-9 show flowcharts of embodiments of a method.

Fig. 10 illustrates an integrated circuit comprising a DAC.

Detailed description

Fig. 1 illustrates a communication environment wherein embodiments of the present invention may be employed. A wireless communication device 1, or wireless device 1 for short, of a cellular communications system is in wireless communication with a radio base station 2 of the cellular communications system. The wireless device 1 may be what is generally referred to as a user equipment (UE). The wireless devices 1 is depicted in Fig. 1 as a mobile phone, but may be any kind of device with cellular communication capabilities, such as a tablet or laptop computer, machine-type communication (MTC) device, or similar. Furthermore, a cellular communications system is used as an example throughout this disclosure. However, embodiments of the present invention may be applicable in other types of systems as well, such as but not limited to WiFi systems.

The radio base station 2 and wireless device 1 are examples of what in this disclosure is generically referred to as communication apparatuses. Embodiments are described below in the context of a communication apparatus in the form of the radio base station 2 or wireless device 1. However, other types of communication apparatuses can be considered as well, such as a WiFi access point or WiFi enabled device.

Fig. 2 is a block diagram of an embodiment of a transceiver circuit 10, which can be comprised in a communication apparatus, such as the radio base station 2 or the wireless device 1. In the embodiment illustrated in Fig. 2, the transceiver circuit 10 comprises a digital signal processing (DSP) circuit 15. The DSP circuit 15 may e.g. be what is commonly referred to as baseband processor. The DSP circuit 15 may e.g. be configured to perform various digital signal processing tasks, such as one or more of coding, decoding, modulation, demodulation, fast Fourier transform (FFT), inverse FFT (IFFT), mapping, demapping, etc. Furthermore, in the embodiment illustrated in Fig. 2, the transceiver circuit 10 comprises a transmitter circuit 20. The transmitter circuit 20 comprises a digital-to-analog converter (DAC) 25. The DAC 25 is connected to the DSP circuit 15 and configured to receive, as an input signal of the DAC 25, a digital representation of a signal to be transmitted from the DSP circuit 15. The DAC 25 is further configured to convert the signal to be transmitted to an analog representation, which is an output signal of the DAC 25. In some embodiments, the DAC 25 is a baseband DAC configured to generate the output signal in a baseband frequency range. In other embodiments, the DAC 25 is a radio-frequency (RF) DAC configured to generate the output signal in an RF range. In yet other embodiments, the DAC 25 is an intermediate-frequency (IF) DAC configured to generate the output signal in an IF range. The DSP circuit 15 may e.g. include a digital mixer or digital up conversion in the transmit path, such that the input signal to the DAC is an RF or an IF signal, whichever the case may be. In any case, the input signal to the DAC 25 can be generated such that the intended output signal from the DAC 25 has zero signal content at DC, or 0 Hz. The transmitter circuit 20 also comprises a transmitter (Tx) frontend (FE) circuit 30 connected between the DAC 25 and an antenna 35. The Tx FE circuit 30 is configured to transform the output signal from the DAC 25 to a format suitable for transmission via the antenna 35. This may include operations such as frequency upconversion, filtering, and/or amplification. The Tx FE circuit 30 may comprise one or more mixers, filters, and/or amplifiers, such as power amplifiers (PAs), to perform such operations. The design of such Tx FE circuits is, per se, well known to a person skilled in the field of radio transceiver design, and is not discussed herein in any further detail.

Moreover, in the embodiment illustrated in Fig. 2, the transceiver circuit 10 comprises a receiver circuit 40. The receiver circuit 40 comprises a receiver (Rx) FE circuit 45 connected to the antenna 35. Furthermore, the receiver circuit 40 comprises an ADC 50. The ADC 50 is connected between the Rx FE circuit 45 and the DSP circuit 15. The Rx FE circuit 45 is configured to transform a signal received via the antenna 35 to a format suitable to be input to the ADC 50. This may include operations such as frequency downconversion, filtering, and/or amplification. The Rx FE circuit 45 may comprise one or more mixers, filters, and/or amplifiers, such as low-noise amplifiers (LNAs), to perform such operations. The design of such Rx FE circuits is, per se, well known to a person skilled in the field of radio transceiver design, and is not discussed herein in any further detail. The ADC 50 is configured to receive its (analog) input signal from the Rx FE circuit, and convert it to a digital representation to generate the digital output signal of the ADC 50. This digital output signal of the ADC 50 is input to the DSP circuit 15 for further digital signal processing.

Before going in to more details of embodiments of the present disclosure, terminology used in the disclosure is first established. A digital signal is a sequence of samples, where the samples are numbers. These numbers can be represented in a variety of different number formats within a digital circuit. A word is used to represent a number in a given number format. The word consists of a number of bits. Each bit can adopt a low value and a high value. In this disclosure, the low value is considered to be -1, and the high value is considered to be +1 (or simply 1). It should be noted that this is merely an abstract convention that is used to provide a relatively simple mathematical description of the functionality of the embodiments disclosed herein, for instance in that the average of the low and the high value is 0. In a physical circuit, the high and low values are typically represented with different voltage levels. The same physical circuit could be described using another convention, for instance considering the low value to be 0 and the high value to be 1. This would slightly alter the mathematical description of the circuit, but would not alter the physical circuit or its functionality.

Reference is made below to the time average of different sequences. This should be interpreted as the arithmetic average. That is, the time average of a given sequence during a time interval is the sum of the sample values of the given sequence in that time interval divided by the number of samples of the given sequence in that time interval. Each bit has an associated bit weight given by the number format used. The number represented by the word is the sum, taken over all bits in the word, of the bit value multiplied with the bit weight. That is, if the number is denoted Z, the word is denoted z, the bits are denoted z i , i = 1,2, ... , M, and the bit weights are denoted W i , the number Z is given by

Note that, with the convention that the bits adopt values of either -1 or 1, the difference between two neighboring numbers is 2, provided that the bit weights are integer.

The DAC circuits considered in this disclosure are of the type that comprises a number of analog weights and selectively sums these analog weights together under control of a digital control word to form an analog output value. The number of weights is equal to the number of bits in the control word. Assume that the word z described above is used as the control word. Further, let the analog weights be denoted a i and the analog output value be denoted Y .

Below, the notation Y (t) is used in some places to indicate that the output value Y varies as a function of time t as a sequence of control words z[n] is applied. The analog output value Y is given by Ideally, each analog weight a i is proportional to the corresponding (digital) bit weight w i.e. a i = Cw i , where C is a constant. In that case, the analog output value Y is also proportional to the number Z, i.e. Y = C Z, which is the desired function of the DAC. However, due to factors such as manufacturing inaccuracies and temperature variations, there will be a mismatch between analog weights, which results in nonlinear distortion in the output of the DAC. Some embodiments of the present disclosure seek to detect such mismatch between analog weights. Furthermore, some embodiments of the present disclosure seek to adjust the analog weights to counteract the detected mismatch.

Fig. 3 is a block diagram of the DAC 25 according to some embodiments. It comprises an input port 100 for receiving a sequence of digital input words x[n], each representing a digital input sample. The integer n is a sequence index indicating a given sample in the sequence. Furthermore, the DAC comprises a digital control circuit (110) configured to encode each digital input word x[n] into a control word z[n] representing the same digital input sample. Each bit z i in the control word z[n] has a corresponding bit weight W i , and is in the following considered to adopt values in {-1, 1}, as mentioned above. Moreover, the DAC 25 comprises a set 120 of analog weights, each associated with a unique one of the bits z i in the control word z[n]. The DAC 25 further comprises summation circuitry 130 configured to generate an analog sample corresponding to the digital input sample by summing the bits in the control word Z i weighted by the respective associated analog weights, as mentioned above with reference to Eq. (2). The DAC 25 also has an output 140 for outputting the analog sample.

In some embodiments, there are multiple bits in the control word z[n] with the same bit weight. The analog weights associated with bits in the control word z[n] having the same bit weight are sometimes referred to below as analog weights with the same nominal weight. Conversely, analog weights associated with bits in the control word z[n] having different bit weight are sometimes referred to below as analog weights different nominal weights.

In embodiments of the present disclosure (further described in more detail below), the digital control circuit 110 generates the bits z i in such a way that the mismatch between analog weights can be detected as a DC level at the output 140 of the DAC 25. To perform this detection, the DAC 25 comprises a DC-detection circuit 150 configured to detect a DC level at the output 140 of the DAC 25. Furthermore, according to some embodiments, the DAC 25 comprises a calibration circuit 160 configured to adjust analog weights in response to the detected DC level, or a plurality of such detected DC levels. Thereby, mismatch errors can be reduced. The DC level (or time average) of the sequence of numbers Z[n] represented by the sequence of control word z[n] is denoted . Furthermore, the DC level (or time average) of each bit Z i [n] in the sequence of control words z[n] is denoted It is readily realized that

Furthermore, the DC level (or average) of the analog output Y (t), which is denoted Y , is given by In implementations, the analog output Y (t) is represented with a physical quantity, such as an electrical voltage or an electrical current. It should be noted that the zero-level of the analog output Y (t) does not necessarily correspond to a zero value of the physical quantity, it could be some other fixed level. Therefore, statements in this disclosure saying that the DC leve is either above or below zero should be interpreted as that the DC level of the physical quantity representing Y (t) is either above or below that fixed level (which, again, is not necessarily zero V, or zero A, or whatever the unit for the physical quantity may be).

In some embodiments, the bits z i [n] in the control word z[n] are divided into three sets. For a first set of at least one bit of the control word z[n], the bits in the first set are generated such that the sum of the bits in the first set weighted by their respective bit weights is, on average, above zero. This sum is below referred to as “the first sum” and denoted Expressed with mathematical notation where is the set of indices i for which the bits z i are in said first set of bits. For a second set of at least one bit of the control word z[n], the bits in the second set are generated such that the sum of the bits in the second set weighted by their respective bit weights is, on average, below zero. This sum is below referred to as “the second sum” and denoted s 2. Expressed with mathematical notation where G 2 is the set of indices i for which the bits z i are in said second set of bits. Furthermore, the bits in the first and the second set are generated such that In some embodiments, the bits that are neither in the first set nor in the second set form a third set. In some embodiments, the third set is empty. In some embodiments, the bits in the third set provides a zero, or at least a negligible, contribution to the DC level at the output due to that the associated analog weights have been mutually matched, e.g. using calibration procedures described herein. In some embodiments, each of the bits in the third set is generated such that the bit is, on average, 0. That is, each bit in the third set adopts the value -1 on average as often as the value +1, whereby they each provide a zero contribution to the DC level at the output. Some means to achieve this are given in the context of specific embodiments further down in this detailed description.

Under these conditions, the DC level at the output is given by

Only the bits in the first set and the second set provide nonzero contributions to the DC level at the output. Ideally, a i = Cw i , so ideally

However, as discussed above, there will in reality be a mismatch between the analog weights such that where C 1 ≠ C 2. It would be desired to have C 1 and C 2 as closely matched as possible, to be as close as possible to the ideal operation where C 1 = C 2 = C. From Eq. (7), we have that Since it can be concluded that if then C 1 > C 2 , and if then C 2 > C 1. Hence, in order to reduce the absolute difference between C 1 and C 2 , the analog weights can be adjusted by -increasing the analog weights associated with the bits in the second set or decreasing the analog weights associated with the bits in the in the first set, or both, if ; or

- increasing the analog weights associated with the bits in the in the first set or decreasing the analog weights associated with the bits in the in the second set, or both, if

In some embodiments, in line with the discussion above, the digital control circuit 110 is, in at least one weight-calibration mode, configured to:

- for a first set of at least one bit of the control word z[n] : generate the bits of the first set such that a first sum of the bits in the first set weighted by their respective bit weights is, on average, above zero; and

- for a second set of at least one bit of the control word z[n] : generate the bits of the second set such that a second sum of the bits in the second set weighted by their respective bit weights is, on average, below zero and such that the sum of the first sum and the second sum is, on average, equal to zero.

Furthermore, in some embodiments, the digital control circuit 110 is configured to, in at least one of the weight calibration modes, generate each of the bits not in the first set or the second set such that the bit is, on average, zero.

Furthermore, in some embodiments, the calibration circuit 160 is configured to adjust analog weights associated with the bits in the first set or the second set in response to the detected DC level. The word “or” in the preceding sentence should be interpreted as a normal logical “or” (i.e. “and/or”, not as an “exclusive or”).

The above described measurements and adjustments of the analog bit weights can be iterated with different sets of bits in order to successively calibrate the analog bit weights to within a desired tolerance. Alternatively, as is further described below, multiple measurements can be made using different bits in the first or second set without making any adjustment, resulting in a plurality of detected DC levels. The word “or” in the preceding sentence should be interpreted as a normal logical “or” (i.e. “and/or”, not as an “exclusive or”). That is, either the first set or the second set, or both, may be changed between iterations. From these detected DC levels, weight adjustments can be computed for multiple analog weights, and then performed by the calibration circuit 160. Either way, the calibration can be done “online”, i.e. during normal use of the DAC 25. No specific training signal is needed. Furthermore, it is not necessary to swap parts of the DAC out of normal operation (swapping in extra parts instead) and calibrate the swapped-out parts “offline”. Hence, such extra parts are not needed.

There are numerous different architectures that can be used to implement the DAC 25 for which the mismatch detection and calibration described herein can be applied. Some examples presented below are the thermometer-coded DAC architecture, the segmented DAC architecture, and the decomposed DAC architecture.

Thermometer-coded DAC

In a traditional thermometer-coded DAC, an N- bit binary-weighted input word is encoded into an M = (2 N — 1)-bit thermometer-coded control word, in which each bit has (the same) bit weight 1. To distinguish these control bits of the traditional thermometer-coded DAC from the control bits z i used in embodiments of the present disclosure, we denote them q i. Below is a table (Table 1) illustrating the mapping from the input bits x i to the control bits q i for N =

3. Table 1

In some embodiments, a modified thermometer-coded DAC is used. In some of these embodiments, each of the first set and the second set contains a single bit. For such an embodiment, the bit in the first set is below denoted z A , and the bit in the second set is below denoted z B. It can be noted from the table above that the bit q 3 is on average above zero and the bit q 5 is on average below zero, assuming that the samples of the input sequence are symmetrically distributed around zero. This is true for many types of signals, for instance for digitally upconverted communication signals (e.g. digitally upconverted OFDM (Orthogonal Frequency Division Multiplexing) or spread-spectrum signals) that are close to the Shannon bound and therefore have a noise-like appearance. This assumption is used also in the other embodiments and examples below. Furthermore, . Hence, the bit z A in the first set can be generated as the bit q 3 and the bit z B in the second set can be generated as the bit q 5. The bits in z i in the third set should be generated with a zero average. Notably, bit q 4 in the table above has a zero average, so one of the bits z i in the third set can be generated as the bit q 4. The remaining bits z i in the third set can be generated by applying dynamic element matching to the bits q 4 , q 2 , q 6 , and q 7. Alternatively, since bit q 2 is on average above zero and the bit q 6 is on average below zero, and 0, the bit z A in the first set can be generated as the bit q 2 and the bit z B in the second set can be generated as the bit q 6. In that case, one of the bits z i in the third set can again be generated as the bit q 4 , and the remaining bits z i in the third set can be generated by applying dynamic element matching to the bits q 4 , q 3 , q 5 , and q 7. Further alternatively, since bit q 4 is on average above zero and the bit q 7 is on average below zero, and , the bit z A in the first set can be generated as the bit q 4 and the bit z B in the second set can be generated as the bit q 7. In that case, one of the bits z i in the third set can again be generated as the bit q 4 , and the remaining bits z i in the third set can be generated by applying dynamic element matching to the bits q 2 , q 3 , q 5 , and q 6. The control circuit 110 for the modified thermometer-coded embodiments described above can, for instance, comprise a binary-to-thermo meter encoder configured to generate the bits q i , followed by a switching network configured to map the bits q i onto the bits z i in the control word.

The dynamic element matching discussed above can, for example, be implemented in a fairly simple way by grouping bits q i in pairs for which the average of the sum of the bits in each pair is zero. Such pairs are q 4 and q 7 , q 2 and q 6 , and q 3 and q 5. One of these pairs will be mapped onto the bit z A in the first set and the bit z B in the second set according to the discussion above, and will not be subject to dynamic element matching. For the sake of illustration, say that this is the pair q 3 and q 5. Each of the other pairs can then be mapped onto a corresponding pair of bits in said third set. For instance, the pair of bits q 4 and q 7 can be mapped onto the pair of bits Z j and z k. By randomly or pseudo randomly selecting, for each sample instant n, which of q 1 and q 7 is mapped onto which of Z j and z k , Z j and z k will each get an average value of zero over time. Similarly, the pair of bits q 2 and q 6 can be mapped onto the pair of bits Z i and z m. By randomly or pseudo randomly selecting, for each sample instant n, which of q 2 and q 6 is mapped onto which of z, and z m , z, and z m will each get an average value of zero over time. Below, this dynamic element matching technique is referred to as pairwise swapping. By going through a number of iterations and varying which of the bits z 1 -z 7 are selected as the bits z A in the first set and z B in the second set, it is possible to match all of the analog weights a 1 -a 7 with each other. For instance, one of the analog weights, say a 1 , may be used as a reference. The corresponding bit z 1 may be used as z A in all iterations, whereas each of the other bits z 2 -z 7 can be used as the bit z B in different iterations. Thereby, the analog weights a 2 -a 7 can each be matched with the reference analog weight a 1 , and thereby also with each other.

The example above with N = 3 can be extended to other values of N in a straightforward manner by a person skilled in the art of digital-to-analog conversion.

Segmented DAC In a segmented DAC, a number K < N of the most significant bits (MSBs) are converted into a thermometer code, whereas the remaining N — K least significant bits (LSBs) remain binary weighted. For a segmented DAC, the procedure described above can be applied to the thermometer-coded part. Each of the binary-weighted LSBs have an average value of zero, and does therefore not influence the calibration of the thermometer-coded part. Decomposed DAC

The decomposed DAC architecture is e.g. described in K.O. Andersson, “Modeling and Implementation of Current- Steering Digital-to-Analog Converters”, PhD dissertation, Linkopings universitet, 2005, ISBN 91-8529-796-8 (below referred to as [Andersson, 2005]). In its simplest form (1-layer decomposition), an TV-bit binary-weighted input word is decomposed into two ( N — 1)-bit part and an additional 1-bit part, as illustrated in Table 2 below for a N = 4. Table 2

In the discussion below, each bit Z i of the control word has the same weight as the corresponding bits q i , i.e. z 1 has the same weight as q 1 , z 2 has the same weight as q 2 , etc. For matching the analog weights with the same nominal weight, a similar procedure as for the thermometer-coded DAC can be used. For instance, in a first calibration round, q 3 , which is on average above zero, can be mapped onto z 3 , and q 7 , which is on average below zero, can be mapped onto z 7. The first set thus consists of the single bit z 3 , the second set thus consists of the single bit z 7 , and the remaining bits are comprised in the third set. The bit q 4 is on average equal to zero, and can e.g. be mapped onto z 4. The bits z 1 and z 5 can be generated by applying pairwise swapping to the bits q 1 and q 5. The bits z 2 and z 6 can be generated by applying pairwise swapping to the bits q 2 and q 6. The first calibration round can be iterated until the analog weights a 3 and a 7 have been matched within tolerable tolerances for a given specification.

Furthermore, in a second calibration round, q 2 , which is on average above zero, can be mapped onto z 2 , and q 6 , which is on average below zero, can be mapped onto z 6 . The first set thus consists of the single bit z 2 , the second set thus consists of the single bit z 6 , and the remaining bits are comprised in the third set. Again, the bit q 4 is on average equal to zero, and can e.g. be mapped onto z 4 . As above, the bits z 1 and z 5 can be generated by applying pairwise swapping to the bits q 4 and q 5. The bits z 3 and z 7 can be generated by applying pairwise swapping to the bits q 3 and q 7. The second calibration round can be iterated until the analog weights a 2 and a 6 have been matched within tolerable tolerances for a given specification.

Since there are three bits with weight 1 ( z 1 , z 4 , and z 5 ), the matching of the corresponding analog weights a 1 , a 4 , and a 5 , may require some more iterations. For instance, one of them can be used as a reference to match the other two against. Say, for instance, that a 1 is used as a reference. Then, in a third calibration round, a 5 can be matched with a 1. In the third calibration round, q 4 , which is on average above zero, can be mapped onto z 1 , and q 5 , which is on average below zero, can be mapped onto z 5 . The first set thus consists of the single bit z 1 , the second set thus consists of the single bit z 5 , and the remaining bits are comprised in the third set. Again, the bit q 4 is on average equal to zero, and can be mapped onto z 4 . The bits z 2 and z 6 can be generated by applying pairwise swapping to the bits q 2 and q 6. The bits z 3 and z 7 can be generated by applying pairwise swapping to the bits q 3 and q 7. The second calibration round can be iterated until the analog weights a 1 and a 5 have been matched within tolerable tolerances for a given specification. In some embodiments, this is done by only adjusting a 5 and leaving a 1 as is. Thereby, by matching a 4 to a 1 in a similar way in a fourth calibration round by only adjusting a 4 and leaving a 1 as is, a 5 is also matched to a 4. The fourth calibration round may be carried out in the same way as the third calibration round, with the modifications that q 5 is instead mapped onto z 4 and that q 4 is instead mapped onto z 5 ·

The decomposed architecture allows matching of analog weights with different nominal weights, as illustrated by examples below.

In the examples below, modifications of the mapping shown in Table 2 are applied. It can be observed in Table 2 that the sum of the bits q i with the same bit weight is, on average, equal to zero. That is, q 4 + q 4 + q 5 (and consequently q 1 w 1 + q 4 w 4 + q 5 w 5 ) is on average equal to zero, q 2 + q 6 (and consequently q 2 w 2 + q 6 w 6 ) is on average equal to zero, and q 3 + q 7 (and consequently q 3 w 3 + q 7 w 7 ) is on average equal to zero. The modifications made in Tables 3 and 4 are made to change that in order for mismatch between analog weights with different nominal weights to show up as a DC offset at the output 140. A first example, where analog weights a 2 and a 6 (associated with the bits q 2 and q 6 , both with the bit weight 2) are matched with the analog weights a 1 , a 4 , and a 5 (associated with the bits q 1 , q 4 , and q 5 , all with the bit weight 1) is illustrated with Table 3 below, which is a modification of Table 2 above. The modified parts have been indicated with thicker lines at the cell borders in Table 3. The modification is based on the observation that, in Table 2, for inputs -1, -3, -9, and -11, bit q 2 with bit weight 2 is 1, and the two bits q 5 and q 4 with bit weight 1 are -1. By inverting these bits, the averages of q 4 + q 4 + q 5 and q 2 + q 6 are changed without changing the represented number. Furthermore, it can be noted that the modifications do not alter the value of the sum ( q 1 w 1 + q 4 w 4 + q 5 w 5 ) + ( q 2 w 2 + q 6 w 6 ). Since both the first and the second parenthesis are zero on average (for the values in Table 2), the whole expression is zero on average (both for the values in Table 2 and for the values in Table 3).

Table 3

In the first example, ¾ is mapped onto z 1 , q 4 is mapped onto z 4 , and q 5 is mapped onto z 5. The bits z 1 , z 4 , and z 5 form the first set. It is readily verified that the modification in Table 3 provides that is on average above zero. Furthermore, in the first example, q 2 is mapped onto z 2 and q 6 is mapped onto z 6. The bits z 2 and z 6 form the second set. It is readily verified that the modification in Table 3 provides that on average below zero. Furthermore, which was observed above to be zero on average.

It is also possible to use slightly modified versions of the implementation above. For instance, the bits z 1 and z 5 may instead be generated by pairwise swapping of the bits q 1 and q 5. Alternatively or additionally, the bits z 2 and z 6 may instead be generated by pairwise swapping of the bits q 2 and q 6. None of these modifications alters the value of so it still holds that is on average above zero, that is on average below zero, and that is zero on average.

The bits z 3 and z 7 form the third set. As noted above, q 3 + q 7 is on average zero. If the analog weights a 3 and a 5 have been mutually well matched, e.g. in the above-mentioned first calibration round, then q 3 can be mapped onto z 3 and q 7 can be mapped onto z 7 , and the bits z 3 and z 7 in the third set will provide a negligible contribution to the DC level F at the output 140. Alternatively, z 3 and z 7 can be generated by applying pairwise swapping to the bits q 3 and q 7 , whereby each of z 3 and z 7 is, on average, zero. If the detected DC level at the output 140 is above zero, then the analog weights can be adjusted by either increasing the analog weights a 2 and a 6 , or by decreasing the analog weights a 1 , a 4 , and a 5. Conversely, if the detected DC level at the output 140 is below zero, then the analog weights can be adjusted by either decreasing the analog weights a 2 and a 6 , or by increasing the analog weights a 1 , a 4 , and a 5. This procedure can be iterated until the analog weights a 2 and a 6 have been matched with the analog weights a 1 , a 4 , and a 5 to within tolerable tolerances for a given specification.

A second example, where analog weights a 3 and a 7 (associated with the bits q 3 and q 7 , both with the bit weight 4) are matched with the other analog weights a 1 , a 2 , a 4 , a 5 , and a 6 (associated with the bits q 4 , q 2 , q 4 , q 5 , and q 6 , all with bit weights less than 4) is illustrated with Table 4 below, which is a modification of Table 2 above. As for Table 3, the modified parts have been indicated with thicker lines at the cell borders in Table 4. The modification is based on the observation that, in Table 2, for inputs -1, -3, -5, and -7, bit q 3 with bit weight 4 is 1, and the bit q 6 with bit weight 2 and the two bits q 5 and q 4 with bit weight 1 are -1. By inverting these bits, the averages of (q 4 + q 4 + q 5 ) + (q 2 + q 6 ) and q 3 + q 7 are changed without changing the represented number. Furthermore, it can be noted that the modifications do not alter the value of the sum (q 4 w 4 + q 4 w 4 + qr 5 w 5 ) + (q 2 w 2 + q 6 w b ) + (q 3 w 3 + q 7 w 7 ). Since all three parentheses individually are zero on average (for the values in Table 2), the whole expression is zero on average (both for the values in Table 2 and for the values in Table 4). Table 4

In the second example, ¾ is mapped onto z 1 , q 2 is mapped onto z 2 , q 4 is mapped onto z 4 , q 5 is mapped onto z 5 , and q 6 is mapped onto z 6. The bits z 1 , z 2 , z 4 , z 5 , and z 6 form the first set. It is readily verified that the modification in Table 4 provides that is on average above zero. Furthermore, in the second example, q 3 is mapped onto z 3 and q 7 is mapped onto z 7. The bits z 3 and z 7 form the second set. It is readily verified that the modification in Table 4 provides that is on average below zero. In the second example, the third set is empty. Furthermore, which was observed above to be zero on average.

If the detected DC level at the output 140 is above zero, then the analog weights can be adjusted by either increasing the analog weights a 3 and a 7 , or by decreasing the analog weights a 1 , a 2 , a 4 , a 5 , and a 6. Conversely, if the detected DC level at the output 140 is below zero, then the analog weights can be adjusted by either decreasing the analog weights a 3 and a 7 , or by increasing the analog weights a 1 , a 2 , a 4 , a 5 , and a 6. This procedure can be iterated until the analog weights a 3 and a 7 have been matched with the analog weights a 1 , a 2 , a 4 , a 5 , and a 6 to within tolerable tolerances for a given specification. The modifications of Table 2 shown in Table 3 and Table 4 are merely examples. There are other modifications that can be used. For example, the modifications for negative decimal values in Table 3 and Table 4 can be made in a corresponding way for positive decimal values instead. Combinations of modifications for both positive and negative decimal values are also possible. As described above, the digital control circuit 110 may be configured to operate in one or more weight-calibration modes. According to some embodiments, each of the first set and the second set may consist of a single bit in at least one of the weight-calibration modes. This facilitates pairwise calibration of analog weights with the same nominal weight.

According to some embodiments, the first set and the second set may consist of different numbers of bits in at least one of the weight-calibration modes. The first and second examples of the calibration of analog weights with different nominal weights illustrate such embodiments.

According to some embodiments, each of the first set and the second set may consist of multiple bits in at least one of the weight-calibration modes. Again, the first and second examples of the calibration of analog weights with different nominal weights illustrate such embodiments.

Fig. 4 illustrates a current-switching implementation of the DAC 25 according to an embodiment. In this embodiment, the analog weights are implemented as weighted current sources. The analog weight a i is implemented with a current source I i nominally generating the current W j / U , where / u is a unit current. The summation circuitry 130 is implemented with a number of switches s i configured to selectively connect the current sources I i to the output 140 under control of the bits z i [n] of the control word z\n\ . When the bit z i [n] = +1, then the switch s i is closed, and when the bit z i [n] =- 1, the switch s i is closed. Fig. 4 shows a resistive load 170 connected between the output 140 and ground. The load 170 may be comprised in the DAC 25, or may be external to the DAC 25. Current- switching DACs are, per se, well known in the art of DAC design. The embodiment in Fig. 4 is merely an example of a current-switching implementation. Numerous different variations are conceivable, which may e.g. be differential or single-ended, implemented with current sinks or current sources, or both, etc., as would be well understood by a person skilled in the art of DAC design.

Fig. 5 illustrates how a current source with nominal current w i / U can be implemented by connecting W i unit current sources (i.e. current sources nominally generating the current / u ) in parallel.

Fig. 6 illustrates an embodiment of a bias circuit 200 that is configured to generate multiple bias voltages V 1 -V 3. The bias circuit may be comprised in the calibration circuit 160. In the embodiment illustrated in Fig. 6, the bias circuit 200 comprises a first subcircuit configured to generate a first bias voltage V 1 , a second subcircuit configured to generate a second bias voltage V 2 , and a third subcircuit configured to generate a third bias voltage V 3.

The first subcircuit comprises a PMOS transistor PI having its gate terminal connected to its drain terminal. A MOS (Metal-Oxide-Semiconductor) transistor connected this way is sometimes referred to as a diode-connected MOS transistor. Furthermore, the PMOS transistor PI has its source terminal connected to a supply voltage node. Moreover, the first subcircuit comprises a current source Ibl connected to the drain terminal of the PMOS transistor PI. The current source Ibl is configured to generate a current I ref — Δ/, where / ref is a reference current and Δ/ is a deviation from the reference current. The first subcircuit is configured to generate the bias voltage V 1 on the gate terminal of the PMOS transistor PI.

The second and third subcircuits are configured in a similar way as the first subcircuit. The second subcircuit comprises a diode-connected PMOS transistor P2 having its its source terminal connected to the supply voltage node. Moreover, the second subcircuit comprises a current source Ib2 connected to the drain terminal of the PMOS transistor P2. The current source Ib2 is configured to generate the current / ref. The second subcircuit is configured to generate the bias voltage V 2 on the gate terminal of the PMOS transistor P2. The third subcircuit comprises a diode-connected PMOS transistor P3 having its its source terminal connected to the supply voltage node. Moreover, the third subcircuit comprises a current source Ib3 connected to the drain terminal of the PMOS transistor P3. The current source Ib3 is configured to generate the current / ref + Δ/. The third subcircuit is configured to generate the bias voltage V 3 on the gate terminal of the PMOS transistor P3. The PMOS transistors PI, P2, and P3 in Fig. 6 may be designed with the same size.

The bias circuit shown in Fig. 6 is configured to generate three different bias voltages. This can be extended in a straightforward manner by adding further subcircuits configured to generate further bias voltages. Fig. 7 illustrates how the bias circuit 200 in Fig. 6 can be used to adjust the current of an adjustable current source. The adjustable current source may be used to implement current sources, such as unit current sources, in a current-switching implementation of the DAC 25.

In Fig. 7, the adjustable current source is implemented with a PMOS transistor P4 having its source terminal connected to the supply voltage node. Furthermore, Fig. 7 shows a switch S bias connected to the gate terminal of the PMOS transistor P4. The switch S bias may be comprised in the calibration circuit 160. The switch S bias is configurable to connect the gate terminal of the PMOS transistor to either one of the bias voltages V 1 -V 3 . The drain current generated by the PMOS transistor P4 can be adjusted by changing which one of the bias voltages V 1 -V 3 the gate terminal of P4 is connected to.

An adjustable current source can also be implemented with a fixed current source in parallel with a current- switched DAC according to some embodiments.

The DC-detection circuit 150 may be zeroed, or reset, before the weight calibration is performed. For instance, by generating the control word z[n] such that each of the bits z i [n] are, on average, zero, each of the bits Z i [n] provides a zero contribution to the DC level at the output 140. This can e.g. be accomplished by using DEM, such as pairwise swapping. The DC-detection circuit 150 can measure the DC level thus obtained for the physical quantity representing the output Y (t) and use this as the zero level during the weight calibration. This eliminates, or at least suppresses, any DC offsets not caused by mismatch in the analog weights, such as any DC offset within the DC-detection circuit 150 itself. Such DC offsets not caused by mismatch in the analog weights and be compensated for either at the input of the DC-detection circuit 150 or at the output if the DC detection circuit. The DC detection circuit 150 may e.g. be implemented with a relatively slow but accurate ADC. In that case, said compensation of DC offsets not caused by mismatch in the analog weights can be performed by a constant level shift in the analog domain at the input of sad ADC, or by subtraction of a corresponding constant value in the digital domain at the output of sad ADC.

It should also be noted that, in some embodiments, once the calibration has been done, the DAC 25 can be operated in a regular manner, e.g. as a regular thermometer-coded, segmented, or decomposed DAC, or whatever DAC architecture is used. In other embodiments, the calibration may be performed continuously to track time variations of analog weights, e.g. due due to temperature variations etc.

According to some embodiments, there is provided a method of weight calibration in the DAC 25. A flowchart of the method according to some embodiments is shown in Fig. 8. The method comprises, during a measurement procedure, generating 300 the bits of the first set as described above, and generating 310 the bits of the second set as described above. The method may further comprise generating 320 the bits in the third set (i.e. the bits not in the first set or the second set, if any), for instance such that each of the bits in the third set is, on average, zero. The steps 300, 310, and 320 in Fig. 8 may, for instance, be carried out by the digital control circuit 110. The method further comprises detecting 330 the DC level at the output 140 of the DAC 25 during the measurement procedure. Step 330 may, for instance, be carried out by the detection circuit 150. Furthermore, the method comprises adjusting 340 the analog weights associated with the bits in the first set or the second set in response to the detected DC level. Step 340 may, for instance, be carried out by the calibration circuit 160. After step 340, the measurement procedure may be iterated again, possibly after changing the constitution of the first set and/or the second set in step 350. Hence, in some embodiments, the measurement procedure is iterated with different bits in the first or second sets in different iterations, thereby resulting in a plurality of detected DC levels by the DC-detection circuit 150. Again, the word “or” in the preceding sentence should be interpreted as a normal logical “or” (i.e. “and/or”, not as an “exclusive or”). The iteration of the measurement procedure may e.g. be controlled by the control circuit 110. Different weight-calibration modes may be used in different iterations of the measurement procedure.

In view of the above, said measurement procedure may comprise steps 300, 310 and 330, and possibly step 320 if used. Furthermore, said measurement procedure may include step 340, i.e. said measurement procedure may be a measurement-and-adjustment procedure.

The embodiments illustrated with the flowchart in Fig. 8 uses iterative pairwise adjustments of sets of analog weights to gradually obtain calibrated analog weights. In alternative embodiments, pairwise measurements (without weight adjustments during the iterations of the measurement procedure) of weight mismatches between sets of analog weights can be made instead, whereby the required adjustments of analog weights can be computed (for all analog weights in one go) by solving a set of linear equations and applying suitable boundary conditions (e.g. fixing a certain analog weight or the sum of the analog weights, or some other boundary condition that would result in a set of linear equations with full rank). A flowchart illustrating such an alternative embodiment of said method is illustrated with a flowchart in Fig. 9. Compared with the flowchart in Fig. 8, the step 340 of adjusting the analog weights in response to the detected DC level has been move outside the measurement loop, i.e. outside the iterations of the measurement procedure. After step 330, instead of adjusting the analog weights of the sets that have just been subject to comparison, it is checked in step 360 whether all pairwise measurements of weight mismatches between groups of analog weights have been done. If the answer is NO, the constitution of the first set and/or the second set are changed in step 350, and a measurement of the weight mismatches of the corresponding sets of analog weights is performed by detecting the DC level in step 330. If the answer (in step 360) is YES, then the required weight adjustments are computed in step 370 in response to the plurality of detected DC levels from the iterations of step 330. These adjustments are then performed in step 340. As indicated with the dashed arrow in Fig. 9, the whole procedure may then start over again, e.g. to account for drift over time of the weight mismatches.

Embodiments of the DAC 25 are suitable for integration on an integrated circuit. This is illustrated in Fig. 10, schematically showing an integrated circuit 500 comprising the DAC 25.

The disclosure above refers to specific embodiments. However, other embodiments than the above described are possible within the scope of the invention. For example, embodiments of the DAC 25 may be used in other types of electronic apparatuses than communication apparatuses. For instance, embodiments of the DAC 25 may be used in audio applications. As another example, embodiments of the DAC 25 may be used as a feedback DAC in an ADC, such as a delta-sigma ADC. Furthermore, the thermometer-coded, segmented, and decomposed architectures are merely examples of DAC architectures that can be weight- calibrated using the weight-calibration procedures described herein. Other architectures include, but are not limited to, multi-layer decomposed DACs (see e.g. [Andersson, 2005]), partially decomposed DACs (see e.g. [Andersson, 2005]), and multi- segmented DACs (where different segments of bits in the input word x are encoded into thermometer codes with different bit weights). Alternatively, a hybrid between the decomposed DAC and the segmented DAC may be used. Consider, for instance, the (1 -layer) decomposed architecture illustrated with Table 2 above. It has two binary-weighted parts represented with the words [q 3 q 2 q 1 ] and [q 7 q 6 q 5 ]. Each of these binary-weighted parts can be transformed into segmented parts by encoding the MSBs [q 3 q 2 ] and [q 7 q 6 ] into corresponding thermometer codes, whereby such a hybrid between the decomposed DAC and the segmented DAC is obtained. Furthermore, a current-switching implementation was shown as a mere example, but the weight-calibration procedures disclosed herein may equally well be applied to other types of DACs, such as but not limited to charge-redistribution DACs, resistive ladder DACs, and capacitive ladder DACs. Moreover, Fig. 3 illustrates the summation circuitry 130 and the set 120 of analog weights as separate blocks. In some embodiments, the summation circuitry 130 and the set 120 of analog weights may be implemented with common circuitry. For instance, in ladder DACs (such as resistive ladder DACs and capacitive ladder DAC), a ladder circuit (such as a resistor ladder or capacitor ladder) is involved both in the realization of the analog weights as well as in the weighted summation of the bits in the control word. The set 120 of analog weights may in such embodiments be seen as being comprised in the summation circuit 130. The different features and steps of the embodiments may be combined in other combinations than those described.