• 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. Last Time Value of a Tran-Simulation as Final Value in integ...

Stats

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

Last Time Value of a Tran-Simulation as Final Value in integ-Function in VIVA-Calculator

iq79
iq79 over 3 years ago

Hi,

I integrating current graphs after a tran-simulation using 'integ' in VIVA calculator. The 'Initial value' is fixed for all corners and simulations. How can I make the 'Final value' equals the last time step of the simulation? I was hoping for something like '-1' or 'end' as default 'Final value', but I found nothing in the docs.

I'm trying to define a 'Design Variable', T2, and import it with 'VAR("T2")' : 

integ(i("/_vVDD!:p" ?result "tran") 2n VAR("T2") " " )

But I get

ERROR (VIVA-3002):expression evaluation failed: Expression evaluates to nil
ERROR (VIVA-3002):expression evaluation failed: integ(i("/_vVDD!:p" ?result "tran") 2n VAR("T2") " " )

I add this variable after the simulation is done. Could this be the problem?

Best regards,

Iqbal

  • Cancel
Parents
  • iq79
    iq79 over 3 years ago

    Hi,

    I think the answer to this post is what I'm looking for.

    Best,

    Iqbal

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to iq79

    Yes, using lastVal(VT("/someSig")) or lastVal(IT("/some/current")) would do this. It's unfortunate that the integ function supports one argument or three - you can't just give the start time and omit the end time.

    Another approach would be to use:

    integ(clip(i("/_vVDD!:p" ?result "tran") 2n nil))

    Clip allows nil to be specified as the end time.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 3 years ago in reply to Andrew Beckett

    Dear iq79,

    If I understand your question properly, another possible option, which I use frequently, is to define the end simulation time as a variable, for example "tstop". In your expression for the upper integration limit, use VAR("stop"). In the Transient simulation GUI, the simulation time entry is also VAR("stop").

    I just wanted to add a thought in addition to Andrew's good suggestions.

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • ShawnLogan
    ShawnLogan over 3 years ago in reply to Andrew Beckett

    Dear iq79,

    If I understand your question properly, another possible option, which I use frequently, is to define the end simulation time as a variable, for example "tstop". In your expression for the upper integration limit, use VAR("stop"). In the Transient simulation GUI, the simulation time entry is also VAR("stop").

    I just wanted to add a thought in addition to Andrew's good suggestions.

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • iq79
    iq79 over 3 years ago in reply to ShawnLogan

    Hi Shawn,

    Andrew's solution works like a charm. I even re-wrote a few other things using 'clip'... if I only knew much earlier Slight smile

    You got my question right. I tried your method at first, as I wrote in my first post, but it didn't work and I know now why...The signal was simply not saved, despite save-all. Spectre warns, that there are too many signals to save and this could increase the stimulation time.. but the good guy doesn't mention, that he would discard some signals and not save them.. Ok but this is off-topic. When it happens again, I'll post a new question regarding this behavior.

    Best,

    Iqbal

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 3 years ago in reply to iq79

    Dear iq79,

    iq79 said:
    Andrew's solution works like a charm. I

    Great! That is all that matters!

    iq79 said:
    You got my question right. I tried your method at first, as I wrote in my first post,

    I did read your comment about using the design variable T2, and I just wanted to add my experience with the methodology and the fact that it does provide the expected functionality. As a side note, I often set the "stop time" variable to a computed value dependent on a corner sweep variable. For example, if I am sweeping the frequency of an input source in a set of simulations, I define the 'stop time" variable to be a function of frequency. In this fashion, the simulation time can be a fixed number of periods of the input source.

    iq79 said:
    nd I know now why...The signal was simply not saved, despite save-all. Spectre warns, that there are too many signals to save and this could increase the stimulation time.. but the good guy doesn't mention, that he would discard some signals and not save them..

    Is there any chance you are running a simulation using an extracted view based netlist iwith any post-layout optimization? II you are running a post-layout based netlist simulation using Spectre APS or Specte X, their post-layout reduction feature can prune the netlist and eliminate some nodes. In fact, the default behavior of Spectre X is to enable post-layout reduction. There is an option in Spectre X and Spectre APS to prevent RC reduction and its subsequent elimination of nodes that is discussed in the article at the On-line support URL:

    https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V000009ETCEUA4

    This may not be the source of your "mysterious lost nodes", but it came to mind and wanted to pass it along.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • iq79
    iq79 over 3 years ago in reply to ShawnLogan

    Hi Shawn,

    yes, extracted view with aps++ and default post-layout optimization. Almost half of the Cs are  removed and halft of Rs are shorted (the original netlist contains 40k transistors, ~ 1M caps and ~0.8M Rs). The results not saved where pwr and currents of saved and not removed nodes and devices, like VDD. When I rerun this simulation again I'll open a new thread about it.

    Best,

    Iqbal

    • 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