The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 4th, 2024, 10:59am
Pages: 1
Send Topic Print
problem of changing accuracy during transient sim (Read 6250 times)
jimmy
Community Member
***
Offline



Posts: 32

problem of changing accuracy during transient sim
Nov 28th, 2004, 8:35pm
 
Hi all,

I wanted to change the tolerance during transient simulation, say, use a loose one for quick settling, then change to tight one for accuracy. I tried the following method proposed by someone on this forum before. Somtimes it works, sometimes not.

My circuit contains clocks. But I avoided to save data at the clocks' edges.

Can anyone give me some hint?

thank you,
jimmy



-------------------------------------------------------------
You can use the combination of "writefinal" and "readic"  
in the transient Options form to run the transient analysis
from 0-200ns and then from 200ns-400ns.

During the 0-200ns simulation, write the final transient
timepoint to a file called spectre_200.fc.  Use this file  
as the initial conditions for the transient analysis
initial transient solution during the 200ns-400ns simulation.  

- In the Analog Simulation window, select Analyses->Choose.
- In the Choosing Analyses form, select tran and set the stop time to 200ns.  
- Click on the Options button at the bottom of the form. The transient  
 Options form will pop up.
- In the "write final" field, enter spectre_200.fc and OK the forms.
- Run the simulation.  The final transient timepoint is saved to the file  
 spectre_200.fc. You can use this file as the initial conditions for the
 transient analysis initial transient solution during the 200ns-400ns
 simulation.
- Next, in the transient analysis form set the stop time to 400ns.
- In the transient Options form, set
    start = 200ns
    readic =  spectre_200.fc  
    write final = spectre_400.fc.
- OK the forms and run the simulation. The simulation will run from
 200ns-400ns using spectre_200.fc as the initial condition file.
Back to top
 
 
View Profile   IP Logged
August West
Community Member
***
Offline

I'll get up and fly
away

Posts: 71

Re: problem of changing accuracy during transient
Reply #1 - Nov 29th, 2004, 9:31am
 
You can also add a Verilog-A block that contains a timer function to your circuit. If tstart is the time you want to tighten tolerances and tstep is the timestep size you want after tstart, then use

@(timer(tstart,tstep)
         ;

in your model. This does nothing until tstart, then it constrains the simulator to take steps every tstep seconds. This particular approach does not tighten the KCL tolerances, just the time step. And it is appropriate if you want to perform a Fourier analysis if you use it to assure that the simulator places a time point at every Fourier sample point.

Alternatively you can use the $boundstep function, with something like

if ($abstime > tstart)
       $boundstep(tstep)

This also reduces the timestep, but does not force the timepoints to be at any particular points. So it results in faster simulation but does not help the Fourier analysis as much.

Whatever method you use, be aware that any error made when using loose tolerances will decay away at a rate set by the longest time constant of the circuit. This fact generally undermines the use of these types of approches to speed up simulation.

-August
Back to top
 
 
View Profile   IP Logged
jimmy
Community Member
***
Offline



Posts: 32

Re: problem of changing accuracy during transient
Reply #2 - Nov 30th, 2004, 9:23pm
 
Hi August,

Thank you for your reply.

I am afraid that the method you suggested might make the time step too small when they don't need to somtimes. When I tight the tolerance, i noticed that tie time steps are not constant. someitme the timesteps are very small, sometimes not.

I found the problem in my simulation when I use the "two-step' method. The ahdl model of dff I used was the trouble maker. I just took the model from ahdlLib, didn't change anything.

The problem is : when I started the second transient simulation, the output of the dff was reset to 0 even though both its input and output are high at that momeht (on the other words, at the moment when the first simulation stopped). I didn't find any resetting command in the ahdl code. I am guessing the simulator jsut force the ahdl block output to 0 at beginning.

It was this undesired "resetting" make the simulation wrong.

Can you help me to figure out a solution for this issue?

thanks a lot,
jimmy

Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: problem of changing accuracy during transient
Reply #3 - Dec 1st, 2004, 10:13pm
 
In the upcoming MMSIM60 release (due out in the next few weeks), spectre will have a true save and restart capability, which should correctly store the state at the stopping point. Currently some of the state is not written into the writefinal file, and so internal verilog-a variables are not restored when you restart from a checkpoint. That should get solved with the save/restart mechanism.

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
jimmy
Community Member
***
Offline



Posts: 32

Re: problem of changing accuracy during transient
Reply #4 - Dec 2nd, 2004, 11:13am
 
Andrew,

Thank you for your reply. Do you have solution to solve this problem without using the new release. We are using the university version of cadence, it is already behind.

thank you so much,
jimmy
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: problem of changing accuracy during transient
Reply #5 - Dec 2nd, 2004, 9:59pm
 
'fraid not. Sorry.

Actually, one thought comes to mind. You could do it in AMS Designer, which has had a save/restart for some time...

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
jimmy
Community Member
***
Offline



Posts: 32

Re: problem of changing accuracy during transient
Reply #6 - Dec 3rd, 2004, 10:38am
 
Thankj you Andrew,

Do I need to change anything in my circuit to run in AMS designer?

jimmy
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: problem of changing accuracy during transient
Reply #7 - Dec 5th, 2004, 12:04pm
 
You shouldn't need to change anything in the circuit. You may need to do some work to your design kit if it doesn't currently support AMS Designer, but that's not generally that hard (see the docs, particularly on the conversion toolbox).

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.