• 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. Average from Sweep Simulation Spectre

Stats

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

Average from Sweep Simulation Spectre

Hackasim
Hackasim over 6 years ago

Hello to everybody.

I am currently running sweep simulations in Spectre, and I keep track of the various delays. However, I do not know how to compute the average of these quantities.

Could someone help me?
Thank you.

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

    How are you doing these sweeps? How are you "keeping track of the various delays"? Not enough information here to really guide you - I'd have to guess or try to cover every possible way you might be running the simulations and doing your calculations.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    How are you doing these sweeps? How are you "keeping track of the various delays"? Not enough information here to really guide you - I'd have to guess or try to cover every possible way you might be running the simulations and doing your calculations.

    Andrew.

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

    Hello, this is basically my file:

    simulator lang=spectre

    swp_v1 sweep paramset=data_input {

    swp_v2 sweep paramset=data_input2 {

             tran_x tran start=0ns stop=4.1ns

    }

    }

    simulator lang=spice

    .MEASURE TRAN A1_S1 TRIG v(102) VAL=0.5 TARG v(120) VAL=0.5

    .MEASURE TRAN A0_S1 TRIG v(105) VAL=0.5 TARG v(120) VAL=0.5

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

    I'm not that familiar with the SPICE .MEASURE syntax, but I don't think you can find the average across a sweep. Similarly I don't think this can be done with Spectre MDL either (I tried, but got the same result as doing it with a .MEASURE):

    Either:

    alias measurement finddelay {
      export real a1_s1, a0_s1

      run swp_v1

      a1_s1=deltax(sig1=v(102),sig2=v(120),thresh1=0.5,thresh2=0.5)
      a0_s1=deltax(sig1=v(105),sig2=v(120),thresh1=0.5,thresh2=0.5)
    }

    run finddelay

    or

    alias measurement finddelay {
      export real a1_s1, a0_s1

      run tran(stop=4.1n)

      a1_s1=deltax(sig1=v(102),sig2=v(120),thresh1=0.5,thresh2=0.5)
      a0_s1=deltax(sig1=v(105),sig2=v(120),thresh1=0.5,thresh2=0.5)
    }

    foreach data_input {
      foreach data_input2 {
        run finddelay
      }
    }

    Both do the same thing (and adding an avg() in the measurement doesn't help). Similarly with .MEASURE adding:

    .MEASURE TRAN A1_S1_AVG AVG A1_S1
    .MEASURE TRAN A0_S1_AVG AVG A0_S1

    doesn't help as it gives the average per sweep point, which is the same as the measurement itself.

    So I can't see a way of doing it. I'd probably just post-process the ".mt0" file with the tabular measurement results and compute the average outside. Or contact customer support to see if we can add an enhancement to support this (or maybe there's a way that I missed from a very quick look into this)?

    Regards,

    Andrew

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

    Ok I did the "postcomputation" using a Matlab script importing the .mt0 file.
    However, now there is another problem: the number of bits (and so the possible input combinations) has increased, and it takes forever to try to analyse everything.
    At the same time, I know that Genus does not provide an accurate timing report in case of clock absence (like in my case of asynchronous adders).

    Do you maybe know whether it is possible to have precise results with the synthesizer?

    Regards,

    Simone.

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

    If you have a question about Genus, please post a new post in the Logic Design (or maybe Design Implementation) forum. Custom IC Design is not the right forum for such a question.

    Regards,

    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