The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 5th, 2024, 1:18pm
Pages: 1
Send Topic Print
Scheduling a change of the time step of a simulation with AMS Simulator (Read 8519 times)
Emmanuele
Junior Member
**
Offline



Posts: 11
Geneva, Switzerland
Scheduling a change of the time step of a simulation with AMS Simulator
Dec 14th, 2009, 11:40pm
 
Hi to everybody.
I'm running a transient simulation using AMS Simulator.
The simulation consists in long periods in which the voltages and currents of the circuit remain unchanged, alternated with short periods in which they vary quickly.
The point is: to have a good resolution in the short periods, I have to set a small time step for the simulation; but this way I use a small time step for ALL the circuit, and the simulation takes a lot of time.
My ideal solution would be to have the possibility to schedule a change in the time step during the simulation.
In the AMS Simulator manual I read that with the function OPTION one can set scheduled changes for some simulation parameters, but not for the time step.
Any suggestions?
Thanks a lot,
Emmanuele
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Scheduling a change of the time step of a simulation with AMS Simulator
Reply #1 - Dec 15th, 2009, 5:36am
 
I suppose you could construct a Verilog-AMS module using $bound_step to control the timestep in particular sections:

module tcontrol();
real the_time, tmax;
analog begin
 the_time = $abstime;
 if (the_time < 1u)
  tmax = 10m;
 else if (the_time < 1.1u)
  tmax = 1p;
 else if (the_time < 2u)
  tmax = 10m;
// ...
 $bound_step(tmax);
end
endmodule
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Emmanuele
Junior Member
**
Offline



Posts: 11
Geneva, Switzerland
Re: Scheduling a change of the time step of a simulation with AMS Simulator
Reply #2 - Dec 15th, 2009, 5:47am
 
Thank you for your reply.
Actually I don't know what a Verilog-AMS module is.
Can I write it in Design HDL? I'm using the Cadence SPB suite.
Back to top
 
 
View Profile   IP Logged
Riad KACED
Community Member
***
Offline



Posts: 93
Swindon, UK
Re: Scheduling a change of the time step of a simulation with AMS Simulator
Reply #3 - Dec 17th, 2009, 10:24am
 
Hi Emmanuele,

I like Geoofrey's solution and I would encourage you going forward with it. If you don't want using an AMS module, then you can control some analog parameters of your simulation during the simulation itself. It is a manual approach that requires running AMS Designer in interactive mode, i.e. using the Simvision GUI to control the simulation.

From the simvision console, run
Code:
ncsim> help analog 


This would tell you all the analog options you can set, this includes the reltol option which defaults to 1e-3 off the top of my head.

All what you need to setup the a new value for reltol is
1. launch the simulator with a very short stop time. The aim here is to invoke the simulator. Say :
Quote:
ncsim> run 1ps

2. Run the following to see the current options:
Quote:
ncsim> analog -show

3. Alter the value of reltol for example:
Quote:
ncsim>analog -reltol 1e-5

4. Run the simulation for the desired time, say 1us
Quote:
ncsim>run 1us

5. Alter the reltol to a new value and run again.

I can't really remember whether you need to play with the 'analog -stop' option. Please give it a try as I'm offline at the minute.

Hope this helps,

Regards,
Riad.
Back to top
 
 

Riad KACED
PDK, EDA Support Engineer.
View Profile   IP Logged
Emmanuele
Junior Member
**
Offline



Posts: 11
Geneva, Switzerland
Re: Scheduling a change of the time step of a simulation with AMS Simulator
Reply #4 - Dec 20th, 2009, 9:56am
 
Thank you too.
Unfortunately, as I told you, I'm using AMS Simulator, which is somewhat different from AMS Designer.
I don't know if I can implement one of the two proposed solutions.
Furthermore, I'd need to run a lot of analysis, so I think that a manual approach should be excluded...
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Scheduling a change of the time step of a simulation with AMS Simulator
Reply #5 - Dec 22nd, 2009, 6:34am
 
I don't know what "AMS Simulator" is, but if it's a simulator that supports Verilog-AMS, then my approach should work.

I've never written anything in Design HDL, so I don't know if the functions you need are available in the language.  Cadence tools generally support Verilog-AMS, you just need to learn how to take the code I've given you and make your simulator use it.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

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

Posts: 1742
Bracknell, UK
Re: Scheduling a change of the time step of a simulation with AMS Simulator
Reply #6 - Jan 3rd, 2010, 9:42am
 
AMS Simulator is actually PSPICE. This causes no end of confusion (within Cadence too), since PSPICE questions get directed to Application Engineers that know AMS Designer...

I'm afraid my knowledge of PSPICE is rather limited and (pretty rusty too), so you may be better off posting on this forum, say: http://www.cadence.com/community/forums/27.aspx

Regards,

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.