• 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. Mixed-Signal Design
  3. Accurate sampling (or scheduling an accurante time event...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 64
  • Views 11367
  • 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

Accurate sampling (or scheduling an accurante time event) in SPECTRE

RFStuff
RFStuff over 3 years ago

Dear All,

I like to sample a node voltage in my testbench at accurate time instants by using a clock of period of 1ns.

One way of doing this is using a verilog-A module with cross( ) function. But cross() has accuracy limits set by expr_tol and time_tol from actual crossing.

So, transient simulation result is equivalent to having a jittery clock that samples the node-voltage (i.e. I am Not getting the node voltage values at the actual crossing ( the instants at multimples of 1 ns. 1ns,2ns.....etc).

How can I reduce the deviation ? What minimum time_tol value I can set ?  Can I set it to 1 fs ?

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 3 years ago

    Dear RFStuff,

    RFStuff said:
    How can I reduce the deviation ?

    I would suggest using a conventional transient simulation with sufficient accuracy settings. For example, if you are using spectre +aps, you might choose an errpreset of "conservative" to minimize simulator error. You may also consider setting a maximum tilmestep (parameter maxstep set to some value) as that will force the simulator to sample your signal at least every maxstep seconds.

    You might consider the following:

    1. Use the Calculator cross() function to locate the times at which your signal of interest crosses the voltage threshold you are showing in your figure. You can create a waveform of the threshold crossings and either plot them as a function of time or cycle number. The error can be quantified by choosing a threshold of value "threshold + epsilon" and, perhaps, "threshold - epsilon" and determine the set of time values that correspond to these two thresholds. Take the difference between the crossings at "threshold" and those at thresholds of "threshold + epsilon" and "threshold - epsilon". This indicates how much temporal error might result from an interpolation of +/-epsilon from the actual crossing time.

    2. If your signal to be sampled is synchronous with your sampling clock of 1 GHz, set the strobe time parameter for your transient simulation to 1 ns or some integer submultiple of 1 ns. Perform your simulation as before with an errpreset of "conservative" and utilize the Calculator cross() function. If your signal and sample clock are synchronous, their may be an offset in the reported sample times, but the variation in the sample times (i.e., wander or jitter" should be minimized.

    This may not help at all if you are only interested in using your veriloga module, but thought I would pass my thoughts along.

    Shawn

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

    Thanks ShwanLogan.

    Can I set minimum time_tol value to 1 fs here to minimize the deviation here ?

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

    Thanks ShwanLogan.

    Can I set minimum time_tol value to 1 fs here to minimize the deviation here ?

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

    Dear RFStuff,

    RFStuff said:
    Can I set minimum time_tol value to 1 fs here to minimize the deviation here ?

    Yes, but I don't think that will help your basic issue. The time_tol only places timepoints at the corners of your waveform transition - and NOT about the threshold crossing. Hence, you still need may need to interpolate the signal to find the time of the threshold crossing. The veriloga manual states:

    "This option requires the simulator to place time points no more than the value of time_tol away from the two corners of the transition."

    I hope I understood your question correctly...

    Shawn

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

    Dear ShwanLogan,

    If you see the page 129 as below , it clearly says that by setting time_tol you can come closer to the desired actual crossing and minimize the deviation.

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

    You're probably also being constrained by your long stop time, similar to what I say here.

    In general the controls for cross should be sufficient and give good accuracy in most situations. If you need to further improve the determination of the crossing time you can use last_crossing() which interpolates to improve the time the crossing occurred at. That's mainly for improved determination of the time though rather than the sample value.

    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