Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

measuring ENOB of a sigma delta ADC

Status
Not open for further replies.

Ayman Essam

Member level 2
Joined
Jun 16, 2015
Messages
43
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Activity points
295
hi
I would like to measure the ENOB of a sigma-delta ADC on Cadence Virtuoso.
what are the steps to be done ?
do i need MATLAB ?
 

I would like to measure the ENOB of a sigma-delta ADC on Cadence Virtuoso.
what are the steps to be done ?
do i need MATLAB ?
No, you don't need MATLAB at all.

Simply use Skill Language in Cadence dfII.

ENOB=(SQNR-1.76)/6.02

Excerption from My Skill Code
Code:
Tstep = 1/fs

Tstart = round(5*(1/fIF)/Tstep)*Tstep + Tstep/4
Tstop = Tstart + Nfft*Tstep
fprintf(stdout, "Tstart=%.2fmsec\n", Tstart/1m)
fprintf(stdout, "Tstop=%.2fmsec\n", Tstop/1m)

delta_f = 1/(Tstop-Tstart)

fprintf(stdout, "delta_f=%.2fkHz\n", delta_f/1k)

tone_bin = int( pv("top-level", "tone_bin", ?result strcat(boke, "designParamVals-info")) )

fin = pv( "top-level", "fin", ?result strcat(boke, "designParamVals-info") )

/*
tone_bin = int(fIF / delta_f)
if( mod(tone_bin, 2) == 0 then
   if( tone_bin >= 0 then ++tone_bin else --tone_bin )
)
fin = tone_bin * delta_f
*/

tone_bin0 = mod(tone_bin, Nfft)
if( tone_bin0 < 0 then tone_bin0 = -tone_bin0 )
if( tone_bin0 >= Nfft / 2 then tone_bin0 = Nfft - tone_bin0 )
fin0 = tone_bin0 * delta_f

fprintf(stdout, "f0=%.2fkHz, fIF=%.2fkHz, tone_bin=%d, fin=%.7fkHz, fin0=%.7fkHz\n",
	f0/1k, float(fIF)/1k, tone_bin, fin/1k, fin0/1k)

NBW = 1.5 * (fs/Nfft)
fprintf(stdout, "NBW=%.3fkHz\n", NBW/1k)

V = getData( strcat(aho_path, "V") )

time_vec = drGetWaveformXVec( V )
tstop = drGetElem( time_vec, drVectorLength(time_vec)-1 )
fprintf(stdout, "tstop=%gmsec\n", tstop/1m)

fprintf(stderr, "length(V)=%d\n", drVectorLength(time_vec))

Tstop = int( (tstop-Tstep/4)/Tstep ) * Tstep + Tstep/4
Tstart = Tstop - Nfft*Tstep
fprintf(stdout, "Tstart=%.2fmsec\n", Tstart/1m)
fprintf(stdout, "Tstop=%.2fmsec\n", Tstop/1m)

V  = 2 * dft0( V, Tstart, Tstop, Nfft, "Hanning" ) / VFS
;;; Factor "2" of head is for compensation of "Hanning" windowing.

V = 2 * V ; Single-Sided

x_vec = drGetWaveformXVec(V)
Npts_V = drVectorLength( x_vec )
fprintf(stderr, "length(spec0)=%d=2^%d\n", Npts_V, int(log(Npts_V)/log(2)))

Smoothed_V = circ_smooth( mag(V)**2, 16 )
;Smoothed_V = moving_average( mag(V)**2, 3 )

V->plotStyle = 'joined ; could be set to nil too

Raw_Spectrum = db20(V)
Smoothed_Spectrum = db10(Smoothed_V)
 

Attachments

  • 160703-184947.png
    160703-184947.png
    18.8 KB · Views: 79
Last edited:

No, you don't need MATLAB at all.

Simply use Skill Language in Cadence dfII.

ENOB=(SQNR-1.76)/6.02

Excerption from My Skill Code
Code:
Tstep = 1/fs

Tstart = round(5*(1/fIF)/Tstep)*Tstep + Tstep/4
Tstop = Tstart + Nfft*Tstep
fprintf(stdout, "Tstart=%.2fmsec\n", Tstart/1m)
fprintf(stdout, "Tstop=%.2fmsec\n", Tstop/1m)

delta_f = 1/(Tstop-Tstart)

fprintf(stdout, "delta_f=%.2fkHz\n", delta_f/1k)

tone_bin = int( pv("top-level", "tone_bin", ?result strcat(boke, "designParamVals-info")) )

fin = pv( "top-level", "fin", ?result strcat(boke, "designParamVals-info") )

/*
tone_bin = int(fIF / delta_f)
if( mod(tone_bin, 2) == 0 then
   if( tone_bin >= 0 then ++tone_bin else --tone_bin )
)
fin = tone_bin * delta_f
*/

tone_bin0 = mod(tone_bin, Nfft)
if( tone_bin0 < 0 then tone_bin0 = -tone_bin0 )
if( tone_bin0 >= Nfft / 2 then tone_bin0 = Nfft - tone_bin0 )
fin0 = tone_bin0 * delta_f

fprintf(stdout, "f0=%.2fkHz, fIF=%.2fkHz, tone_bin=%d, fin=%.7fkHz, fin0=%.7fkHz\n",
	f0/1k, float(fIF)/1k, tone_bin, fin/1k, fin0/1k)

NBW = 1.5 * (fs/Nfft)
fprintf(stdout, "NBW=%.3fkHz\n", NBW/1k)

V = getData( strcat(aho_path, "V") )

time_vec = drGetWaveformXVec( V )
tstop = drGetElem( time_vec, drVectorLength(time_vec)-1 )
fprintf(stdout, "tstop=%gmsec\n", tstop/1m)

fprintf(stderr, "length(V)=%d\n", drVectorLength(time_vec))

Tstop = int( (tstop-Tstep/4)/Tstep ) * Tstep + Tstep/4
Tstart = Tstop - Nfft*Tstep
fprintf(stdout, "Tstart=%.2fmsec\n", Tstart/1m)
fprintf(stdout, "Tstop=%.2fmsec\n", Tstop/1m)

V  = 2 * dft0( V, Tstart, Tstop, Nfft, "Hanning" ) / VFS
;;; Factor "2" of head is for compensation of "Hanning" windowing.

V = 2 * V ; Single-Sided

x_vec = drGetWaveformXVec(V)
Npts_V = drVectorLength( x_vec )
fprintf(stderr, "length(spec0)=%d=2^%d\n", Npts_V, int(log(Npts_V)/log(2)))

Smoothed_V = circ_smooth( mag(V)**2, 16 )
;Smoothed_V = moving_average( mag(V)**2, 3 )

V->plotStyle = 'joined ; could be set to nil too

Raw_Spectrum = db20(V)
Smoothed_Spectrum = db10(Smoothed_V)

ok thanks ... any good reference for Skill language on cadence ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top