Low Voltage CMOS SAR ADC Design
Low Voltage CMOS SAR ADC Design
Design
By
Ryan Hunt
Senior Project
ELECTRICAL ENGINEERING DEPARTMENT
California Polytechnic State University
San Luis Obispo
June, 2014
Special Thanks:
To my senior project advisor Dr. Vladimir Prodanov
for all of his help with the designs
And
To Dr. Tina Smilkstein for her technical support with
Cadence
Abstract …………………………………………………………………………………………………… 4
Introduction……………………………………………………………………………………………… 4
Voltage Buffer…………………………………………………………………………………… 12
Comparator………………………………………………………………………………………. 30
Biasing Circuit…………………………………………………………………………………… 34
Conclusion……………………………………………………………………………………………….. 42
References……………………………………………………………………………………………….. 43
Appendices Page
Introduction
Several ADC topologies exist. Some of the most popular designs include - ADCs, flash ADCs,
and SAR ADCs. By far the most common ADCs are SAR ADCs [13]. The main reason comes down to
simplicity and design specifications. SAR ADCs have a decent conversion speed (about 50kHz to 4MHz
[13]) and take small overall chip area in comparison to flash ADCs, which are fast but take up a large
area. SAR ADC design also flows well with the use of a serial output port due to the nature of the
conversion method.
The SAR algorithm works by switching on a large voltage and comparing that to the input
voltage. If the switched voltage proves higher than the input voltage then the algorithm turns off that
voltage and turns on a voltage half that size and repeats. If the voltage comes up lower than the input
voltage it keeps that voltage on and then adds a voltage that represents half the size of the first voltage
and repeats. This then corresponds to a series of 1s and 0s. These values are known as bits with the first
voltage that is turned on corresponding to the most significant bit (or MSB) and the last voltage
corresponding to the least significant bit (or LSB). When the algorithm finishes the result is a binary
code that corresponds to the input voltage. This process is referred to as successive approximation. The
code produced results in a readable data form for a computer or micro-controller. Figure 1 shows the
basics of how the algorithm works where VREF represents the max voltage that the SAR ADC can
measure.
One way of measuring the accuracy of an ADC derives from measuring its differential non-
linearity (DNL) or its integral non-linearity (INL). A DNL measurement shows how far off the measured
value of each step deviates from the ideal measurement on average and INL represents the
measurement of deviation from the ideal line. Figure 2 show an example of DNL error and Figure 3
shows an example of INL error. These terms come up throughout the paper when referring to the
accuracy of the ADC.
Figure 2: Example of a DNL Error (Blue Line Represents the Ideal Values) [11]
Popularity of this design and the relatively straight forward concepts behind it makes it an ideal
choice for learning ADC design strategies and interfacing it with other devices.
6. The device must run off a 1.8 V rail. This value comes about due to the restrictions placed
on the designs due to the use of 180nm technology
that the device design revolves around. [4]
Marketing Requirements
1. High accuracy in sample range.
2. Compact for ease of use.
3. Low cost for use by DIY engineers.
4. High resolution.
5. Serial transfer of data
6. Low voltage rail
Using Table I the design of the SAR ADC and the project goals are set. The project meets many
of the requirements but due to some technical issues such constraints as keeping the DNL and the INL
within 1 LSB remain untested. An explanation of the issues is presented later in the paper.
Figure 4 shows the level 0 block diagram. It has 5 inputs and 1 output with 3 of the inputs
controllable externally (Chip Select, Serial Clock, and Analog Input). Table II explains what each of these
inputs do.
TABLE II
SAR ADC LEVEL ZERO BLOCK DIAGRAM TABLE
Name Description
DC power supplied from external source. (i.e. micro-controller
1.8V Power Supply
or battery)
Input coming from sensor in the analog domain with a 0V to
Analog Input
1V range.
Inputs
This control signal tells the ADC that it needs to operate and
Chip Select
use the SPI line.
External SPI clock taken from the controller to act as the base
Serial Clock
clock for the ADC
Outputs Serial Output Digital code sent out by the ADC representing a voltage value
to desired data storage location.
Functionality The ADC converts analog data into digital data that devices like micro-controllers can
understand and use. The ADC waits for the chip select to tell it when to gather and
report the data. It uses an external SPI clock to synch with other devices. This design
uses a low voltage rail of 1.8V given from the micro-controller to power the ADC.
Figure 5 shows the level 1 block diagram. It breaks down into 6 main blocks that deal with the
flow of the signal and resulting data. These blocks consist of the track and hold, the voltage to current
converter, the current to voltage comparison, the digital to analog converter (or DAC), the voltage
comparator, and the digital controls. Table III explains the purpose of each block shown in Figure 5.
TABLE III
SAR ADC LEVEL ONE BLOCK DIAGRAM TABLE
Name Description
Samples the analog input and holds that value for the
Track And Hold
comparator to look at until the full data processing completes
Voltage to Current Produces a current that is linearly proportional to the input
Converter voltage.
This component is a digital to analog converter. It takes data
DAC from the digital processing block and then outputs an analog
value for the comparator to compare to.
Compares the current to voltage comparison value to the
Components
Voltage Comparator analog input value coming from the current to voltage
comparison.
Processes data received form the comparator and the ADC
Digital Controls
Controls and then controls the SAR DAC
This block takes the current produced by the DAC and the
Current to Voltage voltage to current converter and compares them in a way that
Comparison pulls a voltage higher or lower based on which input has a
larger current
Flow based on [1], [5], [13]
Figure 6 shows the level 2 block diagram. This shows exactly how all of the circuits connect to
each other as seen in Appendix A Figure A1. The appendix figure shows the test layout for the circuit.
Some main points to note include the disappearance of the current to voltage comparison from the level
1 block diagram to the level 2 block diagram. This component actually lies within the DAC as a part of its
design. DC biasing also now appears in this diagram versus appearing in Figure 5 because it does not
have a direct effect on the data. Also the addition of the voltage buffers to the diagram help show the
type of track and hold that has been implemented. In reality the two voltage buffers are a part of the
track and hold system. Note that all blocks except the track and hold block receive the 1.8V rail; all
blocks receive ground. Table IV shows the breakdown of what each internal signal represents.
The design has 6 main analog circuits. These consists of the voltage buffer, the track and hold,
the voltage to current converter, the digital to analog converter (DAC), the comparator, and the biasing
circuit. How all of the components, including the digital block, connect together is seen in Appendix A,
Figure A1. This design follows basic ADC design ideas taken from Dr. Prodanov’s EE 409 course notes
[13] and from a Maxim Integrated web page on understanding SAR ADCs [1]. The software for designing
this project comes from the Cadence design suite using an 180nm IBM processes through Mosis [4].
The following subsections breakdown each of these components and show how and why each
design works. Larger images of all designs are seen in Appendix A. All sizing of transistors are collected
in tables and provided in Appendix B.
The design for the voltage buffer comes from a Texas Instruments [12] design for an op-amp
with a few changes. The op-amp uses a voltage follower mode of operation to create a voltage buffer.
Also in the Texas Instruments design they use a resistive and capacitive feedback but that proves
unnecessary as this design achieves good loop stability with only a capacitive feedback. The main
reason for choosing this design revolves around its relatively simple design and its ability to “pull” to
ground with a capacitive load. Figure 7 shows the voltage buffer design used for the ADC.
Input to the voltage buffer comes in on the gate of TP0. This is the positive input of the op-amp
while the negative input connects to the output of the op-amp thus placing the op-amp into a voltage
follower mode. TP2, TP0, TP1, TN0, and TN1 make up the differential input stage of the op-amp. TP4
and TN2 make up the second stage of the op-amp with TN22 acting as the capacitive feedback. Note
that when the drain, body, and source of a CMOS transistor are connected together it acts like a non-
linear capacitor with one terminal at the gate and the other at the tied drain and source nodes. This
setup tends to create more capacitance per area than a typical metal-to-metal capacitor but they have a
non-linear with the applied voltage. TN4 and TN3 provide the push-pull stage for the op-amp allowing it
to source and sink current without affecting the rest of the circuit. TP11 and TN23 interface the op-amp
to the DC biasing circuit. TP11, TP2, and TP4 make up the current mirrors used in the op-amp. Sizing of
transistors’ width over length values (or W/L ratio) began initially by following typical choices for ratios
for op-amps based on [2]. Once initial values were chosen, various transistors are adjusted to see how
they affected the op-amps specs and output. TN0 and TN1 have a direct impact on how closely the
buffer can reach ground. The relationship between TN0, TN1, and TN2 would affect various aspects of
loop stability such as ringing during the slew rate test. Increasing the W/L of TN3 and TN4 allows for
larger loads because it increases the rate that the push-pull stage could sink and source current.
Increasing current through the first stage by adjusting its W/L ratio with respect to TP11 causes it to
have a faster slew rate but also can cause more ringing. The design with respect to the W/L ratio comes
down to a balancing act that depends on both design and the technology used. If one uses the exact
same W/L ratios and circuit design but a different technology the result may turn out completely
different.
Due to the requirements of the design, it needs two voltage buffers that have different W/L
ratios. The two voltage buffers’ W/L ratios are collected in Appendix B Tables B1 and B2. Buffer 1’s
design reflects the need to buffer the output of the track and hold to the input of the voltage to current
converter. Buffer 2’s design reflects the need to buffer from the input to the chip to input to the track
TABLE V
SPECS FOR VOLTAGE BUFFER 1
Specification Data
Slew Rate 11.86 V/µs
Peaking Range 1MHz to 10Mhz
Open Loop Gain 13k V/V
-3dB Cutoff Frequency 15MHz
Table V shows the data collected from buffer 1. Note that these tests use a capacitive load of
461fF to compare its specifications to buffer 2 on equal terms. 461fF represents the measured
capacitance of the track and hold circuit (see Track and Hold section for more information). The test
results seen in Table V come from the tests seen in Figures 8 through 10.
Figure 8: Sinusoidal Input for Voltage Buffer 1 with 1Vpp, 0.5V DC Offset at 400kHz with 461fF Load
Figure 9: Slew Rate Test for Voltage Buffer 1 with a Square Wav Input of 0 to 1 V at 500kHz with 461fF
Load
Figure 9 shows the slew rate test for buffer 1. While relatively fast, the test does show some
ringing when using a square input. While not ideal, reducing this proves difficult. If the capacitive
feedback increases in capacitance the slew rate goes down drastically and causes a very apparent phase
shift when running the test in Figure 8. Once again, with some time optimizing this buffer to work more
effectively by reducing the ringing seen in Figure 9 should prove possible.
Figure 10 shows the AC magnitude response of voltage buffer 1. This graph gives the peaking
range, open loop gain, and the -3dB cutoff frequency. The peaking seen reflects what shows up in
Figure 9 in the form of ringing. This overshoot does present an apparent issue with the voltage buffer
but due to fact that the track and hold can only sample at 200k samples/second meaning the
frequencies seen by buffer 1 should not exceed the point where the peaking begins at 1MHz. The open
loop gain for the op-amp represents how effective the buffer is at achieving unity gain. The data comes
from equation 1 where V+ is the input voltage and V- is connected to the output. The larger the number
the more effective the buffer at achieving unity gain because this makes the denominator go closer and
closer to zero. In the case of buffer 1, it excels in this field with an open loop gain of 13kV/V.
Equation 1
The -3dB cutoff frequency in this case proves less important than where the peaking begins
because if operated beyond this point it would introduce far too large of an error for the ADC to work
properly. Still it provides a common spec used to gauge effectiveness of an op-amp.
Figure 11 shows the error that occurs when attached to the voltage to current converter. The
error refers to the buffer’s inability to “pull” all the way to ground. At its peak it has a deviation of
around 9mV, which is about 9.7mV (about 10 LSBs worth of error). In terms of ADCs this presents an
issue for the accuracy and the DNL and INL will reflect this. The reason for this revolves around the load,
as mentioned before. Due to the fact that the load is resistive this means current must always flow
through the sinking transistor due to the nature of the voltage to current converter. This means that a
voltage drop must always exist across the current sinking transistor and thus cannot pull all the way to
ground.
TABLE VI
SPECS FOR VOLTAGE BUFFER 1
Specification Data
Slew Rate 13 V/µs
Peaking Range 3MHz to 33Mhz
Open Loop Gain 2.4k V/V
-3dB Cutoff Frequency 35MHz
Figure 12: Sinusoidal Input for Voltage Buffer 2 with 1Vpp, 0.5V DC Offset at 400 kHz with 461 fF Load
Figure 12 shows the same test setup as seen in Figure 8 but with buffer 2. One can easily notice
the lack of brown representing the input voltage. This means that the buffer follows the input voltage
nearly perfectly. None of the distortion seen in Figure 8 presents itself in Figure 12.
Figure 13 shows the slew rate test for buffer 2. Once again it shows substantial improvement
over buffer 1. Not only does it have a faster slew rate as seen in Table VI but virtually no ringing exists in
comparison to buffer 1.
Figure 14 shows the magnitude response of buffer 2. The peaking is nearly half of the value
above a magnitude of 1V that it was for buffer 1. The peaking range does triple but so does the point
where the peaking range starts. Also the cutoff frequency of buffer 2 more than doubles that of buffer 1.
One aspect to note where buffer 2 performs worse than buffer 1 is the open loop gain. Buffer 2’s open
loop gain is nearly 11k (a drop of 81%) worse than buffer 1. While this value proves substantial the open
loop gain of buffer 2 still presents a large enough value that it does not introduce anywhere near a LSB
(about 0.98mV) of error thus rendering it unnecessary to increase.
The main conclusion to draw from this data comes from making sure that the design caters to
the load. Even though buffer 2 presents far better specs in nearly every aspect it would completely fail
when driving the same load that buffer 1 drives. Even with all the advantages that buffer 1 it still has its
own issues. It needs some more time put into its design but for the purpose of this project it suffices.
Transistor TN0 acts as a switch, only allowing current to flow when Set goes “high” charging up
TN3, which acts as a capacitor. TN1 grounds both ends of TN3 and thus discharging it when Reset goes
“high.” The size of both TN0 and TN1 should allow for enough current to flow that can charge and
discharge TN3. A decent sized W/L is important but it does not need to be overdone as it might cause
charge injection and pedestal error. The W/L ratio of TN3 derives from the sampling speed of the ADC. It
should be large enough that it doesn’t dissipate more than an LSB worth of voltage before the next
sample is taken. This is important because if it does dissipate more than an LSB this could cause DNL
and INL errors due to the voltage changing during the SAR algorithm.
Figure 16 shows the voltage dissipation of the track and hold after a reset and then set cycle.
While it looks like it takes a while to noticeably decline in voltage it doesn’t take long for it to drop a LSB
worth of voltage. With a sample speed of 200k samples/second the minimum time it must hold above a
drop of 1 LSB is 5µsec. With this in mind TN3 is adjusted until it can hold that minimum without creating
too large of a capacitive load for the voltage buffer. Table VII shows the results with the W/L ratio seen
in Appendix B Table B3.
TABLE VII
SPECS FOR TRACK AND HOLD
Specification Data
Time before the voltage drops 1 LSB 9.895µsec
With this timing spec, the track and hold has no problem keeping the voltage above an LSB in
the time frame. While this is nearly double the minimum it ensures that there will be far less than 1 LSB
of error introduced to the system.
The design utilizes a telescopic op-amp architecture [4] with its positive input connected to a 1V
bias, then negative input connected just above the resistor R0, and the output connected to the node
between TP0 and TP1. The current mirror in this design acts like a second stage for the telescopic op-
amp. Due to this combination acting like a two stage op-amp some capacitive feedback was needed to
increase its stability. This comes from TN6 which is setup as a capacitor.
The telescopic op-amp uses cascoded transistors TP10, TP11, TN4, and TN3. These allow for the
op-amp to increase its inherent gain. Large gain proves important to this design because the linearity of
the output depends on the gain of the telescopic op-amp. The gain of the op-amp directly corresponds
to the accuracy of the conversion in its lower range. The larger the gain the more accurate the
conversion is. TN4 and TN3 use a 1.3V bias and TP10 and TP11 use a 1V bias. Obtaining these values
comes from keeping it within the 1.8V range and adjusting both W/L and the bias until the maximum
amount of gain results. The positive input of the op-amp also connects to the 1V bias. Because of how
the op-amp works, it places 1V on the node between R0 and TP0. Thus a linear current is produced
proportional to input voltage due to the voltage drop across the resistor.
Figure 18 shows the relationship between current and voltage. Table VIII shows the slopes of
each line. While the slopes do depend on the time scale of the test it does give a general idea of how
accurate the conversion is where ideally the current slope would be 10mA/s. Note that this test uses an
ideal resistor model for R0.
TABLE VIII
SLOPES OF VOLTAGE AND CURRENT
Line Slope
Current 9.9283mA/s
Voltage 100V/s
Figure 19 shows the conversion happening at a faster speed. Some obvious distortion near the
bottom of the current’s wave form shows that the design has some areas for improvement. The main
area for improvement revolves around the telescopic op-amp. Possibly using an op-amp with larger gain
could create a faster and more accurate design.
When looking at Figure 20 all components to the left of the large “gap” make up the DAC with
the transistors that look like diff-pairs making up the switching circuits. The transistors below the
switching circuits make up the transistor ladder that produces the binary weighted currents. The reason
for the switching comes from the need to have all of the currents constantly on for the ladder to work
correctly. Thus any currents not being used by the DAC get redirected to a “dump” line connected to
supply that does not affect the output of the DAC.
When designing the ladder, one of the most important factors to its accuracy is the W/L ratio
used as the unit value. This design has a higher accuracy when lowering the W/L ratio by creating very
long transistors in comparison to their width. This accuracy issues is noted in [6] and [7]. Though after a
certain point of increasing the length of the transistor the increase in accuracy to the size of the
transistor diminishes and so increasing the length only helps so much. Also making the transistors larger
can help with process variation errors.
All of the transistors to the right of the “gap” make up a current mirror designed to reduce the
load on the DAC based on Dr. Podanov’s current mirror design [14]. Due to the stacking of the transistor
ladder and the low voltage range very little head room remains for a traditional current mirror. Dr.
Prodanov’s current mirror design solves this problem. Without this design for the current mirror the
current values that the DAC produces become extremely inaccurate.
Another process that occurs at this time is the current comparison. This comparison is done on
the furthest right transistors (TP19 and TN46) seen in Figure 20. When more current is injected by the
Figure 21 shows a test run of the DAC switching process where the first value seen is the MSB
and the last is the LSB with resets in between each value. Table IX shows all of the measured values from
Figure 21. Something to note at this time is that when doing this test initially a large amount of variation
was seen when each current value was held. After a substantial amount of time spent trying to resolve
the problem I determined that the issue came from the software and not the design. It is extremely
important that the simulation is “told” to use a restrictive algorithm rather than a liberal one. When
using a liberal algorithm the program has trouble finding the exact current that the DAC produces and
thus creates variation.
Table IX compares the measured current to the ideal current values and the corresponding
voltages that each current represents. The first value in the table represents the MSB and the last value
represents the LSB.
10
Current (uA)
1 Measured Values
1 2 3 4 5 6 7 8 9 10
Ideal Values
0.1
0.01
Bit
Figure 22: Logarithmic Comparison between Ideal DAC Current Values to Measured Current Values
Figure 22 compares the ideal and measured currents showing some of the error near the
bottom of the DAC Values. Note that because this graph uses a logarithmic scale it does not show the
severity of the error at each bit but rather how closely the trend follows an ideal set of values.
0
1 2 3 4 5 6 7 8 9 10
-2
-4
-6
Bit
Figure 23 gives a better representation of the error associated with each bit than Figure 22
gives. It shows the difference between the ideal values and the values measured in the simulation in
terms of the number of ideal LSBs worth of difference that the DAC creates. Overall the data tends to sit
just under the ideal values; a trend that gets represented in the overall error of the DAC seen in Table X.
The DAC has some large non-linearity associated with the spread of the error. This in turn would show
up as DNL and INL errors associated with the ADC. The main problem with this is that because the MSB
value sits so much larger than the total sum of all the other bits that large code jumps would show up
anytime the MSB gets switched and thus causing DNL error.
TABLE X
DAC TOTAL CURRENT COMPARISONS
Measured Current Ideal Current Error (Number of Ideal LSBs)
39.526186µA 39.96094µA -11.1295
Table X shows the total error accumulated over the DAC. While the difference between the ideal
total and measured total comes out to just above 0.4µA this comes to a total of 11 LSBs worth of error.
While this seems large and in most cases such an error would prove unacceptable, for this design this is
fairly good. One has to take into account various factors such as the scale of currents used. The LSB has a
value of 48nA and ensuring accuracy on this level proves extremely difficult. One way to fix some of this
error is to increase the current being supplied to the DAC and thus increasing the scale but one should
use caution when doing this because it could cause the ADC to consume a substantial amount of
current. That brings us to one of the main issues with this design. This design always consumes the max
amount of current associated with the DAC where other designs such as switched capacitor only uses
only uses enough current to charge the capacitor currently in use. One method that could fix the error
associated with this design could come in the form of a digital correction method. It would require some
alteration to the design but overall alter very little to the functionality of the DAC.
Figure 24 shows the design for the dynamic comparator. This design works by creating a
difference in current created by the diff-pair (TP5 and TP7) injected into the node between TN2 and
TN12 and the node between TN3 and TN13. These four transistors make up a latching circuit and
depending on which branch has more current determines whether the comparator latches “high” or
“low”. The reset works by merging the two nodes where the latching occurs thus removing the latched
value. TP8, TN14, TP9, and TN15 make up two inverters. These act as digital buffers for the comparator.
These buffers preserve the current differences in the comparator so that the output load doesn’t affect
the results by consuming current from one side. TP9 and TN15 specifically act as a dummy load to
create a balance to the design. Most of these transistors use smaller W/L ratios because they interface
with digital circuits and thus don’t require as much current. Transistors such as TN9 should be large
enough to quickly reset the nodes by merging their currents. This design comes from both [8] and some
ideas presented by Dr. Prodanov.
Figure 25 shows the comparator working in the same way it would work in the design.
One signal is a constant voltage at about 1.14V while the other value comes from the DAC. One
of the major advantages of this design is that it is a rail-to-rail design meaning that it can
compare values that have a 0V to 1.8V range. Note that when the comparator outputs about
1.6V the comparator is in a reset cycle. This floating point is inherent to the design and its “high”
value is partly due to the inverter stage.
TABLE XI
COMPARATOR SLEW RATE
Test Results
Slew Rate (200fF load) 100V/µs
Table XI shows the slew rate for the comparator under a 200fF load. 200fF actually may
be much larger than a typical load that this comparator would see because it interfaces with the
digital controls so it would actually prove much faster than that.
Note that this test just controls the injected current into the latching mechanism and
because of using ideal current sources it performs slightly differently than how it does in the full
design. The benefit of doing the test this way is that it isolates the latching circuit so that the
properties of the latch can be better understood. An example of a waveform produced from
this test is seen in Figure 27.
Note that the output of the circuit takes some time to pull low when 130nA is injected into the latch.
Also note that this result does not look much like the full circuit results seen in Figure 25. This once again
comes from the fact that this uses just the latching circuit and works much better as a whole circuit. By
operating this test at several currents Table XII was produced.
TABLE XII
COMPARATOR SENSITIVTY
Current Injected Settling Time
150nA < 1µs
140nA 5µs
130nA 10µs
120nA Tests Fails
As seen in Table XII the comparator works well as long as the difference remains above 150nA.
Even when the two inputs have nearly the same voltage on them the difference in current produced
between them is well above this value. Note that at 120nA the test fails. This is due to the ideal current
sources allowing large voltages to form in the circuit. The test failing has more to do with the setup
rather than the circuit itself.
All of the furthest left outputs make up the current biases of 1µA, 10µA, and 20µA (From left to
right). All of the outputs furthest to the right make up the voltage biases of 1V, 1.3V, and 1.14V. At the
center of theses outputs resides the self-biasing circuit. When creating the current and voltage biases a
method of using multiple mirrors adding currents together allows for the creation of far more accurate
current and voltage values. Accuracy for the voltages improves by including a diode connected
transistor and adjusting its W/L ratio in tandem with adjusting the current mirrors to create accurate
bias values.
An important factor to take into account when designing DC biasing curcuits is its temerature
dependency. If the circuit cannot maintain relatively constant biases over a large temperature range
then the accuracy of the ADC will depend far to much on the temperature that it operates at. Figure 29
shows some temperature tests done on this design.
This DC biasing design is a fairly simple way of creating biases thus it does not focus much on
correction for temperature variation. Note that the use of an NPN diode connected transistor has a
larger range of variation than a PNP diode connected. This flaw remains to show some possible design
changes that could result in smaller variation in values over temperature. Overall the variation in the
biases falls outside of what one would consider acceptable ranges of error. In the case of the voltage to
current converter huge amounts of error would accumulate due to the sensitivity of the circuit if the
chip operates anywhere near the extremes of these temperature variations. Table XIII shows the ranges
and the percent change from the desired value that those ranges are associated with.
TABLE XIII
COMPARATOR SENSITIVTY
Bias Current or Voltage Range (-20°C to 70°C) Percent Change from Desired
1µA 915.0984nA to 728.1199nA -8.49% to -27.188%
10µA 10.71914uA to 8.71914uA 7.1914% to -12.808%
20µA 22.95161uA to 18.7743uA 14.758% to -6.1285%
1V 976.3143mV to 1.027227V -2.369% to 2.723%
1.3V 1.246393V to 1.349055V -4.124% to 3.773%
1.14V 1.113078V to 1.180465V -2.362% to 3.55%
There are some possible areas where this design could see improvement but to see a large
improvement one should use some more complicated designs than this.
Other issues that arose during this testing phase include interfacing the voltage to current
converter to the DAC without causing it to load the DAC, some stability issues with the voltage buffers
due to using a different load capacitor than the actual design would see, and adjusting the reference
voltage of the comparator based on a 0.5V input until it switched at the right time. Results from one of
the final tests are seen in Figure 31.
Figure 31 shows one of the final tests performed on the analog components. The test shows
that with a voltage of 0.5V on the input and when the DAC outputs its MSB that the comparator
correctly switches “high.” Once the DAC drops past outputting just the MSB then every proceeding
check gives a “low” output from the comparator, as would be expected in this test.
Note that the reason the test has a slow “Clock Speed” mainly has to do with how the test has to
be setup. I chose this timing because it was easy to check. When testing without the digital controls
every single line controlled by the digital block must be manually controlled as a pulse function in the
simulation. Thus all of the timing must be done manually to ensure the test acts as it would with the
digital block attached. Of course the test does not use the SAR algorithm and rather just turns on each
current value individually.
The test performed uses a set of test bench code (seen in Appendix C) that responds to the
digital controls and gives it feedback similar to how the analog components would give it feedback
based on the input voltage. The timing diagram shows that the SAR algorithm correctly responds to the
input from the comparator and turns on all the signals at the correct time. Table XIV shows what each
signal in Figure 33 represents. Note that both Figure 33 and Table XIV have both test bench and ADC
control signals.
TABLE XIV
COMPARATOR SENSITIVTY
Signal Description
NSARBits[9:0] This 10 bit bus controls whether or not the current in each DAC bit goes to
the current dump line. Always the inverse of SARBits.
SARBits[9:0] This 10 bit bus controls whether or not the current in each DAC bit goes to
the output line.
THset This signal controls the set in the track and hold.
THrst This signal controls the reset in the track and hold.
CompRst This signal controls the reset for the comparator.
Sout This signal outputs the serial data.
CLK This signal is the test bench clock.
CompLatch This signal creates the random comparator outputs.
i[31:0] This is the internal count for the test bench code.
CS This is the Chip select signal controlled by the test bench code.
SCLK This is the clock input to the ADC.
Comp This is the comparator input signal to the ADC (includes resets).
CompReg This latches the comparator output to avoid resets.
Count[3:0] Internal Bit count for the SAR Algorithm.
clk Internal Clock passes from SCLK.
lastClk Gives another edge at the end of the algorithm to ensure SPI functionality.
After the synthesis process comes the place and route process using Encounter to turn the gates
into a silicon layout (part of the Cadence design suite). This process uses premade silicon layouts for the
gates and flip-flops to produce a compact design. By setting some parameters associated with the size of
the design, power delivery layout, and clock timing the place and route produces an analog design for
the digital code. For the most part this process involves just letting the computer do its own thing much
like what happened during the synthesis stage. The results of this process can be seen in Figure 35.
Conclusion
As both a learning experience and an overall project I consider this effort a success.
Unfortunately my project did not reach full functionality but that does not mean that beneficial results
were not obtained. While several steps still remain including performing a test with both the digital and
analog components together most of the designs are proven to work to a reasonable level with some
minor design flaws. The next steps in this project would consist of finishing the full-system testing and
completing the layout for all of the analog components. Subsequently Mosis could take the designs and
manufacture a test chip that could be run through some DNL and INL testing to see how well this design
could work as an ADC.
Through the process of this project I acquired a substantial amount of knowledge about
transistor level design, especially its limitations and capabilities. I successfully produced components
that in the end could meet all of the specification I gave save maybe some of the DNL and INL
specifications with most of the error coming in on the low end associated with the voltage buffer. While
the design does need a lot of work, overall the system performs function as intended.
endmodule
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 10:24:40 04/18/2014
// Design Name: Main
// Module Name: E:/Xilinx Verilog Files/ADC_SAR_BLOCK/ADC_Testbench.v
// Project Name: ADC_SAR_BLOCK
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: Main
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
// Inputs
reg CS;
reg SCLK;
reg Comp;
// Outputs
wire [9:0] NSARBits;
wire [9:0] SARBits;
wire THset;
wire THrst;
wire CompRst;
wire Sout;