• 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 Design
  3. How to evaluate the variable in a maestro measurement expression...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 15826
  • 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

How to evaluate the variable in a maestro measurement expression and not treat it as a literal string

Genas
Genas over 4 years ago

I am trying to measure some signals and it is constantly evaluating it as a string and not capturing it as a variable

Example:

This scenario works perfectly --> maeAddOutput(strcat("read" "avg") title ?outputType "point" ?expr "average(VT(\"/net_read\"))")

But I am trying to use a variable for the signal name, how can I achieve that.?

Example: name = “net_read”

maeAddOutput(strcat("read" "avg") title ?outputType "point" ?expr "average(VT(\"/name\"))")

 How can I tell it to replace name with the variable because it is currently processing name as an input  signal and not the content (net_read)

What is the correct syntax to insert variable in a maestro measurement expression

  • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear Genus,

    I believe I understand your question. You are unable to use a variable name as. a signal and have it be evaluated in an Assembler/Explorer expression.

    When I examined the expression, one item that came to mind immediately is that the syntax you appear to be using to access the signal name as a variable does not appear correct to me. The first argument of the VT() function is a string with the net name of interest. Hence it is not expecting a variable.

    What I do, which appears to work, is define a variable as a wave and then I am able to use that  variable in a more complex expression. For example, using your expressions:

    name = VT("/net_read") -- name is the variable and is defined as a wave by the VT() function.  

    then, in your expression:

    average(name)

    When you used the variable name in your expression, it is interpreted as a string. Did I understand your question correctly? I hope so...

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Genas
    Genas over 4 years ago in reply to ShawnLogan

    Hi Shawn,

    Thanks for the response, you got the question.

    When I used the variable name in your expression, it is interpreted as a string but I don't want this behavior, I want the content to be interpreted not the variable name.

    I modified it just as you recommended and it is still not evaluating the variable, rather I get this error "*Error* _averageMethod: can't handle _averageMethod(nil)".

    Maybe I missed this part "define a variable as a wave ".

    How can I define it as a wave?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Genas
    Genas over 4 years ago in reply to Genas

    Sorry for the confusion, I meant "When I used the variable name in my expression"

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    I assume (if I've understood you correctly) you want in your SKILL code to do this:

    maeAddOutput(strcat("read" "avg") title ?outputType "point" ?expr lsprintf("average(VT(\"/%s\"))" name))

    In other words, you'd have to use normal string manipulation functions to build the expression. BTW, lsprintf is essentially the same as doing sprintf(nil ...) 

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Genas
    Genas over 4 years ago in reply to Andrew Beckett

    Thank you very much, this is exactly what I was looking for.

    Hey Andrew, I think you should take over the cadence customer service because I contacted customer service and the rep told me this is not possible with skill that i have to use the signal name directly.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Genas

    To give my colleagues in customer support the benefit of the doubt, it may just have been that your question was not that clear. Given that Shawn also didn't get what you meant, and I had to guess, I suspect my colleagues also misinterpreted your question. Thanks for the feedback though (even though it's not really a scalable option!)

    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