Quantcast
Channel: Cadence Custom IC Skill Forum
Viewing all articles
Browse latest Browse all 5066

Own SKILL function available in calculator but "undefined" when called in ADE ?

$
0
0

Hello all,

I wrote two small functions in SKILL (see below) and added these to my .cdsinit. They work in the command line and in the calculator, but when they are called for the calculation of design variables, I get this error (even if I try to define them again in the lines above the line where they are called):

ERROR (SFE-1996): "input.scs" 11: Parameter `phi': Function `mlinc2phi' is undefined.

In the analysis I want to execute, a variable "vin" is swept and two other variables should be recalculated for every value of "vin". I thought this would be possible by:

A. In .cdsinit:

procedure( mlinc2phi( vin vinref)
if( vin>vinref
      then
            acos(vin)*(180/acos(-1))
      else
            acos(vin/vinref)*(180/acos(-1))
      )
) ; procedure

procedure( MySpecialFunctionCBPhi()
calSpecialFunctionInput( 'mlinc2phi nil )
)

calRegisterSpecialFunction(
list( "mlinc2phi" 'MySpecialFunctionCBPhi )
)

procedure( mlinc2vdc( vin vinref vdc_orig)
if( vin>vinref
      then
            vdc_orig
      else
            vdc_orig*vinref
      )
) ; procedure

procedure( MySpecialFunctionCBVdc()
calSpecialFunctionInput( 'mlinc2vdc nil )
)

calRegisterSpecialFunction(
list( "mlinc2vdc" 'MySpecialFunctionCBVdc )
)

B. And then input.scs:

simulator lang=spectre
global 0
parameters vdcorig=1 vinref=0.7 vin=0.65 rl=50 vgsmin=0.4 dt=0.35 mult=300 \
    fc=1.5e+10 vgsmax=1.2 phi=mlinc2phi(vin,vinref) \
    vdc=mlinc2vdc(vin,vinref,vdcorig)

I tried to do this in a .ocn-script as well, but without success.

Even if the functions were found, would the values of the variables phi and vdc be recalculated for every sweep value of "vin" ?

Thank you,

Greetings,

Joris


Viewing all articles
Browse latest Browse all 5066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>