The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 18th, 2024, 3:39pm
Pages: 1
Send Topic Print
fixed time step in Verilog-A? (Read 3118 times)
fgcsk
New Member
*
Offline



Posts: 7

fixed time step in Verilog-A?
Oct 06th, 2014, 11:50pm
 
Is there any way to have a fixed time step in Verilog-A?
I know $bound_step can limit the time step to a certain amount, but it does not guarantee the time step is fixed if I understand correctly.

Actually I just want to implement something like this:
Y = Y + dYdt*timestep

I know Y=idt(dYdt, 0) can do it, but at some events I also need to directly modify Y, and idt() is an analog operator that is not allowed to do so.
Any suggestions?
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: fixed time step in Verilog-A?
Reply #1 - Nov 13th, 2014, 10:22am
 
There is a reset argument to idt() that allows you to set the output to zero; can you use that?

What you're asking for is a little tricky; what happens when the simulator fails to converge at a timepoint (due to nonlinearities in other parts of the circuit) and backs up to take a smaller time step?  Will it know how to back out the direct modifications you made to Y ?
Back to top
 
 

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



Posts: 7

Re: fixed time step in Verilog-A?
Reply #2 - Nov 22nd, 2014, 11:54pm
 
Thanks for explaining why there is no fixed time step.
The reset argument of idt cannot help, and I've already come up with a way to solve this problem, which is to separate the total Y into two variables.
One is the idt(), and the other one is the modification.
Back to top
 
 
View Profile   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.