Spectre Sample and Hold analysis

advertisement
Cadence Spectre Tutorial - Mixed Signal VLSI
Laxmeesha S,
M. Shojaei Baghini
Department of Electrical Engineering
Indian Institute of Technology, Bombay
January 11, 2017
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 1 / 24
January 11, 2017
1 / 24
Simulator settings
Simulator Accuracy Parameters
Accuracy of simulation depends on 1 :
Accuracy of models.
Error injected by simulator algorithm.
Tolerance Parameters :
reltol
: relative convergence tolerance.
vabstol
: absolute tolerance - voltage.
iabstol
: absolute tolerance - current.
errpreset :
Liberal, moderate or conservative.
Integration Method parameters :
trap, gear2, euler etc.
Default method: Trap (Causes underdamping in transient).
1
Ken Kundert et al. ”Achieving Accurate Results with a Circuit Simulator”, Cadence Design Systems.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 2 / 24
January 11, 2017
2 / 24
Simulator settings
Simulator Accuracy Settings
Parameter
Default value
Suggested value
−3
1e −5
vabstol
1e −6
1e −8
iabstol
1e −12
1e −14
Integration Method
Trap
Gear2only
reltol
1e
errpreset
tolerance
Method
liberal
10xreltol
Trap
moderate
1xreltol
Gear 2
conservative
0.1xreltol
Gear 2Only
Set maxtimestep to 10n.
More details on accuracy setting and convergence issues can be found in Ken
Kundert’s (Cadence Design Systems) paper in the following link:
http://kenkundert.com/docs/eda+t93-paper.pdf.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 3 / 24
January 11, 2017
3 / 24
FFT
Obtaining FFT of a transient signal
Say we need 2048 point FFT.
Sine source with frequency 29×1M/2048 Hz (for coherent sampling).
Run transient analysis to get 2048 samples at 1MHz rate (2.048ms excluding
initial settling time).
Exactly 29 cycles in the output.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 4 / 24
January 11, 2017
4 / 24
FFT
Obtaining FFT of a transient signal
From the waveform viewer → Tools → Calculator.
From Function Panel click on dft.
Fill in the dft table as shown below and click OK and click on the icon
highlighted in red.
Double click on X axis or Y axis to change attributes of the plot.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 5 / 24
January 11, 2017
5 / 24
FFT
FFT Plot for coherent sampling.
Observe the noise floor is at -285dB (Noise floor due to the simulator).
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 6 / 24
January 11, 2017
6 / 24
FFT
Coherent vs Non-Coherent Sampling.
Inputs are 29×1M/2048 and 29.01×1M/2048.
One has 29 cycles
other has 29.01
cycles.
End point not same
as start point for
latter one.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 7 / 24
January 11, 2017
7 / 24
FFT
Coherent vs Non-Coherent Sampling.
Observe rise in noise floor due to spectral leakage. (-285dB to -90dB)
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 8 / 24
January 11, 2017
8 / 24
FFT
Non-Coherent Sampling with Hamming window
FFT with Rectangular and Hamming window .
Noise floor reduces in Hamming (from -90dB to -106dB).
Signal now distributed in 3 bins.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 9 / 24
January 11, 2017
9 / 24
FFT
Noise floor vs FFT points
Ideal sampling circuit with fs =
1MHz.
Two circuits with input freq
29×1M/2048 (For 2K point FFT)
and 59×1M/4096 (For 4K point
FFT).
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 10 / 24
January 11, 2017
10 / 24
FFT
Noise floor vs FFT points
Increase in the number of points in FFT reduces the noise floor.
With increase in FFT bins the power spreads out, reducing noise floor.
In this course, for uniformity we will use 2048 point FFT.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 11 / 24
January 11, 2017
11 / 24
THD
THD Calculation from FFT
Ex: Ideal sampler circuit with a resistor across sampling capacitor.
Input frequency: 29×1M/2048, fs = 1MHz.
Section of FFT plot.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 12 / 24
January 11, 2017
12 / 24
THD
THD Calculation from FFT
From waveform viewer → Tools → Calculator.
Pick ”thd” from functions and enter details as shown below and click OK.
Click on the icon highlighted in red to obtain THD in %.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 13 / 24
January 11, 2017
13 / 24
PSS
PSS Analysis
Periodic Steady State Analysis
Computes steady state response of switching circuit.
Needed to run PAC, Pnoise.
Input is disabled. Only clock applied.
Parameters
Beat frequency: Usually the clock frequency. In case of multiple clocks,
choose GCD of all clocks (Can be auto calculated).
Number of harmonics: Based on maximum frequency that will be used in
subsequent PAC analysis. More the number of harmonics, PSS obtains
more time points.
tstab : Stability parameter.
maxacfrequency: Accuracy parameter which overrides maximum
frequency that can be analysed during PAC (default: 4×Harmonics.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 14 / 24
January 11, 2017
14 / 24
PSS
PSS Analysis
PSS does two iterations (Shooting Newton Method).
1st iteration, it runs a transient analysis to converge at a initial value.
In the next iteration (Shooting interval) it runs the PSS over 1/(Beat
frequency) and computes steady state solution based on number of
harmonics.
If the circuit has any initial transients, it can be delayed by ”tstab”
amount of time.
Transient
PSS
1
Beat frequency
Solutions saved with time resolution
based on maxacfrequency
t=0
t=tstab
Laxmeesha S, M. Shojaei Baghini
time
Cadence Spectre Tutorial - Mixed Signal VLSI 15 / 24
January 11, 2017
15 / 24
PSS
PSS Analysis
For the same ideal sampler circuit with fs = 1MHZ and input disabled.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 16 / 24
January 11, 2017
16 / 24
PSS
PAC Analysis
Periodic AC Analysis
Linearise circuit around time varying operating point.
Can analyse transfer functions that does frequency translation.
Given a band of input signal, how does this band get translated to
the output.
Parameters
Input frequency range start-stop frequency.
Maximum sideband (K): Band to be analyzed at the output (-K to 0 to
K)
Set PAC magnitude to 1 in the source.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 17 / 24
January 11, 2017
17 / 24
PSS
PAC Analysis
For the same ideal sampler circuit with fs = 1MHZ and input disabled.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 18 / 24
January 11, 2017
18 / 24
PSS
PAC Analysis
Try giving band of input frequency more than fs /2.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 19 / 24
January 11, 2017
19 / 24
PSS
PNoise Analysis
Periodic Noise analysis
Parameters
Output frequency range of noise
Maximum sideband: Determines how many sidebands alias back into the
band. More the number of sidebands, more accurate is the noise
calculation (However longer simulation time).
Output node.
Input source for input referring noise.
More details on Pnoise can be found in the following document by Ken
Kundert http://www.designers-guide.org/analysis/sc-filters.pdf.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 20 / 24
January 11, 2017
20 / 24
PSS
PNoise Analysis
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 21 / 24
January 11, 2017
21 / 24
PSS
PNoise Analysis
Once simulation completes, in ADE click Results → Direct Plot → Main
Form.
Click on pnoise and click plot to get PSD plot.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 22 / 24
January 11, 2017
22 / 24
PSS
PNoise Analysis
To obtain the output and input referred noise rms voltage, in ADE click on
Results → Print → Noise Summary.
In the noise summary window, clik on integrated noise and input the
bandwidth.
In the noise summary we have 62.39µV
q rms noise as against theoretical value
of 64.34µV rms noise obtained from kT
C .
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 23 / 24
January 11, 2017
23 / 24
PSS
Additional Reads
K.Ken ”Simulating Switched-Capacitor Filters with SpectreRF”
http://www.designers-guide.org/analysis/sc-filters.pdf
K.Ken ”Achieving Accurate Results with a Circuit Simulator”
http://kenkundert.com/docs/eda+t93-paper.pdf
Cadence Waveform Calculator User Guide.
Laxmeesha S, M. Shojaei Baghini
Cadence Spectre Tutorial - Mixed Signal VLSI 24 / 24
January 11, 2017
24 / 24
Download