# How to simulate SNDR in cadence virtuoso

1. ## How to simulate SNDR in cadence virtuoso

Hi all,
I am working with cad ADE_L and trying to calculate the ENOB for a switched capacitor amplifier and thus need its SNDR, so I have to find the RMS value of noise.
This is the way I would proceed, but not sure it is correct:

run transient noise simulation
calculate DFT of the output
export to matlab result
subtract from the plot the spectrum components due to input signal and switching harmonics
with the new spectrum sum the square of all its components and divide by number of samples (now I have the rms of noise, right?)
now I can calculate the SNDR=20*log10(inputRMS/noiseRMS)

Can anyone confirm whether this is correct or not? And if not what is wrong?
Also is there a more straightforward to do it all in Cadence without passing through matlab?
Thanks very much for help •

2. ## Re: How to simulate SNDR in cadence virtuoso Originally Posted by usernamer and trying to calculate the ENOB for a switched capacitor amplifier
and thus need its SNDR
...........................................
Also is there a more straightforward to do it all in Cadence without passing through matlab?
What do you mean by "in Cadence" ?
Use correct terminology.

If you use Cadence ViVA, use spectrum(), spectrumMeas(), spetrumMeasurement() functions.

Calculates Signal-to-Noise-and-Distortion Ratio (SINAD), Spurious Free Dynamic Range
(SFDR), Effective Number of Bits (ENOB), and Signal-to-Noise Ratio (without distortion) by
using Fast Fourier Transform (FFT) of any given input signal.

The spectrum measure is used for characterizing A-to-D converters and is typically supported
for transient simulation data.
Launch Skill API Finder and search spectrum. •

3. ## Re: How to simulate SNDR in cadence virtuoso

I have found the spectrum under measurements menu in ADEL and it calculates my parameters, only problem is that since my circuit is a switched capacitor amplifier, in the output spectrum I have a "switched" sinusoid with many harmonics due to the switching activity that are accounted as noise power, while I would need to exclude them from the calculation to get the proper SNDR. How can I do it?

Or in alternative should I get a sample-and-held sinusoid as input such that in frequency it becomes a sinc function narrow enough?
If so how can I build a sample-and-held sinusoid input with the simulator? •

4. ## Re: How to simulate SNDR in cadence virtuoso Originally Posted by usernamer Such version does not exist for Cadence Virtuoso.
See http://www.designers-guide.org/Forum...m=1513431975#2 Originally Posted by usernamer while I would need to exclude them from the calculation to get the proper SNDR.
How can I do it?
Generally SNDR means Signal to Noise+Distortion Ratio.
If you require SNR(Signal to Noise Ration with excluding harmonic distortions), set t_measType as "snhr".

t_measType Result specifier.
Valid values: sinad, sfdr(db), enob, and snhr.
See "ocnHelp 'spectrum" in CIW. Originally Posted by usernamer Or in alternative should I get a sample-and-held sinusoid as input
such that in frequency it becomes a sinc function narrow enough?
I can not understand what you want to mean at all.

Outputs are sample-hold for Switched-Capacitor circuit natually. Originally Posted by usernamer If so how can I build a sample-and-held sinusoid input with the simulator?
Use ideal sample-hold circuit, although I can not understand what you want to mean at all. 5. ## Re: How to simulate SNDR in cadence virtuoso

Isn't it this the cadence virtuoso version? I am using spectrum from measurements menu right now but I think there must be something wrong about how I set the DFT:
What I have is the following output (red waveform) from a switched capacitor amplifier for an ADC so at each period of the waveform I am interested in only one time instant. The 100 MHz clock has an amplification phase and a reset phase (during which output is 0 V) and the idea is to sample the output before the end of amplification phase to send it to the next stage of the ADC.

So I am trying to sample once per clock period (which is twice the waveform frequency which is at 50 MHz) for 2^11=2048 samples.
The first sample is starting at 9 ns rather than 0 so to take samples during the amplification phase.

I get a negative SINAD even when trying with a noiseless transient simulation (noiseless to try understand what is wrong in my DFT), furthermore SNR=SINAD while I would expect huge SNR having no noise in the circuit.

I get the following warnings:
*WARNING* Sample point 1 is interpolated from raw data points.
*WARNING* Sample point 2 is interpolated from raw data points.
*WARNING* Sample point 3 is interpolated from raw data points.
*WARNING* ...
*WARNING* The raw data points are non-uniform.
*WARNING* From/To are not aligned with the raw data points.
*WARNING* 2034/2048 sample points are interpolated, which could cause numerical errors. To remove these errors, use uniform raw data points, and align the sample points with raw data points.
*WARNING* The function values at from and to are not equal.

How can I fix this? How can I use uniform raw data points as suggested?

Also what does it mean by "The function values at from and to are not equal"? Is it that the first and last sample are not equal? (Which I instead suppose they are since the waveform is periodic)

Thanks a lot for help I cannot get out of it --[[ ]]--