The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 11:23pm
Pages: 1
Send Topic Print
How to implement ODEs using Verilog-A (Read 3272 times)
shu
Guest




How to implement ODEs using Verilog-A
May 17th, 2004, 5:18pm
 
I am wondering whether I can implement coupled odinary differential equations using Verilog-A and simulated by Spectre?
The equations look like
dx/dt=x*y
dy/dt=x/y

Thanks a lot.
Back to top
 
 
  IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: How to implement ODEs using Verilog-A
Reply #1 - Jul 9th, 2004, 9:13am
 
Shu -
The equations you wrote could be implemented by two coupled simple circuits, each consisting of a 1-Farad capacitor and a dependent current source. In Spectre, I don't believe you can have a dependent source with a division, so it will have to be Verilog-A.

---- ode.va ----
`include "disciplines.h"
module ode(x,y);
 inout x,y;
 electrical x,y;
 analog begin
   I(x) <+ V(x)*V(y) - ddt(V(x));
   I(y) <+ V(x)/V(y) - ddt(V(y));
 end
endmodule
----
---- ode.netlist ----
*
simulator lang=spectre
ahdl_include "ode.va"
X1 (x y) ode
ic x=1 y=1
tran1 tran stop=1u skipdc=yes
----

As written, the only DC solutions of your equations are {x=0, y=anything but 0}, and when x=0, the transient analysis is boring.

To get something interesting, I have set "skipdc=yes" and provided initial conditions for both nodes.

-Geoffrey
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
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.