• 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. make ade use the spectre data directory when plotting s...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 125
  • Views 3682
  • 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

make ade use the spectre data directory when plotting signals

sergeiGorbikov
sergeiGorbikov over 4 years ago

existing behavior: after a simulation has finished, when plotting a signal (see the pic. below) ade uses its own, higher level data directory (hereinafter ADE_DD, e.g. …/maestro/results/maestro/Interactive.581/psf/tran/psf) for evaluation of assembler outputs.

pic: plot a signal with a mouse


desired behavior: after a simulation has finished, when plotting a signal ade uses the spectre data directory (hereinafter SPECTRE_DD, e.g. …/maestro/results/maestro/Interactive.581/1/tran/psf) for evaluation of assembler outputs.

question: How to turn existing behavior into desired one?

motivation: some of my maestro outputs depend on files located in SPECTRE_DD. ade produces an error when I plot the outputs because it uses ADE_DD while the outputs refer to files located in SPECTRE_DDs using relative paths.

other:

1) when spectre is called, it creates a SPECTRE_DD where simulation data is stored. An ADE_DD links to multiple SPECTRE_DDs.

2) there is a workaround to amend manually the field ‘In Context Results DB’ in calculator, enter a desired output name and evaluate it. This way it works as expected, but it is not as convenient as it would be if using the plot menu item.

related pages:

1) https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000005cdJYEAY&pageName=ArticleContent

2) https://community.cadence.com/cadence_technology_forums/f/custom-ic-design/48149/order-of-output-evaluation-in-maestro-results-pane

keywords: in-context results directory, context

I use virtuoso IC6.1.8-64b.500.16

sincerely, sergei

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    In general you should not have to mess around like this. What normally happens is that after each simulation point is completed, ADE will evaluate any expression with the results from that specific spectre run, and if the results are scalar then the value is returned to ADE and stored in a database. If the result was a waveform, then it is not stored.

    Later, if you wish to plot the waveform expressions, it does indeed use the root of the overall results sets so that that waveform is plotted with the context of which parameter values are in effect - so which corner or sweep values are relevant to that point (which is missing if you looked at just the point data).

    You didn't explain what the actual problem is - you said "some of my maestro outputs depend on files located in SPECTRE_DD. ade produces an error when I plot the outputs because it uses ADE_DD while the outputs refer to files located in SPECTRE_DDs using relative paths". I'm not sure what is failing, or why, but I think you're trying to subvert the way it works (for good reasons) without giving any details of the actual problem - it's better to understand the actual problem first and maybe that will give you a clear path to resolution.

    So, please give the output expression that is failing, and what the error is.

    Andrew.

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

    OUTPUTS AND THE ERROR LOG


    In the chain of outputs executed I had the two outputs:

    ‘
    return_true’ function returns ‘true’ always


    as a side note, the file ‘data.csv’ is used by a third-party software for further processing thereafter.


    The simulation has finished. I right click on one of the signals > plot > the first error appearing in the ciw log is:

    *Error* ("error" 0 t nil ("*Error* error: basic_string::_S_construct null not valid" nil))







    ERROR (ADE-1057): Could not evaluate expression

    Name:'save_restore_vs_in'

    Expression:'(return_true(psf_dir) && awvSaveToCSV(restore_vs_in strcat(psf_dir "/data.csv")))'

    because of the following error(s)

    ("error" 0 t nil ("*Error* error: basic_string::_S_construct null not valid" nil))

    Ensure that the definition of the expression is correct.


    FIX

    I replaced the built-in awvSaveToCSV with the custom awvSaveToCSV_family:

    procedure(

    awvSaveToCSV_family(wave path)

    if((famIsFamily(wave) == nil)

    then

    awvSaveToCSV(wave path)

    else

    famMap('awvSaveToCSV wave path)

    )

    )


    DISCUSSION

    with this fix the program works as I need. ‘Plot’ menu item plots waveforms without an error, ‘Plot across corners’ menu item plots a waveform family without an error as well. so I had a bug in one of my commands, the problem was not with ade. The reason why I thought that the problem was in an in-context results directory is because the error disappeared when I amended manually the context in calculator.


    in the original post there was a question how to turn existing behavior into desired behavior.


    When ade executes outputs during “the first run”, it uses a spectre data directory for each simulation (like …/Interactive.581/1/tran/psf ) (the data directory path is returned by openResults()). If there is a save command, the file will be saved to the spectre data directory. Importantly, during this “mode” outputs are treated as single waveforms (or single scalars).


    When ade executes outputs with a user right click, after all simulations have finished, it uses a different, top level data directory (like …/Interactive.581/psf/tran/psf). If there is a save command, the file will be saved to the ade, top level data directory. Importantly, during this “mode” outputs are treated as waveform families (or scalar families), not single waveforms.


    Post-simulation effectively ade produces exactly the same results as when it uses spectre data directory (for an individual simulation run), at least in my case. I checked this by manually tweaking in-context results DB in calculator and evaluating an output. The only differences, I noticed, are that 1) the skill working directory is different, 2) waveform and scalar families are created instead of single pieces of data when in the first mode. So, there is no motivation to turn existing behavior into desired one, because effectively the program operates as needed.


    Andrew, thank you very much. Your post was very insightful and helped to find a bug. I am sincerely grateful to you. I am satisfied with the way ade works with regards to this matter.

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

    In general, expressions/calculator functions should always make sure they can deal with both single waveform and family data, as then everything works properly - as you've found here. So I'm glad you've resolved it and are happy with the solution!

    One thing I should point out is that your expression for psf_dir really shouldn't need the dependency on the previous results; I think it will be OK with just using openResults() to retrieve the results directory. Similarly, the save_restore_in doesn't' need the return_true(psf_dir) because you're already referring to psf_dir in the expression and so that would define the dependency anyway. This is just to clean up your expressions and make them a bit more readable.

    Regards,

    Andrew

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

    And just for reference, here is the corresponding article from the Cadence Support website: https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V000007MkO7UAK 

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Frank Wiedmann
    Frank Wiedmann over 4 years ago in reply to Andrew Beckett

    And just for reference, here is the corresponding article from the Cadence Support website: https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V000007MkO7UAK 

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
No Data

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