To implement SAR ADC mixed signal circuit, let's use a microarchitecture of SAR ADC function divided in analog and digital blocks.
To simplify the design process, it is advisable to migrate as many functions of SAR ADC as possible into the digital block. This is because the digital block can be implemented using synchronous logic, making it possible to synthesize using the digital block RTL source code. On the other hand, analog design is inherently complex and should be kept to a minimum in any mixed signal design.
For this example, I have chosen a 3-bit ADC SAR switched capacitor architecture:
In this architecture we really need only capacitors ( and their three position switches ), one comparator and one two position switch to be implemented in the analog block so all other functions could be implemented in the digital block.
§ Piloting all five analog switches could be done from the digital block as well
Here is an example of a possible microarchitecture split between analog and digital block to implement a 3-bit ADC SAR switched capacitor architecture in our example:
Under assumption that Vref = 1V, here is an explanation what is our ADC supposed to do:
§ translate Vin voltage ranges to their 3-bit equivalents:
Interface description:
· Top level signals:
o clk
§ digital block main ( and only ) clock
o reset
§ digital block power-on reset ( active low )
o adc_conversion_en
§ when adc_conversion_en is 1 => ADC function enabled
o Vin
§ analog signal sampled in ADC
· Analog-Digital interface
o adc_compout
§ analog block output of the comparator
o sw0_closed
§ digital output that determines if analog block switch Sw0 is connecting minus input of comparator to GND ( sw0_closed = 1 ) or not ( sw0_closed = 0)
o sw<x>_vin, sw<x>_vref , sw<x>_gnd
§ <x> is representing 1, 2, 3 or 4.
§ Each signal described as sw<x>* represents a control signal for piloting a three position analog switch: Sw4, Sw3, Sw2 or Sw1 connecting a respective capacitor to either Vin or Vref or GND.
· E.g. possible values of analog switch Sw4 in one clock cycle:
As a proof of concept here is an example RTL code of the digital block, and for its quick verification ( sorry the verification is not self-checking) a crude Verilog analog block model and a top module where analog and digital block are connected.
To simplify the proof of the concept the assumption is made that analog switches and an analog comparator can finish a job in one digital clock cycle. If this is not true with a real life analog design, we would need a relatively simple change of state-machine timing of changing states to adjust for specified delays in the analog block.
Functional verification is done using Vref = 1V, and I used around 26 different Vi samples, keeping one sample for a period of two ADC cycles.
Here are 26 different Vi samples used and for each sample there is a 3-bit expected ADC result:
Here are some snapshots of waveforms od ADC data and it's ready signal as a function of Vin:
Finally here is a Verilog code of the digital design and it's simple verification infrastructure:
© 2011-2023 ASIC Stoic. All rights reserved


