The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 5:27am
Pages: 1
Send Topic Print
Virtuoso Spectrum Warnings for ADC (ENOB, SINAD); gives NaN for spectrum toolbox (Read 71 times)
UAWA
New Member
*
Offline



Posts: 4

Virtuoso Spectrum Warnings for ADC (ENOB, SINAD); gives NaN for spectrum toolbox
Apr 06th, 2021, 5:16pm
 
Hello Community,

I have a built a SAR ADC and was using the Spectrum Tool to calculate the simulation Parameters of FFT (ENOB, SINAD, SNR etc).

Using coherent sampling with Fin= (M/N * Fs), where M being prime number (and I was told its signal bins in the spectrum). N being the number of samples (I use 512). My Fsampling is 100 MHz.

When I use a smaller value of M=11 or 13, it gives me the expected results I need, but as soon as I move to higher values of M (which should be able to go upto half the sample count value "N"), it gives me Nan (meaning not a number and the following set of 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* 466/512 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.

Ive gone throw the ViVa manuals and looked elsewhere what could be the reason, has anyone faced such a situation or can assist in aiding with a solution to these warnings.

Back to top
 

Capture_015.JPG
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Virtuoso Spectrum Warnings for ADC (ENOB, SINAD); gives NaN for spectrum toolbox
Reply #1 - Apr 7th, 2021, 3:56pm
 
Because Cadence implements Fourier analysis as a post-processing step, Spectre is not aware at the time of the simulation that you will be performing Fourier analysis, so I does not know to place time points at the Fourier sample points.  Thus, Spectre is placing the time points where ever is convenient, meaning that the Fourier analysis has to interpolate to get the points it needs. Interpolation adds a lot of error (kind of like a noise floor in the spectrum), and these warnings apparently are trying to alert you to the fact that you can expect degraded results because the waveform is being interpolated.

You can resolve this by forcing the simulator to place time points at the Fourier analysis point.  You can do so either by adding a Verilog-A module that uses a timer function to force the simulator to place time points at the Fourier sample points.  Or you can use the transient analysis strobing options to to the same.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
UAWA
New Member
*
Offline



Posts: 4

Re: Virtuoso Spectrum Warnings for ADC (ENOB, SINAD); gives NaN for spectrum toolbox
Reply #2 - Apr 7th, 2021, 8:57pm
 
Yes thanks I realized with some digging that I will have to resort to strobing. Thankyou Ken for the reply, it was a pleasure and honor to have received a reply from the awesome Ken Kundret  ;D
Back to top
 
 
View Profile   IP Logged
UAWA
New Member
*
Offline



Posts: 4

Re: Virtuoso Spectrum Warnings for ADC (ENOB, SINAD); gives NaN for spectrum toolbox
Reply #3 - Apr 13th, 2021, 12:49am
 
Dear Ken, so in the strobe menu, I am strobing every 10ns (1/(Fsample)). Is this a recommended practice to strobe at sampling period or like Tsample/10? Keeping the aforementioned values (M=211, N=512 with Fin= 41.21 MHz). I tried the method and it still gives me NaN, with my output more looking how a strobed output should look like. I dont fill in skipstart or skipstop.
Back to top
« Last Edit: Apr 13th, 2021, 11:33am by UAWA »  

strobemenu.JPG
View Profile   IP Logged
UAWA
New Member
*
Offline



Posts: 4

Re: Virtuoso Spectrum Warnings for ADC (ENOB, SINAD); gives NaN for spectrum toolbox
Reply #4 - Apr 13th, 2021, 12:56am
 
Adding my output and spectrum settings (before strobing it was less pointy). My ADC samples in 2ns and then does a ADC evaluation for the next 8ns (for which the sample clock is low), thus 100 Mhz of Fsample. I notice that strobing has overridden the clock altogether. The CIW also mentions the same interpolation warnings 512/512 points.
Back to top
 

Output.JPG
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Virtuoso Spectrum Warnings for ADC (ENOB, SINAD); gives NaN for spectrum toolbox
Reply #5 - Apr 13th, 2021, 5:58pm
 
Strobing does two things. It forces a time point at each strobe point and it suppresses the output of anything but the strobe points.  It is a powerful concept that can be extremely useful in certain circumstances.  If you strobe at the clock frequency, the clocks will seem to become constant because you are only sampling them once per period.  Also clocked sine waves seem to become purely sinusoidal.  In effect, any harmonic of the sample rate disappears from the displayed signal.

For accurate Fourier analysis, you need to place a strobe point under every Fourier analysis sample point.  There is no need to place strobe points between the sample points. You would specify strobe period to get the strobe rate you want, and you would set skip start or strobe delay to adjust the phase of the strobing. This allows you to sample the circuit at just the right time (generally you want to sample at the end of the settling time for a clocked output).

You need the fundamental frequency of the signal being analyzed to be an exact multiple of the sample rate, and the multiple should equal the number of samples being used by the Fourier analysis.  So for example, if your sample period is 10ns and your Fourier analysis is using 512 points, then the fundamental frequency should be 195,312.50 Hz.  You should not use any windowing (which is equivalent to rectangular windowing).

In my experience people think the more points they use in the Fourier analysis, the more accurate the results. This is false if there is no significant aliasing, which there generally is not if the signal is sinusoidal or a sinusoid clocked at the Fourier analysis sample rate.  Instead the use of a large number of points in the FFT just serves to make the simulation expensive.  Similarly, it is not necessary to analyze multiple periods. Again, that just wastes simulation time.

However, allowing the signal to settle to eliminate initial transients is important.  You should wait 10-20 time constants at least before starting the Fourier analysis depending on the desired accuracy.  Thus, in general, you always want the Fourier analysis interval as late in the simulation interval as possible.

It is difficult to get all this right.  One thing that you should do as a sanity check to find obvious problems is the also look at the computed spectrum of the input signal.  If you are seeing any significant harmonic content, then something is not right.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.