• 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. [SpectreMDL] Rise time not founf in transient analysis

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 12942
  • 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

[SpectreMDL] Rise time not founf in transient analysis

iamKarthikBK
iamKarthikBK over 3 years ago

Hello.

I am trying to perform a few simulations, and I am unable to use the risetime function in spectremdl whereas the same expression is successfully evaluated in the calculator.
Here is my output in ViVA:



Here is the expression that evaluates successfully in the calculator:
riseTime(v("/OUT" ?result "tran") 0 nil 300m nil 10 90 nil "time" )

Here is the expression I have written within a measurement alias in spectremdl:
export real my_rise=risetime(sig=V(OUT), initval=0.0, inittype='y, finalval=0.3, finaltype='y, theta1=10, theta2=90)

Here is how the analysis is defined in the spectre netlist input.scs:
tran tran stop=1u write="spectre.ic" writefinal="spectre.fc" \
annotate=status maxiters=5

Here is how the analysis is defined in the measurement alias:
run tran( stop=1u, autostop='yes )

Can someone please tell me if I am making a mistake in either of these places? The calculator I talk about is the one accessed through ViVA (Send to calculator)
The expression successfully evaluates to some value 1.026E-9 as expected from the circuit.

Thanks in advance!

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

    Well, it works for me. Here's my simple netlist:

    // simple example
    
    Vout (OUT 0) vsource type=pulse rise=10n edgetype=halfsine val0=0 val1=300m \
      delay=0.1u width=0.4u 
    Rout (OUT 0) resistor r=1k
    
    tran tran stop=1u write="spectre.ic" writefinal="spectre.fc" \
    annotate=status maxiters=5
    

    Here's the MDL:

    alias measurement trans {
        run tran( stop=1u, autostop='yes )
        export real my_rise=risetime(sig=V(OUT), initval=0.0, inittype='y, finalval=0.3, finaltype='y, theta1=10, theta2=90)
    }
    
    run trans
    

    Running:

    spectremdl -design forum.scs -batch forum.mdl

    gives this in the forum.measure file:

    Exported variables from results directory:  ./forum.raw/
    
    date               :  1:16:03 PM, Sun Dec 5, 2021
    design             :  //
    simulator          :  spectre
    version            :  20.1.0.382.isr12
    
    
    Measurement Name   :  trans
    Analysis Type      :  tran
    my_rise               =  5.90338e-09 

    and this matches what I get from running (note, I removed the / from before OUT because I'm running from a typed-in netlist rather than having a schematic, so no need to do the schematic to netlist name mapping that VIVA would do otherwise):

    riseTime(v("OUT" ?result "tran") 0 nil 300m nil 10 90 nil "time" )

    gives: 5.9033806E-9

    Andrew

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

    Update:
    Seems like that is my circuit. for some particular sizes, spectre is unable to calculate the risetime because the waveform is different.



    Is there a way I can tell spectre to ignore points that result in NaN?
    Thanks

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

    I don't really understand what you mean by "ignore points that result in NaN". Surely it won't know that until its tried the problematic sizes? That said, it does seem a bit odd that some of those sizes are very close to one that works OK.

    Perhaps you should contact customer support - it's really hard to see this without understanding the real problem.

    Andrew

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

    Dear iamKarthikBK,

    Excuse the interruption, but I was wondering if, perhaps, your PDK actually supports device sizes which are providing the "nan" result?

    1. Are you able to both netlist and run a single simulation with one of the "nan" cases successfully and both view and compute the rise time?

    2.  What is driving the device for which you are computing the rise time?


    3. What are your simulator accuracy settings and simulator?

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • iamKarthikBK
    iamKarthikBK over 3 years ago in reply to ShawnLogan
    Andrew Beckett said:
    That said, it does seem a bit odd that some of those sizes are very close to one that works OK.

    Yes, but it could be due to the circuit. the output signal I am looking at, may not be rising from the initvalue to the final value.
    I want to ask is there a way I can calculate the rise time for whatever is the maximum value for logic 1?

    Example: If the signal is rising from 20 mV to 295 mV (supposed to be 0 -> 300 mV) which I can tell by looking at the waveform in ViVA, is there a way to do this in spectremdl?

    Unknown said:
    Are you able to both netlist and run a single simulation with one of the "nan" cases successfully and both view and compute the rise time?

    yes, but not for the same initial and final values, as the signal never rises in that swing (it's my circuit)

    Unknown said:
    What is driving the device for which you are computing the rise time?

    By driving, do you mean to ask about the load? It is a 20 fF capacitor. The inputs are vbit, with val1 with 0 V and 300 mV.

    Unknown said:
    What are your simulator accuracy settings and simulator?

    Not sure, in my input.mdl (for mvarsearch), I do this:

    accuracy: 1e-12
    deltax: 1e-6
    maxiter: 1000

    I don't change anything else in ADE L, I just export the netlist from there.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • iamKarthikBK
    iamKarthikBK over 3 years ago in reply to ShawnLogan
    Andrew Beckett said:
    That said, it does seem a bit odd that some of those sizes are very close to one that works OK.

    Yes, but it could be due to the circuit. the output signal I am looking at, may not be rising from the initvalue to the final value.
    I want to ask is there a way I can calculate the rise time for whatever is the maximum value for logic 1?

    Example: If the signal is rising from 20 mV to 295 mV (supposed to be 0 -> 300 mV) which I can tell by looking at the waveform in ViVA, is there a way to do this in spectremdl?

    Unknown said:
    Are you able to both netlist and run a single simulation with one of the "nan" cases successfully and both view and compute the rise time?

    yes, but not for the same initial and final values, as the signal never rises in that swing (it's my circuit)

    Unknown said:
    What is driving the device for which you are computing the rise time?

    By driving, do you mean to ask about the load? It is a 20 fF capacitor. The inputs are vbit, with val1 with 0 V and 300 mV.

    Unknown said:
    What are your simulator accuracy settings and simulator?

    Not sure, in my input.mdl (for mvarsearch), I do this:

    accuracy: 1e-12
    deltax: 1e-6
    maxiter: 1000

    I don't change anything else in ADE L, I just export the netlist from there.

    Thanks

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

    Dear iamKarthikBK,

    Thank  you for both reading and providing some insight into my many (too many?) questions!

    iamKarthikBK said:
    Not sure, in my input.mdl (for mvarsearch), I do this:

    accuracy: 1e-12
    deltax: 1e-6
    maxiter: 1000

    Interesting - I am no familiar with those spectre MDL commands and a quick search on Cadence On-line support did not provide any information. However, I would highly recommend you verify that the ADE-L simulation accuracy "errpreset" be set to "conservative" and, possible, set a value of "maxstep" to be a value less than your desired accuracy if your simulation stop time is many, many many, periods. These are both available under the Transient analysis options GUI.

    iamKarthikBK said:
    I want to ask is there a way I can calculate the rise time for whatever is the maximum value for logic 1?

    Example: If the signal is rising from 20 mV to 295 mV (supposed to be 0 -> 300 mV) which I can tell by looking at the waveform in ViVA, is there a way to do this in spectremdl?

    Ahah!! This is the problem. In computing transition times - rising or falling - the conventions commonly in use are those that produce 10-90% (90% - 10%) and 20%-80% (80% - 20%) of the supply voltage - not the actual supply voltage itself - which is what I think I now understand you are doing. 


    Why? The ability to resolve the actual supply voltage for any simulator is limited. For any logic gate, depending on its load, its output likely somewhat exponentially approaches the supply (rise time) or ground (fall time), but may take some time relative to the period to actual get "close enough" (a relative term) to indicate its is at the supply voltage or ground. Further, being a logic gate, as the amplitud approaches the supply or ground, its gain drops off very significantly relative to its gain near the input voltage threshold. Hence, its functionality is really not determined by how long it takes the output to come extremely close to the supply or ground.

    What i might suggest is that you choose which transition time threshold you think is most appropriate (10/90) or (20/80) and set your rise and fall time measurement thresholds to be those two values and NOT the actual supply voltage. I think this will solve your problem AND provide the type of insight you are looking to find on how device sizes are impacting your transition times.

    An yes, there is a way to cause the lack of crossing a specific threshold to fall back to a different threshold, but I honestly think the use of the supply voltage itself will just make your measurements too dependent on any circuit simulator to really provide the insight you want.

    Let me know your thoughts if you have time iamKarthikBK...or if my comments and explanation need greater clarity of course!

    Shawn

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

    Some comments on the last two points in this thread:

    iamKarthikBK said:
    Yes, but it could be due to the circuit. the output signal I am looking at, may not be rising from the initvalue to the final value.
    I want to ask is there a way I can calculate the rise time for whatever is the maximum value for logic 1?

    Example: If the signal is rising from 20 mV to 295 mV (supposed to be 0 -> 300 mV) which I can tell by looking at the waveform in ViVA, is there a way to do this in spectremdl?

    This doesn't matter. Provided your signal traverses from below 10% of the range to above 90% of the range, it doesn't matter if it's never as low as the minimum or as high as the maximum. You're picking 10-90 in your expression. 

    If you really wanted, you could use:

    export real my_rise=risetime(sig=V(OUT), initval=min(V(OUT)), inittype='y, finalval=max(V(OUT)), finaltype='y, theta1=10, theta2=90)

    However, this will prevent the auto-stop from stopping earlier, because the min/max would be across the entire waveform. You potentially could use max(trim(V(OUT),0,500n)) which would measure it within the first part of the waveform but even so, I'm not sure this is worth it.

    iamKarthikBK said:
    accuracy: 1e-12
    deltax: 1e-6
    maxiter: 1000

    These accuracy settings are for the optimisation loop, not the tolerances of the core simulator.

    Unknown said:
    However, I would highly recommend you verify that the ADE-L simulation accuracy "errpreset" be set to "conservative" and, possible, set a value of "maxstep" to be a value less than your desired accuracy if your simulation stop time is many, many many, periods. These are both available under the Transient analysis options GUI.

    I rather doubt conservative is necessary here and I absolutely do not think you should set maxstep. This is a very poor way of controlling accuracy - it typically leads to slower simulation and a better way is to tighten tolerances rather than force a tiny tilmestep (I've said this before elsewhere). It's highly unlikely that this would affect whether a rise time is found or not.

    Unknown said:

    Ahah!! This is the problem. In computing transition times - rising or falling - the conventions commonly in use are those that produce 10-90% (90% - 10%) and 20%-80% (80% - 20%) of the supply voltage - not the actual supply voltage itself - which is what I think I now understand you are doing. 

    No, I don't think it is the problem. The measurement is already going between 10% and 90% as I mentioned earlier. Of course, if the signal starts above 30mV and never exceeds 270mV then you have a problem. Checking the waveforms in the problematic condition would help understand this, and maybe your initval/finalval need to be adjusted, or maybe you should use 20%-80% instead.

    Andrew

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

    Hello Shawn and Andrew,

    First of all, thank you so much for your time and patience.
    To the others, TL;DR - 

    Andrew Beckett said:
    max(trim(V(OUT),0,500n))

    This resolves the problem I was facing because I know exactly how the output waveform is supposed to look for my inputs, and trim is the best way to ensure that the optimizer doesn't stop at suboptimal solutions (given that the circuit is behaving the way you want, and you wanted to find the rise for that particular edge, for whatever voltage rises).

    --------

    Unknown said:
    I am no familiar with those spectre MDL commands and a quick search on Cadence On-line support did not provide any information.

    Shawn, this is the mvarsearch loop from spectremdl.
    This allows us to set multiple objectives to be minimized while varying multiple parameters while combining accurate simulation results because it is spectre.

    Unknown said:
    I would highly recommend you verify that the ADE-L simulation accuracy "errpreset" be set to "conservative"

    I tried this, but as Andrew mentioned, the signal never rises from/to the values hard-coded into the MDL script (initval and finalval)
    In my particular case, the waveform looks something like this, for the NaN cases:



    I was confused as to why this is happening too, this circuit is a D Flip Flop. I tried 2 structures, 1 from gsclib045 (DFFX1), and another from here, and they both gave me the same kind of waveform. I have also sized both these circuits in another method earlier, characterized them using Liberate, and performed synthesis with no timing violations. Hence, I would assume that there is no mistake in either circuit.

    Unknown said:
    Ahah!! This is the problem. In computing transition times - rising or falling - the conventions commonly in use are those that produce 10-90% (90% - 10%) and 20%-80% (80% - 20%) of the supply voltage - not the actual supply voltage itself - which is what I think I now understand you are doing.

    I agree, but (as Andrew mentioned) these are being set as theta1 and theta2 (percent high and percent low in ViVA XL Calculator). As the expected swing is the same as that of the supply voltage, the initval and finalval are supposed to be the min and max of that signal (respectively). In this particular case, as the expression to evaluate risetime fails for some sizes, and to ensure that the optimizer doesn't stop at suboptimal results (due to NaN), as Andrew suggested, trimming the output signal and computing the min and max works (for this case).

    Andrew Beckett said:
    These accuracy settings are for the optimisation loop, not the tolerances of the core simulator.

    Yes, these are described here.

    [ method = method ]
    [ accuracy = conv_tol ]
    [ deltax = diff_tol ]
    [ maxiter = maxiter ]
    [ restoreParam = restoreParam ]

    Andrew Beckett said:
    Checking the waveforms in the problematic condition would help understand this, and maybe your initval/finalval need to be adjusted

    Yes, this was done by using max(trim(V(OUT)),0,350n) and max(trim(V(OUT)),350n,1u) for rise and fall respectively (as the input combination and output combination is known)

    Thank you so much for your answers!

    Karthik

    Drop here!
    • 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