The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Analog Verification >> Analog Performance Verification >> Accessing simulation parameter in OCEAN
https://designers-guide.org/forum/YaBB.pl?num=1571305103

Message started by Horror Vacui on Oct 17th, 2019, 2:38am

Title: Accessing simulation parameter in OCEAN
Post by Horror Vacui on Oct 17th, 2019, 2:38am

Hi Everyone,

The general question: Is there a way to access simulation parameters in an OCEAN script?

Current use case: I am running an AC analysis with design variable sweep at a fixed frequency. In the post processing I use the frequency value, what now I have write into the code. Magic number in the ocean code! :( It could lead to trouble if the frequency changes. The elegant solution would be to get the frequency used in the simulation automatically. Is something like that possible? What is the keyword I should look for in the documentation?

Title: Re: Accessing simulation parameter in OCEAN
Post by Andrew Beckett on Feb 22nd, 2020, 3:59am

Whilst you can retrieve useful information about the analysis using the resultParam function - for example:

resultParam("start" ?result 'ac)
resultParam("stop" ?result 'ac)

if you've swept a parameter (a design variable) and chosen a single fixed frequency for the analysis, that is not one of the outputs that is kept in the PSF database. The closest is the resultParam("analysis description" ?result 'ac) but that's a text string with the info embedded - it would be a bit messy to have to parse that to pull out the frequency.

A better approach is probably to do something like this:

singleFreq=1.23k
analysis('ac ?freq singleFreq ?param "temp" ?start "-40" ?stop "125")

Then you have your variable in the same OCEAN script that  you can use for results processing.

That said, I think it would be a reasonable enhancement that spectre also saves the single frequency in the results header so that this was accessible. I would suggest contacting support.cadence.com and asking for this enhancement.

Regards,

Andrew

Title: Re: Accessing simulation parameter in OCEAN
Post by RichieStine1 on Jul 27th, 2020, 10:33am

Hello...Is it possible to access the device parameter from the netlsit in OCEAN? I would like to plot some curves as a function of the current density. I can get the current easily, but I need a hard coded number in my ocean to normalize the current. This number will be out of date if the schematic changes. Therefore I would like to ask down the transistor width, number of fingers and multiplier values.

Title: Re: Accessing simulation parameter in OCEAN
Post by Andrew Beckett on Aug 1st, 2020, 3:25am

Assuming you've not turned off the saving of various info analyses (in ADE, under Outputs->Save All), you can retrieve:

pv("/I0/M5A" "w" ?result "instance")
2.54e-05
pv("/I0/M5A" "l" ?result "instance")
1.42e-06
pv("/I0/M5A" "m" ?result "instance")
1.0
pv("/I0/M5A" "weff" ?result "output")
2.539e-05
pv("/I0/M5A" "leff" ?result "output")
1.39e-06
pv("/I0/M5A" "meff" ?result "output")
17.0

Note that w, l and m from the "instance" database will retrieve the value specified on the instance, whereas the "output" database gives you the effective values. Since the weff and leff are after delta-w and delta-l adjustments, you might want to use the original values, but the meff is useful because that is the cumulative m-factor throughout the hierarchy (m is treated specially).

Note that it's possible the parameters may be different depending on the device model used. See (for example) "spectre -h bsim4" - the instance parameters are listed at the top, and later on there's normally an "Output Parameters" section.

Regards,

Andrew.

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