This invention relates in general to direct digital synthesizer (DDS) circuits that are based on a digital-to-time converter (DTC) and more particularly to the use of dither to reduce spurs in the spectrum of the DDS output.
A direct digital synthesis (DDS) synthesizer circuit often incorporates a digital-to-time converter (DTC) to produce a square wave at its output. The output of the DDS based on a DTC can be used in a radio transceiver to provide a local oscillator (LO) signal. Although common problems often associated with using a DDS involve a tolerable spurious emissions level (spurs) and noise floor, the use of DDS in a radio transceiver also offers many benefits since the DDS output frequency can be tuned over a very wide range with zero lock time.
With regard to spurious emissions by the DDS, there are two sources of error that cause spurs in the spectrum of the output square wave. These sources of error include both mismatch error and quantization error. Mismatch error refers to the DTC error that is due to process mismatch delay and locked loop error. Quantization error is the error or distortion introduced through the quantization process. Although there are existing methods that use dither to eliminate the contribution of the quantization error to the spurs it does nothing to mitigate the mismatch error. As is well known in the art, dithering is done by adding noise of a level less than the least-significant bit before rounding. The added noise has the effect of spreading the many short-term errors across the spectrum as broadband noise. Small improvements can be made to a dithering algorithm such as shaping the noise to areas where it is less objectionable, but the process remains simply one of adding the minimal amount of noise necessary to increase performance.
One example of this type of dithering approach is shown in U.S. Pat. No. 4,933,890 which is herein incorporated by reference. Prior art
Prior art
The bit width of the output of the digital block, k, sets the resolution for delaying the pulses in the idealized pulse waveform, i.e. setting the period of the idealized pulse waveform. In the example waveform of
The bit width of the output of the digital block, k, exceeds the bit width of the input of the DTC, m. In
As noted herein, the quantizer 107 rounds the sum of the digital block 101 and dither source 103. Lines E and F show the 2's complement outputs of the dither source and summer. The dither source is a discrete random variable uniformly distributed in the range −2−m−1≦d(n)<2−m−1.
It will be recognized by those skilled in the art that the limits of the range are plus/minus one-half quantization interval, or 2−4= 1/16 in
Thus, it can be shown that the probability that the quantizer rounds to q(n)=0 is ¼ and to q(n)=⅛ is ¾. In the ensemble average of cycles with v(n)= 3/32, the average error is calculated as − 3/32×(¼)+ 1/32×(¾)=0.
Those skilled in the art will further recognize that in the ensemble average of a large number of cycles the timing error due to quantization approaches zero. Due to rounding, the quantizer output range is 0 to 1.000 and requires a digit in front of the point. For the DTC input, on the other hand, there is no digit in front of the point and the range is 0 to the binary number 0.111, representing ⅞. w(n)=1.000 is not a valid DTC input. w(n)=1.000 is not typically a valid DTC input for implementations of DTC since if it were valid, it would correspond to a pulse delayed by Tclk, i.e., one clock period, with respect to the rising edge of clock cycle n. An equivalent pulse can also be produced with w(n+1)=0, i.e. a delay of zero with respect to the rising edge of clock cycle n+1. The signals q(n) and en1(n) couple to the input of the DTC through the modulo block 109. Lines H and I in
Finally, a high resolution digital-to-time converter (DTC) 111 is used to finely locate each edge of the output signal 113 at the correct instant in the time domain. As is well known in the art, the time resolution of the DTC 111 directly determines the spectral purity of output signal 113. The output signal 113 is a square wave whose spectrum contains spurs and measurable noise floor. The DTC produces a pulse at the output, delayed with respect to the reference clock. Line J of
The mathematical sum of the ideal waveform in line D in
One problem associated with the system as seen in
Therefore, the need exists to provide a DDS with improved quantization error and mismatch to reduce overall spurious emissions.
The present invention is directed to an improved type of dither that works not only to eliminate the contribution of the quantization error to spurious emissions in a direct digital synthesizer, but also reduces the contribution of the mismatch error to any spurious emissions. In accordance with the invention, the output of a digital block is used to compute an address into table of a random access memory (RAM).
While the specification concludes with claims defining the features of the invention that are regarded as novel, it is believed that the invention will be better understood from a consideration of the following description in conjunction with the drawing figures, in which like reference numerals are carried forward.
When the timing error for the pulse delays in the DTC output is dominated by quantization error, the prior art dither works to significantly reduce spurs in the spectrum of the synthesizer output through two aspects. First, as described herein, the prior art system breaks up the patterns in the timing error associated with the output pulses that are produced by the synthesizer. Specifically, the synthesizer breaks up patterns in the timing error due to quantization, although it cannot break up patterns in the timing error due to DTC mismatch. Second, as also described herein, in the ensemble average of a large number of output cycles the timing error due to quantization approaches zero. Unfortunately, as the DTC mismatch error increases in magnitude compared to the quantization error, the prior art dither increasingly fails to achieve those two aspects. The prior art dither eliminates the contribution of the quantization error to the spurs, but cannot reduce the contribution of the DTC mismatch error.
This problem is overcome in the present invention by providing a lookup table that maps from 2k equally spaced delays to 2k values for combining with the dither source. As in the prior art system, the digital block output v(n) corresponds to the amount of delay for one pulse in the idealized pulse waveform. In a cycle in which en1(n)=1 (and therefore v(n) is not equal to don't_care) the circuit fetches the look-up table value corresponding to the value of v(n) in the cycle. The fetched value then is combined with the dither source and quantized, and the quantizer output is asserted on the DTC input. The statistics of the quantizer output are controlled by the fetched value. If the fetched value is between two quantization levels, then the value at the quantizer output has a probability P of equaling the quantization level to the left, and a probability 1−P of the one to the right. The look-up table value sets the value of P. Assuming the same value of v(n) occurs in other cycles as well, the average delay for a large collection of cycles containing the value of v(n) is gx×P+gx+2
The values to load in the look-up table are found by first measuring pulse delay at the DTC output versus value of the DTC input, w(n). The measurements are then used in calculations that provide look-up table values. The DTC measurements, look-up table value calculations, and loading the look-up table might be performed one time during manufacture. Alternatively, the device might contain circuits that automatically measure the DTC where a microprocessor is used for calculating the table values and loading the table. This circuit might operate periodically, updating the table at intervals as temperature or supply voltage might change the characteristics of the DTC. If interrupting the synthesizer output is required in order to update the table values, the update might occur in for example the inter-packet time.
Referring now to
As seen in
The procedure for calculating the lookup table values is outlined below. When the procedure is followed for address 7, as an example, the table value to load at address 7 captures the following information. The ideal time delay corresponding to address 7 occurs in the interval between the actual DTC delays for w(n)=⅛ and w(n)= 2/8, as indicated by an arrow 401 in
Through one-time setup at the factory, or periodically during operation, the DTC is measured. This is carried out either using measurement equipment at the factory or using on-chip circuits specially designed to measure the DTC. Specifically, what is measured is pulse delay at the DTC output versus value of the DTC input, w(n).
For each address, the value stored at the address is computed as
where k is the bit width of the output of the digital block. In
m is the bit width of the input of the DTC. In
D(addr)=addr×2−k×Tclk as defined above. By way of examples, in
x=the largest value that can be applied to the DTC input, i.e. the largest w(n), without the DTC producing a pulse delay larger than D(addr). The actual pulse delays and D(addr) are plotted together on a time line, as in
gx=actual delay the DTC produces for w(n)=x.
gx+2
x+2−m<1.000
OR Tclk IF
x+2−m=1.000.
This equation is designed to achieve a behavior where the ideal delay for the pulse at the DTC output is D(addr) and the quantizer randomly picks either w(n)=x or w(n)=x+2−m, where picking w(n)=x results in a pulse delayed by less than the ideal and w(n)=x+2−m results in a pulse delayed by greater than the ideal. Those skilled in the art will recognize that the output of the quantizer dithers between the two quantization levels that bracket, i.e. surround, the unquantized value.
The value stored at the address is in the range [x, x+2−m). Since the dither ranges over −2−m−1≦d(n)<2−m−1 and the quantizer quantizes to the nearest multiple of 2−m, it can easily be shown that the output of the quantizer either equals w(n)=x or w(n)=x+2−m. The exception is when the value stored at the address is exactly equal to x. In this case the probability is 1.0 that the quantizer quantizes to w(n)=x.
The quantizer output has a probability, P, of equaling the level to the left of ideal, i.e. w(n)=x, and a probability 1−P of equaling the level to the right, i.e. w(n)=x+2−m. It can be shown that since the dither is a discrete random variable uniformly distributed over the range −2−m−1≦d(n)<2−m−1 it follows that P equals 1−ε. The definition of ε is embedded in the equation above. Note that this result, i.e. that P=1−ε, assumes that the bit width of the dither source exceeds the bit width of the word stored at the RAM address. Furthermore, epsilon equals the ratio between the following 2 delta-time values: the difference between D(addr) and the actual DTC delay for w(n)=x and the difference between actual DTC delay for w(n)=x+2−m and for w(n)=x. Clearly 0≦ε<1. Note that ε occupies the h-m least significant bits of the word stored in the RAM, and x occupies the m most significant bits.
For every table value stored in the RAM there is a corresponding value of ε and of P=1−ε. By way of example, for address 7 there is a corresponding value of P=1−ε. There is also a corresponding value of x, the quantization level to the left. The average delay obtained in cycles in which the address equals 7 is gx×P+gx+2
The value of ε, which as mentioned above is held in the least significant bits of the word stored in the RAM, controls P. x and ε together control the average delay. The value of ε is found using the above equation, using the measurements taken on the DTC.
In the DDS 300 shown in
If the DTC mismatch error is not severe, x in the above equation might be as an example ⅞ for the range of addresses from 27 to 31 or 28 to 31. It should be noted that for x=⅞, x+2−m= 8/8=1. In cycles in which the address is in the range for x=⅞, w(n) dithers between ⅞ in cycle n and 0 in cycle n+1.
If the DTC mismatch error is severe, x in the above equation might be as an example ⅝ even for address=31. This represents a DTC where the delays are significantly larger than nominal. In cycles that have address=31, w(n) dithers between ⅝ and 6/8. The modulo block behaves as a transparent pass-through 100% of the time, since RAM output r(n) never equals 1.000.
In another case where DTC mismatch error is severe, x might be say ⅞ for the entire range of addresses from e.g. 20 to 31. In a cycle that has address in this range, w(n) dithers between ⅞ in cycle n and 0 in cycle n+1.
In the description of an ideal DTC defined herein, the delay for the pulse at the output is zero for w(n)=0, where delay is measured from the rising edge of the clock. In other words for w(n)=0 the rising edge of the output pulse aligns with the rising edge of the reference clock. This is not the only possible identification of ideal delay for w(n)=0, and a different approach might be convenient for certain applications.
For some applications, alignment of the synthesizer output with the reference clock, i.e. the phase with respect to the reference clock, might not be important. The only requirement for the output signal might be the spectral purity, in other words the timing error for spacing the pulses evenly in time. In this case it is convenient to consider the actual delay the DTC produces for w(n)=0 as the ideal delay, for the purpose of computing the RAM table values. In
Even if the phase with respect to the reference clock is important, there is some flexibility for the method of computing the RAM table values. By way of example, two sequences that produce Fout=⅔×Fclk are v1(n)=0,16,x,0,16,x . . . and v2(n)=30,x,14,30,x,14, . . . Suppose for example the RAM look-up table values are computed with ideal delay for w(n)=0 identified as zero with respect to the rising edge of the reference clock. In other words, identifying the ideal pulse produced with w(n)=0 as aligned with the rising edge of the reference clock. The output of the synthesizer with v1(n) is guaranteed to have edges aligning with the edges of the reference clock (assuming the measurements used in the lookup table calculations are accurate.) Now suppose the RAM table values are computed with the delay the DTC actually produces for w(n)=0 considered the ideal delay for the purpose of computing the RAM table values. The output of the synthesizer with v2(n) might actually have edges closer to aligning with the clock edges than with v1(n). The digital block can be implemented with control logic that steers the phase by outputting for example the sequence v2(n) instead of v1(n).
Thus, the invention involves providing a look-up table within the RAM 305 that maps from 2k equally spaced delays to 2k values for combining with the dither source. The values stored in the look-up table are computed based upon measurements of a DTC 317. The spurious emission levels produced by the DDS 300 will depend on the accuracy of the look-up table while the accuracy of the lookup table will depend on the accuracy of the measurements of DTC 317. The invention as described herein applies when mismatch error is a value other than zero, and unlike the prior art form of dither, is of utility even if the bit width of the digital block output does not exceed the bit width of the DTC input. If the DDS 100 of prior art
As noted herein summer 605 combines dither source 603 with the output of digital block 601 to provide a j-bit wide number to quantizer 607. The quantizer rounds to the nearest multiple of 2−m producing output signal q(n) applied to modulo block 609. The modulo block is transparent to all values of q(n) except q(n)=1.000, which it pushes into the next clock cycle. The output of the modulo block is applied to DTC 611 and multiplier 614. The multiplier supplies the product w(n)×2−m, an integer, to the address port of RAM 615 and the value stored there is fetched. The summer 617 computes the sum of the fetched value and the dither source 621. The output of summer 617 is quantized by 2 level quantizer 619. The 1-bit quantizer output e(n) is applied to control port 610 of DTC 611.
The signal e(n) at control port 610 controls a single delay element in the signal path in the DTC. In a cycle in which en2(n)=1 the DTC produces a pulse delayed by w(n)×Tclk+e(n)×δ+mism{w(n)} where e(n) is 0 or 1 and mism{w(n)} is the mismatch error associated with the value of w(n) in the cycle. The delay element controlled by e(n) introduces a delay of δ if e(n)=1, and zero if e(n)=0.
The dither source is uniformly distributed between −½ and ½ and the values stored in the RAM look-up table are between 0 and 1. Thus in cycle # n the probability P(n) that the quantizer outputs 0 is given by P=1−r(n), where r(n) is the value fetched from the RAM in the cycle.. The probability is 1−P that the quantizer outputs 1. Say the value fetched from the RAM in a particular cycle is r(n)=tv(7), where tv(7) is the table value stored at address 7. The average pulse delay at the DTC output, computed over the set of all cycles that fetch the value at address 7, equals 2−m×7×Tclk+(1−P)×δ+mism{w(n)=2−m×7} where P=1−tv(7) and the term mism{w(n)=2−m×7) is the mismatch error associated with w(n)=2−m×7. The look-up table values are computed using measured values of mism {w(n)} and to the degree that the measurements are accurate, and accurate table values are loaded in the RAM, the term (1−P)×δ cancels out the mismatch error term.
In a variation on DDS 600, the quantizer 619 outputs 0 and −1 where −1 applied to the control port 610 decreases the delay by an amount delta. In another variation, the quantizer 619 is 2-bits wide and outputs 0, 1, and −1. In still another variation, there is more than one delay element in the signal path in the DTC. A multiplexer incorporated in the DTC can use w(n) for a select input and then routes the control signal at port 610 to one of 2m delay elements. The delay elements provide differing amounts of delta-delay because of mismatch, therefore δ in a particular cycle depends on the particular delay element that is picked in the cycle (and therefore on w(n) in the cycle.)
In summary, the invention defines a new approach to dither that not only eliminates the contribution of the quantization error to spurious emissions, but also reduces the contribution of the mismatch error to these emissions by using at least one dither source and RAM which maps from 2k equally spaced delays to 2k values for combining with a dither source.
While the preferred embodiments of the invention have been illustrated and described, it will be clear that the invention is not so limited. Numerous modifications, changes, variations, substitutions and equivalents will occur to those skilled in the art without departing from the spirit and scope of the present invention as defined by the appended claims.