The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> How to perform Nested Sweep
https://designers-guide.org/forum/YaBB.pl?num=1182928519

Message started by kiran123 on Jun 27th, 2007, 12:15am

Title: How to perform Nested Sweep
Post by kiran123 on Jun 27th, 2007, 12:15am

Hi Experts,

       How to declare  nested sweep statement in spectre , like suppose i wanted to see graph between V1 Vs V2 Vs V3 simultenously in the same plot
In SPICE it is like

    .DC V1  1 5 0.1   V2  1 5 0.1  V3  1 5 0.1

similarly is there any way to do this in spectre ?

Thanks & Regards
Kiran

Title: Re: How to perform Nested Sweep
Post by aamar on Jun 29th, 2007, 8:38am

Hallo,

Do you have the Analog design environment?

you should set a single sweep, and use the other two sources (i.e. V2 and V3 as parameters) and then define parameteric sweeps.

for different variants of plots you can use the function "value" in the calculator.

but take care for the step you are using you will have to run the simulation 40x40 times which is a large number.

best regards,

aamar

Title: Re: How to perform Nested Sweep
Post by kiran123 on Jul 2nd, 2007, 11:25pm


aamar wrote on Jun 29th, 2007, 8:38am:
Hallo,

Do you have the Analog design environment?

you should set a single sweep, and use the other two sources (i.e. V2 and V3 as parameters) and then define parameteric sweeps.

for different variants of plots you can use the function "value" in the calculator.

but take care for the step you are using you will have to run the simulation 40x40 times which is a large number.

best regards,

aamar


 i don't have ADE  :(  that's why looking for deck statement

Regards
Kiran

Title: Re: How to perform Nested Sweep
Post by aamar on Jul 4th, 2007, 2:57am

Hallo Kiran,

Although  I am not expert in Spectre Syntax. I use the ADE always, and without reading the manual, I think you should have a look on it too. But my first impression that there is no such a syntax becuase if it is possible it should be possible through the ADE. That's why I tried such a case like the one you are asking about and printed the OCEAN script from the parameteric analysis tool and pasted it here, may be it can help.

====================================
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design(       "./spectre/schematic/netlist/netlist")
resultsDir( "./spectre/schematic" )
modelFile(
   '("./spectre/c35/mcparams.scs" "")
   '("./spectre/c35/cmos53.scs" "cmostm")
   '("./spectre/c35/res.scs" "restm")
   '("./spectre/c35/cap.scs" "captm")
   '("./spectre/c35/bip.scs" "biptm")
   '("./spectre/c35/ind.scs" "indtm")
)

analysis('dc ?param "vsweep"  ?start "0"  ?stop "3"  )
desVar(        "vsweep" 0      )
desVar(        "vgs_nmos_param" 0.6      )
desVar(        "vds_nmos_param" 0      )
desVar(        "l" 0.35u      )
save( 'i "/MN0/D" "/MN1/D" )
temp( 27 )
paramAnalysis("vgs_nmos_param" ?values '(0 0.75 1.5 2.25 3 )
 paramAnalysis("vds_nmos_param" ?values '(0 0.75 1.5 2.25 3 )
))
paramRun()
=================================

Best regards,

aamar

Title: Re: How to perform Nested Sweep
Post by Geoffrey_Coram on Jul 5th, 2007, 6:42am


kiran123 wrote on Jun 27th, 2007, 12:15am:
Hi Experts,

       How to declare  nested sweep statement in spectre , like suppose i wanted to see graph between V1 Vs V2 Vs V3 simultenously in the same plot
In SPICE it is like

    .DC V1  1 5 0.1   V2  1 5 0.1  V3  1 5 0.1

similarly is there any way to do this in spectre ?


You could probably do this with the alter command, at least in terms of getting the sims run; then it would depend on your waveform viewer how easy it is to view them simultaneously.  Also, it will be a nuisance to write all the alter commands to run the sweeps; you've got 51*51 sweeps there, don't you?  So I hope a cadence expert can help with the paramAnalysis statements.

Title: Re: How to perform Nested Sweep
Post by Andrew Beckett on Aug 27th, 2007, 2:24pm

I've got an example somewhere (not at work at the moment) - but the easiest thing is to read the help on the "sweep" analysis in spectre. See "spectre -h sweep". You'll do something of this form:


Code:
sweepv1 sweep param=v1 start=1 stop=5 step=1 {
 sweepv2 sweep param=v2 start=1 stop=5 step=1 {
   dc dc param=v3 start=1 stop=5 step=1
 }
}


(the above is just off the top of my head, so may contain mistakes).

Regards,

Andrew.


Title: Re: How to perform Nested Sweep
Post by John O Donovan on Aug 28th, 2007, 4:56am

Andrew,

It should probably be the following. The inner sweep in the first in the .DC, and it should be dev=v1 instead of param=v1

sweepv1 sweep dev=v3 param=dc start=1 stop=5 step=1 {
 sweepv2 sweep dev=v2 param=dc start=1 stop=5 step=1 {
   dc dc dev=v1 param=dc start=1 stop=5 step=1
 }
}


The param=dc is probably not necessary since the default sweep parameter for a vsource is the dc parameter.

Regards,
 John

Title: Re: How to perform Nested Sweep
Post by Andrew Beckett on Sep 2nd, 2007, 1:00pm

John, I was actually assuming that v1, v2, v3 were global parameters, but if instead it was the dc parameter of a voltage source that was being varied, then you're quite correct, of course...

Andrew.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.