• 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. How to identify on which procedure call a warning message...

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 15053
  • 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 identify on which procedure call a warning message have been generated?

marcelpreda
marcelpreda over 4 years ago

Hi there,

In some skill code to process simulation results I get few warnings like below.

WARNING (OCN-6038): Results variables are not available for /path/to/.../dir. Use results() for a list of available results.

Because there are many lines of code (written by multiple users)  I couldn't identify what line generates it.

Did some search/grep for selectResult() and pv(... ?result ...) calls but none of them is using "variables" results.

Any idea about how to identify the procedure(stacktrace) that generates the message? 

Any other skill/ocean procedures that may directly access "variables" result?

The only idea that I have now is to do some debug printing in various places in the code.

Thank you,

Marcel

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Hi Marcel,

    Warnings are notoriously tricky to track down (I've expended a lot of time doing this). There was some discussion about this a few years ago, but there's still no reliable way of doing it (as part of that discussion, we added muffleWarnings to suppress warnings, but not anything to break on them or give full information about where they came from).

    I suspect this might be due to using VAR() in your measurements?

    Anyway, might be worth contacting customer support on this - it's always helpful to have a real customer asking for this, and then we can file an enhancement for better tracing of warnings based on that (ask the AE to contact me, or put me on copy when you file it - I think you probably have my email address).

    Regards,

    Andrew.

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

    Hi Andrew,

    Thanks a lot for fast reply.

    I was able to spot the line that was generate the problem :)

    It was getData(varName ?result 'variables).

    In case someone will have a similar problem, I'll share here what I did.

    One of my colleague suggested to look on the documentation of breakpt() procedure.

    Then using breakpt() and doing some pv() calls, I was figured out that the respective warning message was printed by a printf()  call, first I was looking for warn() calls.

    Next step was to call in my code breakpt( printf ) just after  the last meaningful printf() message which was visible in the log before having those warning messages.

    Then I run my big script and the breakpt() was setting the skill debugger break point exactly where I need.

    Then I just have to call stacktrace, and I got the info that I needed, see below.

    <<< Break >>> on calling printf with args ("%s" "WARNING (OCN-6038): Results variables are not available for /path/.../to/results . Use results() for a list of available results.\n")
    Entering new debug toplevel due to breakpoint:
    stacktrace
    <<< Stack Trace >>>
    breakHandler(nil)
    (... in _artEmsIssueOCNMsg ...)
    (... in _dalSelectResultsImpl (_dalFAM) ...)
    (... in _dalSelectResult ...)
    (... in getCurrentResult ...)
    (... in _dalGetResultImpl (_dalFAM) ...)
    (... in getResult ...)
    (... in _dalGetDataImpl (_dalSRR t) ...)
    (... in getData ...)
    getData("m_pmos" ?result variables)
    (varWaveform = getData(varName ?result 'variables))

    ...

    I think that the documentation of breakpt() could be improved, I was not able to figure out how to write a condition for break point.

    It should explain how we can access the arguments that were pass to the procedure that we want to trace.

    If I would have access to the arguments I would call breakpt() at the begining and I would just search for "OCN-6038" in the arguments.

    Best Regards,

    Marcel

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

    Marcel,

    The main issue here is that you cannot set entry or exit breakpoints on either primitive (lambda) or read-protected functions (i.e. Cadence defined functions). For primitives it's because these are implemented in C and you can't see the arguments; similarly for read-protected functions, this would start to reveal information about what's inside, which would rather defeat the point of them being read-only. So for Cadence supplied functions you can only define conditional breakpoints for call/return, which means

    I was about to write some details on how you can use the entry tag to put a breakpoint conditionally on the arguments of your own functions, but the documentation does actually explain that - so I think your issue with the documentation is mainly that it doesn't work on built-in functions...

    For example:

    procedure(myFunc(a b c)
      println(list(a b c))
    )
    breakpt(myFunc (entry a==2))


    myFunc(3 4 5)
    (3 4 5)
    nil


    myFunc(2 3 4)
    <<< Break >>> on entering myFunc
    Entering new debug toplevel due to breakpoint:

    Andrew

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

    Hi Andrew,

    Thank you for the details, it makes sense.

    I have other question: how can I get a list of the variables used in the simulation?

    Reason:

    In my script I suppose to know in advance the variables used on the respective simulation.

    But if one name is wrong (variable does not exist) I get a crash of the script, see below. 

    SIMULATOR()
    "spectre"
    VAR("vgs")
    2.0
    VAR("vgs_x")
    *Error* asiGetDesignVarList: no applicable method for the class - list()

    Documentation said that it should return nil, but instead the script stops with that error message.

    Some details:

    - virtuoso version is 6.1.7 

    - there is no ADE session, the simulation was running from an ocean script. I'm providing this detail because looks like asiGetDesignVarList() is looking for some sim session. 

    Best Regards,

    Marcel

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

    Marcel,

    Which specific IC6.1.7 subversion are you using? I don't see this from my quick attempts - VAR("unknownVar") returns nil for me.

    Are you trying to find the variables prior to simulation or after simulation? If before, you should just be able to call desVar() with no arguments. If after simulation, you should be able to do:

    outputs(?result 'variables ?map nil)

    Andrew.

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

    Hi Andrew,

    "sub-version  IC6.1.7-64b.500.23 "

    I'm trying to read after simulation, results are 10+ days old.

    outputs(?result 'variables ?map nil) did the job.

    Thank you,

    Marcel

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

    Hi Marcel,

    Odd - that was the version I used, and it still worked for me when I just did:

    simulator('spectre)
    openResults("/path/to/results")
    VAR("nonExistent")

    Anyway, you have a way forward...

    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