• 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 SKILL
  3. Problem in simulation by integrating Random generator with...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 14734
  • 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

Problem in simulation by integrating Random generator with other analog blocks

Analog Design
Analog Design over 14 years ago

 Hi ,

 I want to do simulation after integrating  Random generator(Designed in Verilog-A) with other analog blocks. Indivual simulation of Random generator takes less time and gives output within fraction of second . But after integration with other  analog modules(Designed by devices from UMC180nm libraries) , spectre simulator contineously running without completion of simulation. After Some time  It seems to be no completion of simulation ,so I have to  stop simulation before completion . How to overcome this  problem (to complete simulation)? I am donig simulation in Cadence spectre(version ICv5.1)

The design Code like below

`include "discipline.h"
`include "constants.h"

module noise_src(vout,ref);
output vout;
input ref;
electrical vout,ref;
parameter real amp = 0.2 from [0:inf);
parameter real att = 10 from [0:inf);
integer seed;

analog begin
@ (initial_step) begin
seed=23;
end

V(vout,ref) <+ amp * $dist_normal(seed,0,1)/att;
$display ("seed is %d",seed);
end

endmodule
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    The problem is that you have a model which is not well written. It is changing the output voltage in a discontinuous fashion at each timestep. Because the amplitude of the change is quite large, the simulator tries to handle this discontinuity (particularly as seen by the circuit connected to this noise source) by putting some additional points around the transition to try to follow it better - assuming (incorrectly) that by adding more points it will be smoother. What then happens is that you get even more random numbers, and hence more discontinuity over a shorter time, and so on - resulting in it (probably) zooming in to take very short timesteps.

    Fundamentally discontinuities are bad  (especially such large ones - your amplitude here is 0.02 V by default), and so you really need to have something to smooth out those transitions. Real life does not have instantaneous changes - and circuit simulators are not designed to be able to completely cope with such unrealistic changes (although a lot of effort has gone in to reduce the impact). Some thoughts as to how to resolve this:

    1. Use @(timer(...)) to schedule the random number to be updated on a regular (but fixed) timestep - this means you are not altering the timestep based on your random number generation
    2. Then use the transition() function to give a sensible transition between the values. Or maybe slew() to slew rate limit the changes, or  use one of the laplace functions to filter the discrete changes into a smoother form.

    Regards,

    Andrew.

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

    The problem is that you have a model which is not well written. It is changing the output voltage in a discontinuous fashion at each timestep. Because the amplitude of the change is quite large, the simulator tries to handle this discontinuity (particularly as seen by the circuit connected to this noise source) by putting some additional points around the transition to try to follow it better - assuming (incorrectly) that by adding more points it will be smoother. What then happens is that you get even more random numbers, and hence more discontinuity over a shorter time, and so on - resulting in it (probably) zooming in to take very short timesteps.

    Fundamentally discontinuities are bad  (especially such large ones - your amplitude here is 0.02 V by default), and so you really need to have something to smooth out those transitions. Real life does not have instantaneous changes - and circuit simulators are not designed to be able to completely cope with such unrealistic changes (although a lot of effort has gone in to reduce the impact). Some thoughts as to how to resolve this:

    1. Use @(timer(...)) to schedule the random number to be updated on a regular (but fixed) timestep - this means you are not altering the timestep based on your random number generation
    2. Then use the transition() function to give a sensible transition between the values. Or maybe slew() to slew rate limit the changes, or  use one of the laplace functions to filter the discrete changes into a smoother form.

    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