nesting iPar?

Discussion in 'Cadence' started by Sam, Apr 18, 2005.

  1. Sam

    Sam Guest

    Hi all,

    I am trying to determine why I am having problems netlisting using
    Spectre when iPar is involved in a nested function.

    For instance nrs=int(iPar("foo")) does not resovle and so shows up as
    nrs=int(iPar("foo")) in the netlist and thus creates an error:
    Function 'iPar' is undefined or is used recursively. when the
    simulation is started.

    Are there any hints for resolving this issue? Anything I should ensure
    is set? For instance the netlisting mode is set for analog.

    Unfortunately CDSDOC is of little help with regard to this issue :( or
    I am not looking in the right place.

    Regards,
    sam
     
    Sam, Apr 18, 2005
    #1
  2. Sam

    BigDog Guest

    Make sure you have the "parseAsCEL/parseAsNumber" set properly in the
    CDF at each level the parameter is being passed. iPar/pPar are CEL
    expressions.

    -Brad
     
    BigDog, Apr 18, 2005
    #2
  3. BTW: int is an undocumented internal cadence function. Use fix instead
     
    Guenther Sohler, Apr 19, 2005
    #3
  4. Sam

    Sam Guest

    Thanks Guenther,

    The int function is used in the spectre Netlisting, so I believe it is
    ok. It is documented under the Spectre Circuit Simulator Reference
    section in the CDSDOC.

    sam
     
    Sam, Apr 19, 2005
    #4
  5. Sam

    Sam Guest

    Hi Brad,

    THANKS,

    That was it! I set parseAsNumber to yes and it worked, parseAsCEL was
    already set to yes. I was confused because other parameters with
    iPar()s evaluated fine despite parseAsNumber being set to NO. Seems
    that if iPar() was nested, as another example 1/iPar("foo"), it did not
    evaluate unless parseAsNumber was set to yes. Kind of odd. Any ideas
    why this is?

    FYI, the iPar()s that evaluated with parseAsNumber set to now are
    simple expressions like: iPar("foo1") * iPar("foo2")

    Regards,

    Sam
     
    Sam, Apr 19, 2005
    #5
  6. Hi Sam,

    I think the problem is that if you don't have parseAsNumber set to yes - using
    the result of this expression in another expression will cause trouble -
    because it doesn't see it as being a number.

    Regards,

    Andrew.
     
    Andrew Beckett, Apr 19, 2005
    #6
  7. Yes - it's important not to confuse AEL (or CEL) expressions with SKILL.
    These are the "Analog Expression Language" functions - like iPar() etc, and
    are often available natively in the simulator too - like int(), and not SKILL
    expressions.

    Regards,

    Andrew.
     
    Andrew Beckett, Apr 19, 2005
    #7
  8. Sam

    Sam Guest

    Andrew,

    There is scarce descriptions of the available function in spectre,
    although the majority of the functions are recognizable, it would be
    great if there was a place to confirm them.

    For instance, I am assuming that fmod() is the same as the mod() in
    skill. Am I correct?

    Best Regards,
    Sam
     
    Sam, Apr 20, 2005
    #8
  9. spectre -h expressions

    is a good place to look. I think this is probably in the spectre documentation
    too - since that documentation is built from the "spectre -h" output.

    man fmod

    will tell you what fmod does. mod() in SKILL is an integer function, whereas
    fmod works with floats.

    Andrew.
     
    Andrew Beckett, Apr 21, 2005
    #9
  10. Sam

    Sam Guest

    Thanks so much Andrew for the fmod help.

    Sam
     
    Sam, Apr 21, 2005
    #10
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.