• 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. spectre input.cs : conditional equation in .measure (min...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 13412
  • 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

spectre input.cs : conditional equation in .measure (min of 2 measurements)

samung
samung over 9 years ago

Hello,

using spectre in batch mode, I am trying to define the following conditional equation, to measure a capacitance.
I would like to know how to get the minimum between two parameters: maxvbl and V0 in my case, using the .measure strategy ?

input.scs extract:

parameters I0=10e-06
parameters V0=1.0
...
save blo\<16\> gslo\<0\>
...
.measure tran maxvbl max v(blo\<16\>)
.measure tran trigger param= 'min(maxvbl:V0)' <- conditional equation
.measure tran meas_when_trigger when v(blo\<16\>)='trigger'
.measure tran dvbl deriv v(blo\<16\>) at='meas_when_trigger'
.measure tran cbl param='I0/dvbl'

I cannot use spectremdl or ocean, using .measure syntaxe is somewhat mandatory to solve this point.

Thanks a lot in anticipation for any help,

P.

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

    I don't really understand why you can't use SpectreMDL for this, but the key problem is in your trigger calculation. You've used ":" instead of ",".

    //

    parameters I0=10e-6
    parameters V0=1.0

    Vn (s1 0) vsource type=sine freq=1M ampl=1.1

    tran tran stop=2u

    simulator lang=spice
    .measure tran maxvbl max v(s1)
    .measure tran trigger PARAM='min(V0,maxvbl)'
    .measure meas_when_trigger when v(s1)=trigger
    .measure tran dvbl deriv v(s1) at=meas_when_trigger
    .measure tran cbl param='I0/dvbl'

    For me with a ":" it gave a very clear error. With the above example I get:

    Measurement Name : transient1
    Analysis Type : tran
    cbl = 2.75439e-12
    dvbl = 3.63057e+06
    maxvbl = 1.09687
    meas_when_trigger = 1.81692e-07
    trigger = 1

    I can change V0 to 1.2 (say) and it still works (then the measurement is taken at the peak of s1).

    Regards,

    Andrew.

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

    I don't really understand why you can't use SpectreMDL for this, but the key problem is in your trigger calculation. You've used ":" instead of ",".

    //

    parameters I0=10e-6
    parameters V0=1.0

    Vn (s1 0) vsource type=sine freq=1M ampl=1.1

    tran tran stop=2u

    simulator lang=spice
    .measure tran maxvbl max v(s1)
    .measure tran trigger PARAM='min(V0,maxvbl)'
    .measure meas_when_trigger when v(s1)=trigger
    .measure tran dvbl deriv v(s1) at=meas_when_trigger
    .measure tran cbl param='I0/dvbl'

    For me with a ":" it gave a very clear error. With the above example I get:

    Measurement Name : transient1
    Analysis Type : tran
    cbl = 2.75439e-12
    dvbl = 3.63057e+06
    maxvbl = 1.09687
    meas_when_trigger = 1.81692e-07
    trigger = 1

    I can change V0 to 1.2 (say) and it still works (then the measurement is taken at the peak of s1).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 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