How to select and plot individual results of parametric simu

S

spectrallypure

Guest
Hi all!.

I believe this has been somewhat (attempted to be) addressed in the
past (see e.g.
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/f858d0b06efeba80/1d3bedcf15f2babb?lnk=gst&q=parametric+plot+skill#1d3bedcf15f2babb),
but after reading the documentation and searching through the forum I
haven't been able to figure out the Skill /Ocean code needed to 'grab'
and plot individual results from a parametric analysis.

Please consider the following sample code:

; =====================================
; Sample_simulation_individual_steps.il
; =====================================
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design( "/home/cdsmgr/cds/tesis/Sim/GIAPRI/spectre/schematic/netlist/
netlist")
resultsDir( "/home/cdsmgr/cds/tesis/Sim/GIAPRI/spectre/schematic" )
modelFile( '("/programs/cadence/DESIGN_KITS/ams_v3.70/spectre/c35/
mcparams.scs" "")
'("/programs/cadence/DESIGN_KITS/ams_v3.70/spectre/c35/cmos53.scs"
"cmostm") )

analysis( 'dc ?param "IAPR_cero" ?start "0" ?stop "1" )
load("Cargar_Variables_Diseno_Tesis.il")
desVar( "IINTs_menos1" 0.5 )
desVar( "IAPR_cero" 0.5 )
temp( 27 )

save( 'i "/DUT/IAPRI_uno" "/DUT/IAPRI_cero" )

paramAnalysis( "IINTs_menos1" ?values '(0.01 0.5 0.99 ) ?sweepType
'paramset )
paramRun()

;Selection of an individual (first) step of the parametric set
selectResult( 'dc car(sweepValues()) )

; Signal IAPRI_cero
pIAPRI_cero = (IDC("/DUT/IAPRI_cero") / (IDC("/DUT/IAPRI_cero") +
IDC("/DUT/IAPRI_uno")))
plot( pIAPRI_cero ?expr '( "pIAPRI_cero" ) )
addSubwindowTitle( "IAPRI_cero" )

; Signal IAPRI_uno
pIAPRI_uno = (IDC("/DUT/IAPRI_uno") / (IDC("/DUT/IAPRI_cero") + IDC("/
DUT/IAPRI_uno")))
plot( pIAPRI_uno ?expr '( "pIAPRI_uno" ) )
addSubwindowTitle( "IAPRI_uno" )

;end.

Without the "selectResult" line, it runs fine but plots the entire
curve families for both generated signals. When I add the
"selectResult" line, which I took from CH7 in the Ocean Ref. manual -
under the description for this command (BTW: the line there seems to
be mistyped, as it reads "selectResult(( 'tran car( sweepValues() )" -
parentheses mismatch), not only don't I get the desired result but it
also throws me the following error (I guess it's sweepValues
complaining):

\o You must do openResults() and selectResults() before using
\o this command. Make sure your openResults() and
\o selectResults() commands worked. Use ocnHelp('openResults)
\o and ocnHelp('selectResults) for more information.

I have tried including lines like "selectResult('dc)" or using the
openResults command before the aforementioned line, but with no luck.

I would be really grateful if someone could please give me a hint on
how to figure this out. Thanks in advance for any help/ideas/
comments! :)

Regards,

Jorge Luis.
 
Oh, I forgot to add that the above code is just an example: in reality
I plan (need) to grab all and each the individual results of the
parametric run and process (plot) them individually. I was thinking of
doing this resorting somehow to the sweepValues() command together
with either nth() or some list manipulation commands (car, cdr, etc),
in order to parse all the sweep step values.

Well, thanks for any ideas!
 
On Jan 20, 9:49 pm, spectrallypure <jorgela...@gmail.com> wrote:
Oh, I forgot to add that the above code is just an example: in reality
I plan (need) to grab all and each the individual results of the
parametric run and process (plot) them individually. I was thinking of
doing this resorting somehow to the sweepValues() command together
with either nth() or some list manipulation commands (car, cdr, etc),
in order to parse all the sweep step values.

Well, thanks for any ideas!
Have a look at the fam* SKILL commands. They are nice helpers to pick
particular waveforms from families of waveforms.
--
Svenn
 
Still any luck trying to figure out this OCEAN problem... any help is
really welcome!!! :O

Regards,

Jorge Luis.
 
....Still no luck trying to figure out this problem using OCEAN... any
help is
really welcome!!! :O

Regards,

Jorge Luis.
 
On Jan 28, 1:25 am, spectrallypure <jorgela...@gmail.com> wrote:
...Still no luck trying to figure out this problem using OCEAN... any
help is
really welcome!!! :O

Regards,

Jorge Luis.
 
Still any luck trying to figure out this OCEAN problem... any help is
really welcome!!! :O
As Svenn mentionned, the fam* functions are here to help you access families of waveforms.

so you do

foreach( sweepVal famGetSweepValues( yourFam )
yourWave = famValue( yourFam sweepVal )
....
)

Isn't that what you're trying to do ?


Cheers,

Stéphane
 
Hi Stéphane!

Thanks a lot for your reply, I finally got it working! I decided to
totally forget about the previous approach and use the fam* functions
as pointed out. My (rather silly) problem was that I really didn't
know what objects I should treat as my families of waveforms. After
some guessing I came up with the following code (which I include for
the sake of completeness):

(...previous code as in first post, excluding only the
"selectResult( 'dc car(sweepValues()) )" line...)

my_fam1 = pIAPRI_cero
my_fam2 = pIAPRI_uno

newWindow()
foreach( sweepValue famGetSweepValues( my_fam1 )
my_wave1 = famValue( my_fam1 sweepValue )
my_wave2 = famValue( my_fam2 sweepValue )
plot( my_wave1 ?expr '( "pIAPRI_cero" ) )
plot( my_wave2 ?expr '( "pIAPRI_uno" ))

addSubwindowTitle( strcat( cadr(sweepNames( my_fam1 )) "="
sprintf(nil "%3.2f" sweepValue) ) )

if( sweepValue != nth( length(famGetSweepValues(my_fam1))-1
famGetSweepValues(my_fam1) ) then
addSubwindow()
)
)

This solves the problem of grabbing the individual waveforms. However,
I didn't realize until the very end that what I am using as titles,
i.e., the values returned by the "famGetSweepValues" function, are not
the actual values of the swept parameter, but merely indexes. In fact,
famGetSweepValues( my_fam1 ) returns the index list (1.0 2.0 3.0)
rather than the actual parameter values (0.01 0.5 0.99) which I need
for generating the individual plot titles. The same happens if I use
the "sweepValues" function instead.

...Do you happen know of any method for accessing the individual
values of the swept parameter in a parametric simulation?

Thanks again for the help!

Regards,

Jorge.
 
On Fri, 1 Feb 2008 08:33:48 -0800 (PST), spectrallypure
<jorgelagos@gmail.com> wrote:

Hi Stéphane!

Thanks a lot for your reply, I finally got it working! I decided to
totally forget about the previous approach and use the fam* functions
as pointed out. My (rather silly) problem was that I really didn't
know what objects I should treat as my families of waveforms. After
some guessing I came up with the following code (which I include for
the sake of completeness):

(...previous code as in first post, excluding only the
"selectResult( 'dc car(sweepValues()) )" line...)

my_fam1 = pIAPRI_cero
my_fam2 = pIAPRI_uno

newWindow()
foreach( sweepValue famGetSweepValues( my_fam1 )
my_wave1 = famValue( my_fam1 sweepValue )
my_wave2 = famValue( my_fam2 sweepValue )
plot( my_wave1 ?expr '( "pIAPRI_cero" ) )
plot( my_wave2 ?expr '( "pIAPRI_uno" ))

addSubwindowTitle( strcat( cadr(sweepNames( my_fam1 )) "="
sprintf(nil "%3.2f" sweepValue) ) )

if( sweepValue != nth( length(famGetSweepValues(my_fam1))-1
famGetSweepValues(my_fam1) ) then
addSubwindow()
)
)

This solves the problem of grabbing the individual waveforms. However,
I didn't realize until the very end that what I am using as titles,
i.e., the values returned by the "famGetSweepValues" function, are not
the actual values of the swept parameter, but merely indexes. In fact,
famGetSweepValues( my_fam1 ) returns the index list (1.0 2.0 3.0)
rather than the actual parameter values (0.01 0.5 0.99) which I need
for generating the individual plot titles. The same happens if I use
the "sweepValues" function instead.

...Do you happen know of any method for accessing the individual
values of the swept parameter in a parametric simulation?

Thanks again for the help!

Regards,

Jorge.
There's the sweepValues() function to go along with the sweepNames()
function. Did you try that?

Also, if you use the dr.* functions for a family, the x-axis values
are the values of the swept variable, and each y-axis value is a
waveform (or family) for that particular point in the sweep.

Regards,

Andrew.
 
This solves the problem of grabbing the individual waveforms. However,
I didn't realize until the very end that what I am using as titles,
i.e., the values returned by the "famGetSweepValues" function, are not
the actual values of the swept parameter, but merely indexes. In fact,
famGetSweepValues( my_fam1 ) returns the index list (1.0 2.0 3.0)
rather than the actual parameter values (0.01 0.5 0.99) which I need
for generating the individual plot titles. The same happens if I use
the "sweepValues" function instead.

...Do you happen know of any method for accessing the individual
values of the swept parameter in a parametric simulation?
That's strange because when I do it, I get the sweep values. I'm not very used to using these
functions, so I don't know where the difference may come from (simulator, type of sweep, version
(IC5141+MMSIM61 here), whatever...).

I know that doesn't help. Sorry.

Stéphane
 
S. Badel wrote, on 02/06/08 16:06:
This solves the problem of grabbing the individual waveforms. However,
I didn't realize until the very end that what I am using as titles,
i.e., the values returned by the "famGetSweepValues" function, are not
the actual values of the swept parameter, but merely indexes. In fact,
famGetSweepValues( my_fam1 ) returns the index list (1.0 2.0 3.0)
rather than the actual parameter values (0.01 0.5 0.99) which I need
for generating the individual plot titles. The same happens if I use
the "sweepValues" function instead.

...Do you happen know of any method for accessing the individual
values of the swept parameter in a parametric simulation?

That's strange because when I do it, I get the sweep values. I'm not
very used to using these functions, so I don't know where the difference
may come from (simulator, type of sweep, version (IC5141+MMSIM61 here),
whatever...).

I know that doesn't help. Sorry.

Stéphane
That's what I would have thought too.

If you do monte-carlo and possibly corner runs you probably just get
an index - it will hide the fact that the corner corresponds to a
set of parameter values.

Although it's late in the day, and my memory is fading a little, so I
probably _should_ try it to check...

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top