Dac If Xapp154
Dac If Xapp154
Dac If Xapp154
APPLICATION NOTE
0
Virtex Synthesizable Delta-Sigma DAC
XAPP154 September 23, 1999 (Version 1.1) 0 13* Application Note by John Logue
Summary
Digital to analog converters (DACs) convert a binary number into a voltage directly proportional to the value of the binary number. A variety of
applications use DACs including waveform generators and programmable voltage sources. This application note describes a Delta-Sigma DAC
implemented in a Virtex FPGA. The only external circuitry required is a low pass filter comprised of just one resistor and one capacitor. Internal
resource requirements are also minimal. For example, a 10-bit DAC uses only three Virtex CLBs. The speed and flexible output structure of the Virtex
series FPGAs make them ideal for this application.
Xilinx Family: Virtex Family
Introduction Delta-Sigma DACs are used extensively in audio applications. They are
suited for low frequency applications that require relatively high
Figure 1 is a top-level schematic diagram of a typical Virtex DAC accuracy.
implementation. As shown in this diagram, the inputs include reset and
clock signals, in addition to the binary number bus. As is standard practice, the DAC binary input in this implementation is
an unsigned number with zero representing the lowest voltage level. The
DACoutDrvr (Virtex output pin) drives an external low-pass filter. VOUT analog voltage output is also positive only. A zero on the input produces
can be set from 0V to VCCO, where VCCO is the supply voltage applied to zero volts at the output. All ones on the input cause the output to nearly
the FPGA I/O bank driving the resistor-capacitor filter. reach VCCO. For AC signals, the positive bias on the analog signal can
be removed with capacitive coupling to the load. Though the low pass
filter can be driven with any of the Virtex SelectIOTM output standards
Virtex FPGA that both sink and source current, this application note emphasizes the
LVTTL standard.
OBUF_F_24
3.3k
VOUT Figure 2 is a block diagram of a Delta-Sigma DAC. The width of the
DACout
Verilog dac binary input in the implementation described below is configurable. For
module DACoutDrvr
DACin [7:0]
DACin [7:0] 0.0047 µF simplicity, the block diagram depicts a DAC with an 8-bit binary input.
100 MHz
The term “Delta-Sigma” refers to the arithmetic difference and sum,
Reset Reset
respectively. In this implementation, binary adders are used to create
both the difference and the sum. Although the inputs to the Delta adder
990709001 are unsigned, the outputs of both adders are considered signed
numbers. The Delta Adder calculates the difference between the DAC
Figure 1: Top-level DAC Implementation input and the current DAC output, represented as a binary number.
Since the DAC output is a single bit, it is “all or nothing”; i.e., either all
The classic current summing digital to analog converter uses matched zeroes or all ones. As shown in Figure 2, the difference will result when
resistors to convert a binary number to a corresponding voltage level. adding the input to a value created by concatenating two copies of the
This technique works well for high-speed DACs when the binary number most significant bit of the Sigma Latch with all zeros. This also
is up to ten bits wide. However, it is difficult to maintain accuracy over a compensates for the fact that DACin is unsigned. The Sigma Adder
range of temperatures as the number of bits increases. sums its previous output, held in Sigma Latch, with the current output of
the Delta Adder.
Delta-Sigma Architecture In most cases, the Delta adder is optimized out when the high level
A Delta-Sigma DAC uses digital techniques. Consequently, it is design is synthesized. This is because all bits on either the A or B inputs
impervious to temperature change, and may be implemented in are zero, so A and B are simply merged, rather than added.
programmable logic. Delta-Sigma DACs are actually high-speed single-
As noted below, the DAC input can be widened by one bit to allow the full
bit DACs. Using digital feedback, a string of pulses is generated. The
analog range of 0V to VCCO. In this case, the Delta adder is needed.
average duty cycle of the pulse string is proportional to the value of the
binary input. The analog signal is created by passing the pulse string The interface to Verilog module dac in Figure 1 includes one output and
through an analog low-pass filter. While an in-depth discussion of Delta- three input signals as defined in Table 1. All signals are active high.
Sigma conversion is beyond the scope of this application note, the basic
architecture, implementation, and trade-offs are covered.
Table 1: DAC Interface Signals
Implementation
The DAC can be implemented in a single Verilog module, as shown
below. The width of the input bus is configurable with defined constant
MSBI .
‘timescale 100 ps / 10 ps
‘define MSBI 7 // Most significant Bit of DAC input
10 DACout
D S L
SUM SUM D Q
L [9]
D Q
DeltaB
B B Init
10
10
{ L [9] , L [9] , 0, 0, 0, 0, 0, 0, 0, 0 } L [9]
CLR
Clk
Reset
990709002
1.00
0.90
0.80
0.70
Peak-to-Peak Filter Noise Voltage as a Fraction of a Step
40.0
0.60
0.50
60.0
0.40
80.0
0.30
100.0
120.0
0.20
0.10
0.00
2.0 4.0 6.0 8.0 10.00 12.00 14.00 16.00 18.00 20.00 22.00 24.00 26.00 28.00 30.00 32.00 34.00 36.00 38.00 40.00
RC (x 10E - 6)
Note: The number at the end of each curve is the DAC clock frequency in MHz. 99063002
1.00
0.90
0.80
0.70
Peak-to-Peak Filter Noise Voltage as a Fraction of a Step
0.60
0.50
0.40
0.30
0.20
40.0
60.0
0.10
80.0
100.0
120.0
0.00
2.0 4.0 6.0 8.0 10.00 12.00 14.00 16.00 18.00 20.00 22.00 24.00 26.00 28.00 30.00 32.00 34.00 36.00 38.00 40.00
RC (x 10E - 6)
Note: The number at the end of each curve is the DAC clock frequency in MHz. 99063004
1.00
0.90
0.80
0.70
Peak-to-Peak Filter Noise Voltage as a Fraction of a Step
0.60
0.50
0.40
0.30
0.20
0.10
40.0
60.0
80.0
100.0
120.0
0.00
2.0 4.0 6.0 8.0 10.00 12.00 14.00 16.00 18.00 20.00 22.00 24.00 26.00 28.00 30.00 32.00 34.00 36.00 38.00 40.00
RC (x 10E - 6)
Note: The number at the end of each curve is the DAC clock frequency in MHz. 99063003
Figure 5: Peak-to-Peak Filter Noise as a Function of RC and Frequency (6-bit DAC)
Output Attenuation Figure 6 may be used in conjunction with Figure 3, Figure 4, or Figure 5
to choose the RC time constant that is optimum for a particular
By convention, the cutoff frequency of a low pass filter is defined as the application. All figures cover the same RC range.
half-power point. The cutoff frequency of the simple RC filter may be
expressed as: Figure 4 shows an RC value of 13.0 x 10-6 results in a peak-to-peak
noise voltage of 0.25V when a DAC clock frequency of 80 MHz is used
fC = 1/(2πτ) on a 8-bit DAC. From Figure 6, it can be determined that the filter cutoff
frequency for this RC value is about 12 KHz. If the expected output is
where:
essentially a DC level, e.g., a programmable voltage generator, then RC
fC is the filter cutoff frequency may be increased to reduce the clock noise. On the other hand, if the
τ is the filter time constant, RC. fundamental frequency of the analog output is high, or it has sharp
edges, then a lower RC may be needed. When determining the actual
The above equation was used to create Figure 6. component values, remember that R should be at least 2500 Ω.
The user may implement a more sophisticated filter if the simple RC filter
has inadequate cutoff or drive characteristics for the application.
30.00
27.50
25.00
22.50
20.00
Filter Cutoff Frequency (KHz)
17.50
15.00
12.50
10.00
7.50
5.00
2.50
2.0 4.0 6.0 8.0 10.00 12.00 14.00 16.00 18.00 20.00 22.00 24.00 26.00 28.00 30.00 32.00 34.00 36.00 38.00 40.00
RC (x 10E - 6)
99063001
Sampling Rate This section lists some of the ways this DAC can be used in real-world
applications.
To resolve each DACin sample to the full precision of a Delta-Sigma
DAC, the sample rate, i.e., the rate that DACin changes, must be less • Programmable Voltage Generator. A variable voltage between 0V
than or equal to 1/(2(MSBI+1)) of the CLK frequency. In some and VCCO can be generated with a granularity determined by the bus
applications, such as a programmable voltage source, this is not an width of DACin. In these applications, the voltage typically does not
issue. change quickly, so RC may be large to minimize noise.
• Virtex VREF Generator. This is a specific application of a
As DAC width and the desired sample frequency increases, it may not
be possible to meet the above criterion. In practice, the sample rate Programmable Voltage Generator. For some Virtex SelectIOTM
sometimes exceeds 1/(2(MSBI+1)) of the CLK frequency. Though this receivers standards, a reference voltage is required for each bank of
compromises precision at higher frequencies, it is often possible to get receivers. If a DAC is used to generate this voltage, VREF can be
satisfactory results. For example, the 16-bit audio DACs in a CD system dynamically changed to verify operating margins when conducting
would require a clock frequency of 2.9 GHz for full resolution of the system tests. See XAPP133 for more information on SelectIO.
highest frequencies. In practice, a much lower clock frequency is used. • Waveform Generator. Various analog waveforms, such as sine,
One reason this is acceptable is because the sensitivity of the human sawtooth, triangle, etc., can be created by sequentially feeding the
ear to noise becomes lower as the frequency increases. proper values to DACin. The values are normally pre-stored in
Conclusion Bibliography
The Delta-Sigma DAC is an example of how high speed FPGAs may be 1. “Analog Devices Data Converter Reference Manual, Volume I”, 1992
used in mixed-signal systems to minimize the number of components. 2. "High Performance Stereo Bit-Stream DAC with Digital Filter", R.
The speed and density of the Virtex family of FPGAs makes them ideal Finck, IEEE Transactions on Consumer Electronics, Vol. 35, No. 4, Nov.
for a wide range of analog signal generating and processing 1989.
applications.
Revision History
Date Revision # Activity
7/9/99 Version 1.0 Initial release
9/23/99 Version 1.1 Updated for Virtex-E designs