• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. drIsWaveform Function

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 14100
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

drIsWaveform Function

Driss
Driss over 10 years ago

Hello,

I am trying to find out if the evaluation of a expression is a waveform or a scalar type.

For example:

  myExpression = "dB20(VF(\"/sig_out\"))"

  eval = car(errsetstring(myExpression))

I would like to have a function that returns t or nil depending on whether eval is a waveform or a scalar. 

I read from the following post, that the drIsWaveform should do exactly what I want:

  www.designers-guide.org/.../YaBB.pl



However unlike in this post, the evaluation of my expression returns: srrWave: =XXX instead drwave=XXX

so that  drIsWavefirm(eval) returns the wrong value (nil in this case)

My question:

1) Why do I get a srrWaveform instead of a drWaveform?

2) What is the difference between both types?

3) is there any documentation related to the different data structures used in ADE? 

Many Thanks for your help.

Driss

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago
    Cedric, waveform objects simply changed between IC5141 and IC61X from drWave to srrWave. This is just an internal representation detail that there's no need to worry about. The same APIs work, including the one you mention- drIsWaveform. This only tells you if it is a simple waveform - you'd need to call famIsFamily to check if it is a family waveform. So maybe that is the reason why it is returning nil? Regards, Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Driss
    Driss over 10 years ago
    Dear Andrew,
    Thank you very much for the quick answer. Indeed the expression was "stored" in a waveform Family and using famIsFamily solved my problem.

    I still face now another issue with the evaluation of user expressions combinations.
    For example these 3 expressions are evaluable with the calculator:
    myExpr1 = "db20(VF(\ "sig_out\ "))"
    myExpr2 = "db20(VF(\ "sig_in\ "))"
    myExpr3 = "myExpr1 / myExpr2"

    Still opening the psf directory with openResults(psf_dir_path), neither evalstring() or errsetstring() function works in the third case.
    Is there a simple way to evaluate expression combination as the calculator does? Would you have any suggestion?
    Thanks again for your help.
    Best Regards
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ebecheto
    ebecheto over 10 years ago
    why do you put quote ?
    myExpr1 = db20(VF("sig_out"))
    myExpr2 = db20(VF("sig_in"))
    myExpr3 = myExpr1 / myExpr2

    should work
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Driss
    Driss over 10 years ago
    my purpose is to import some user defined expressions stored in a csv file and apply each of them to the current open simulation results.
    Reading the csv file I get all my expressions in a string format (this is why I have quotes)

    Errsetstring() has worked so far perfectly for the evaluation of expressions containing signal names, But the combination of expressions doesn´t work as I mentioned before.
    One approach I have in mind would be to import each of the expression in a container structure that holds name and string value of each expression
    Something like: ExprStruct( ("myExpr1" "db20(VF("sig_out"))" )
    ( "myExpr2" "db20(VF("sig_in"))" ) )
    ( "myExpr3" "myExpr1/myExpr2" ) )
    )

    One´s should then parse non-evaluable strings values into substrings and try to evaluate each of them....

    This seems however to be a bit heavy and tedious and I am wondering if there is a simpler way to do it as the calculator already manage to evaluate expression combinations.
    Maybe by invoking the calculator through skill code?
    Thanks again for sharing your experience.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    You'll need to ensure that the SKILL variables myExpr1 and myExpr2 get set so that the resulting expression gets evaluated properly. You could do that with the set() function - so something like set(concat(exprName) car(errsetstring(expression))) . This will create global variables called myExpr1, myExpr2 etc - you might then want to construct a let() with all the variables you are creating and then evaluate them all within that let so that they all get created as local - but I'll leave that as an exercise for you...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information