• 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. Evaluate Expression that depends on another expression after...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 15996
  • 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

Evaluate Expression that depends on another expression after ADE XL Run

VMac
VMac over 6 years ago

Hello,

Relevant Link: Plot expression after ADE-XL run

Version: IC6.1.6-64b.500.6

In the given link Andrew Beckett shows how to plot output expressions from an ADE run. However, how does this work in the case of an expression that depends on another expression?

Say, for instance, I want gm/Id and I already have the expressions for gm and Id but if I use tables to store the expression, then when eval() evaluates gm/Id it won't find either since the expressions for gm and Id were stored in a table whose name is neither gm nor Id.

In addition, in Processing raw Spectre Monte Carlo data ?, Andrew Beckett calls a function ocnxlOpenResults(), where is this function? My version doesn't seem to have it. I ask because I'm trying to get rdb->outputs() to give me something other than nil. It gave me the outputs before, but for some reason I can't seem to get it to give me the outputs again. Any help in these two matters would be greatly appreciated.

  • Cancel
  • VMac
    VMac over 6 years ago

    To answer my own question about "what if an expression depends on another expression?", I found that using regex to substitute out the variables in the expressions for the variables used in the script was my best option for what I know about the software. Here is a section of the code I used for anyone wondering.

                evalTable = makeTable( "evalTable" nil )
                foreach( out outputList
                    sprintf( expression "%L" outTable[out]->expression )
                    foreach( eval evalTable
                        rexCompile( sprintf( nil "[^:]%s" eval ) )
                        if( rexExecute( expression ) then
                            rexCompile( sprintf( nil "%s" eval ) )
                            expression = rexReplace( expression sprintf( nil "evalTable[\"%s\"]" eval ) 0 )
                        )
                    )
                    evalTable[out] = evalstring( expression )
                )

    Note that this code assumes that expressions that depend on previous expressions are listed LATER in the outputList list variable. I still don't know if there is a better way to do this or if cadence has some built in behavior that can be leveraged to avoid this issue, but this is what I found to work.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to VMac

    BTW, ocnxlOpenResults() was added in IC6.1.6.500.10 (ISR10).

    Regards,

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • VMac
    VMac over 6 years ago in reply to Andrew Beckett

    That makes sense. Explains why I couldn't use it. Thanks, 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