The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 19th, 2024, 2:59am
Pages: 1
Send Topic Print
the problem of AMS code for capacitor (Read 1845 times)
eeBismarck
New Member
*
Offline



Posts: 6

the problem of AMS code for capacitor
Dec 12th, 2015, 9:03am
 
Hi Guys,

   I am a beginner who is learning the verilogA by myself. Today I use the following code to model a capacitor

   `include "constants.vams"
   `include "disciplines.vams"

module sjw_cap(p, n);
 parameter real C = 0; // capacitance
 inout p,n;
 electrical p,n;
 analog
 I(p,n) <+ ddt(C*V(p,n));
endmodule

when I run the transient simulation, and give the since wave as input. I find that the AC current is 0. Could you give me some clue ?

BR
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: the problem of AMS code for capacitor
Reply #1 - Jan 5th, 2016, 6:29am
 
Did you specify a non-zero value for C in the netlist?  You could try setting the default to 1p to see if there's a problem passing the value from the instance line.
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.