Why does a procedure not get properly evaluated with monteca

S

Svenn Are Bjerkem

Guest
Hi,

trying to do some duty cycle monte carlo calculations using the monte*
functions.
With cross, and clip it is possible to set a tl, tm and th as three
separate monteExpr's and then calculate the dutyCycle in a fourth
monteExpr like this: monteExpr("dcd" "(tm-tl)/(th-tl)*100") and a
followint histogram("dcd_27") give me a nice histogram of my duty
cycle for one period that I cut out of the transient simulation
somewhere.

Then I try to be smart and define a procedure that calculates the duty
cycle for me. This is always failing due to evaluation error. Ocean is
not user friendly enough to tell me what it doesn't like with my
procedure, it just says "does not compute".

My procedure is like this:
(procedure (dutyCycle4)
dcd_dp_tl=cross(clip(VT("/c2c_rec_out_dp"),1.85n,4n),0.54,1,"either")
dcd_dp_tm=cross(clip(VT("/c2c_rec_out_dp"),1.85n,4n),0.54,2,"either")
dcd_dp_th=cross(clip(VT("/c2c_rec_out_dp"),1.85n,4n),0.54,3,"either")
(dcd_dp_tm-dcd_dp_tl)/(dcd_dp_th- dcd_dp_tl)*100
)

monteExpr("dcd_proc" "dutyCycle4()")

And it works very nice with single wave simulations: It returns a
number that correspond to the duty cycle. With monte carlo I get a
waveform of the duty cycles over the iterations. When I simulate with
ocean inside DFII then I just get an error message and no histogram.

What is wrong here?

--
Svenn
 
On Sep 11, 5:27 pm, Svenn Are Bjerkem <svenn.bjer...@googlemail.com>
wrote:

What is wrong here?
I'll just fill in for myself here as I also asked this question to
Cadence Support, and this is a known problem with monteExpr(). Andrew
Beckett (who else?) provided a description of the problem and a
solution. The problem can be solved by loading the home-made skill
functions as a part of a monteExpr() since the monteExpr's are
evaluate in a child process. The cadence functions are loaded, but
your homemade not.

If you need more help, ask Cadence Support about this, and they will
also add your service request to the bottom of the already growing
list of service requests on this problem. Maybe it gets fixed one day,
but then I guess that very many ocean-scripts will have to be modified
again :)

--
Svenn
 
On Thu, 13 Sep 2007 13:48:36 -0000, Svenn Are Bjerkem
<svenn.bjerkem@googlemail.com> wrote:

On Sep 11, 5:27 pm, Svenn Are Bjerkem <svenn.bjer...@googlemail.com
wrote:

What is wrong here?

I'll just fill in for myself here as I also asked this question to
Cadence Support, and this is a known problem with monteExpr(). Andrew
Beckett (who else?) provided a description of the problem and a
solution. The problem can be solved by loading the home-made skill
functions as a part of a monteExpr() since the monteExpr's are
evaluate in a child process. The cadence functions are loaded, but
your homemade not.

If you need more help, ask Cadence Support about this, and they will
also add your service request to the bottom of the already growing
list of service requests on this problem. Maybe it gets fixed one day,
but then I guess that very many ocean-scripts will have to be modified
again :)
Indeed. The other way of solving this (covered in the sourcelink solution I
wrote) is to create a wrapper around "artil" which loads your custom functions.

The PCR I filed on this was to ask for a ".artilrc" file so that custom
calculator functions could be loaded automatically at artil start time, and
hence be available in monte-carlo.

Regards,

Andrew.
--
Andrew Beckett
Senior Solution Architect
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top