• 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. RMS and AVERAGE Calculation with respect to power.

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 126
  • Views 22576
  • 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

RMS and AVERAGE Calculation with respect to power.

SHEKHARvnit
SHEKHARvnit over 8 years ago

I have designed a custom 5 bit counter. The "Pulse" Inputs are applied to the counter so that all possible input combination are applied to the counter (from 00000 to 11111). The output of counter is connect to a 5 bit DAC(ideal) written in verilog-a. I want to measure the dynamic power consumption of the counter. A transient simulation is setup for 30 cycles of output waveform. I have plotted the supply current through the counter. I have the folllowing two questions:-

1. Average Power:  To calculate power i took average of the supply current waveform of counter and multiplied it with the supply voltage.

2. RMS Power: To calculate power i took rms of the supply current waveform of counter and multiplied it with the supply voltage.

Which of the two powers represent the dynamic power consumption? I doubt whether one of them really represents dynamic power as the power does not increase with the frequency. For Example, the power for 1kHz is say 22uW then for 2k is 11uW and for 3k it comes out to be 15 uW.

Thank You.

  • Cancel
  • vs8747
    vs8747 over 5 years ago

    Hi,

    I am interested to know how spectre calculates the dc(avg), peak and rms currents , and how the average current can be negative ?

    I have just used the keyword "rms" and " em_avg" in the .meas statement. Please provide some insights on this.

    Thanks,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to vs8747

    This has very little to do with the original question, which is one reason why the forum guidelines ask you not to post on the end of old threads.

    It also would have helped if you'd given the actual .measure statements you're using. Note that we primarily support .meas/.measure statements for compatibility with other SPICE simulators; the normal way to do this with Spectre would be to use Spectre MDL or ADE to compute the quantity. I'm assuming you have something like this simple spectre netlist:

    //

    I1 (n1 0) isource dc=1m type=sine freq=1M ampl=2m
    R1 (n1 0) resistor r=1k

    tran tran stop=2u

    simulator lang=spice
    **.option em_recovery=1k
    .meas tran av1 rms I(R1)
    .meas tran av2 avg I(R1)
    .meas tran min1 min I(R1)
    .meas tran max1 max I(R1)
    .meas tran av3 em_avg I(R1) em_rec=1

    If I do that, I get:

    Measurement Name : tran
    Analysis Type : tran
    av1 = 0.00173168
    av2 = -0.001
    av3 = -0.001
    max1 = 0.000997474
    min1 = -0.00299432

    In my results. The RMS is obviously always positive, but the avg isn't because it calculates the area under the curve in question divided by the interval (in this case the whole simulation since I didn't specify from and to in the .meas statements), and if you have more negative regions than positive the total area may end up being negative. In a definition of em_avg I found in a request for support for this .meas syntax, it says:

    • Measure the average of positive part of the waveform (when I(t) > 0): "pos"
    • Measure the average of negative part of the waveform: "neg".
    • final em_avg current is: max(pos,neg) - EM_REC * min(pos,neg)
    • the polarity of em_avg current is same as the polarity of the max(pos,neg), i.e. Positive, if abs(pos) is more than abs(neg) and otherwise.

    Regards,

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • vs8747
    vs8747 over 5 years ago in reply to Andrew Beckett

    Thanks, Andrew for the information but still I have one query.

    How spectre calculates average current for improper waveforms, like if the waveform don't have any standard structure(triangular,square...) , and it has many negative and positive peaks.

    Does PSTEP value is used calculate , and also correct me if I am wrong, suppose " PSTEP = 1e-10" it takes the value of that required parameter in this instants of time.

    Thanks,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to vs8747

    Spectre doesn't really use "PSTEP". It does support it as an option, but it only affects the "print" or .print statement. Spectre always computes time steps based on the local truncation error, which means that it dynamically adjusts the time steps to ensure it follows the curves with sufficient accuracy. The average would be computed by integrating the area under the curve (using a trapezoidal integration, most likely) and then dividing by the interval. 

    So I don't think PSTEP is relevant (and I'm not sure why you'd set it, presumably because you've got a netlist from another SPICE simulator?)

    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