The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Using a SKILL function in a MonteExpr in OCEAN?
https://designers-guide.org/forum/YaBB.pl?num=1163238526

Message started by JosephRyan on Nov 11th, 2006, 1:48am

Title: Using a SKILL function in a MonteExpr in OCEAN?
Post by JosephRyan on Nov 11th, 2006, 1:48am

Is it possible to use a SKILL function as the scalar expression of monteExpr() instead of a calculator function?  I'd like to use a custom function to will implement a binary search (to calculate the body-offset voltage of a Sense Amp), but using anything except a calculator function gives me errors!  I need to use a custom function since I'll need to run several simulations per monte-carlo change (that is, for every time the monte-carlo simulation changes the Vts of the transistors, it will need to run about 6-8 transient simulations).    As an example, take the following simplified code:


Code:
procedure( cboffset()
   i = 2
   i
)

monteCarlo( ?numIters 2 ?analysisVariation 'mismatch ?sweptParam "None" ?sweptParamVals "25" ?saveData t )
monteExpr( "boffset" "cboffset()")
monteRun()
monteResults()


The cboffset function just returns 2 every time in this example, but would eventually implement a binary search.  However, this example will cause errors since the monteExpr will not evaluate.  Can anyone help?

Title: Re: Using a SKILL function in a MonteExpr in OCEAN
Post by Andrew Beckett on Dec 12th, 2006, 2:55pm

Do you have sourcelink access? I wrote a solution on this - solution number 11007118 covers using custom SKILL functions in monteExpr and gives two different ways of solving this.

Regards,

Andrew.

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