• 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. Why is Spectre ignoring time tolerance or time step conditions...

Stats

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

Why is Spectre ignoring time tolerance or time step conditions from Verilog-AMS models?

DomiHammerfall
DomiHammerfall over 1 year ago

Dear community

I am using the following Verilog-AMS model to generate sharp pulses:

module my_source(MINUS, PLUS);

inout MINUS;
electrical MINUS;
inout PLUS;
electrical PLUS;

parameter real delay = 1.0u;
parameter real period = 10.0u;
parameter real amplitude = 8.0;

real out;

analog begin

@(initial_step) begin
out = 0;
end

@(timer(delay,period)) begin
out = amplitude;
end

@(timer(delay+2n,period)) begin
out = 0;
end

I(PLUS, MINUS) <+ transition(out*25e-9,0,1n);

end
endmodule

This signal is further amplified by some analog circuit. The problem is that the observed amplitude at the end of the signal chain varies over time unless I set a very strict reltol of 1e-6 or force a small maximum step size in the transient simulation, e.g. 50ps. This slows down the simulation a lot. To prevent that, I want to force the simulator to temporarily limit its step size. This can be done with the $bound_step function, but for whatever reason, Spectre seems to ignore that. So in my code I add

@(timer(delay,period)) begin

$bound_step(50p);
out = amplitude;

end

and then reset it after 300ns

@(timer(delay+300n,period)) begin

$bound_step(1m);

end

According to the log, the step size is not limited to 50ps and the amplitudes still vary over time. However, if a call $bound_step outside of the timer function, then Spectre does indeed use a step size of 50ps, but this is then applied for the complete simulation and thus very slow. So why is Spectre ignoring the call of $bound_step inside the timer function? Are there other ways to achieve the desired outcome?

Thanks for any suggestion.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Whilst I'm not sure this is the right way of solving the problem, the issue is that if you use $bound_step(), you need to invoke it in every iteration and not just at the times of the event - otherwise it only sets it for a single tilmestep. It doesn't set the maximum timestep until next called.

    Instead you could have a variable in the code which is the maxstep (say) and then call $bound_step(maxstep) all the time, and have your timer blocks alter the value of maxstep.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DomiHammerfall
    DomiHammerfall over 1 year ago in reply to Andrew Beckett

    Dear Andwer

    Thank you very much for your help.

    Whilst I totaly agree with you that this might be not the ideal way to tackle to probelm, I can confirm that your proposed solution works. Here are the adjustments of the code for those who want to use it as well:

    real maxstep;
    analog begin

    $bound_step(maxstep);


    @(timer(delay,period)) begin
    maxstep = 50e-12;
    end

    @(timer(delay+2n,period)) begin
    maxstep = 1e-3;
    end

    end

    • 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