The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 6th, 2024, 3:36pm
Pages: 1
Send Topic Print
Model Exponential rising signal in Verilog-A (Read 8778 times)
aliasnikhil
New Member
*
Offline



Posts: 9

Model Exponential rising signal in Verilog-A
Feb 17th, 2013, 7:56pm
 
Hi,

I am trying to write VerilogA model for a circuit that has an exponentially rising output response (like charging of a real capacitor). For example, if the input is a voltage pulse with almost zero rise time, then the output of the circuit should rise exponentially towards the final voltage.

I need this equation:
V_out = V_previous + (V_new - V_previous)*(1 - exp(-1*time/tau))

V_previous is the starting voltage.
V_new is the voltage that the output tries to reach exponentially.
tau is the time constant.

Can anyone please help me with this regard.

Thanks.
-Nikhil
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Model Exponential rising signal in Verilog-A
Reply #1 - Feb 21st, 2013, 10:15am
 
You could implement an R and a C with Verilog-A equations.

How are you thinking to "remember" the starting voltage?

Code:
module vexpout(in, out, ref);
inout in, out, ref;
electrical in, out, ref;
electrical mid;
parameter real R = 1 from (0:inf);
parameter real C = 1p from (0:inf);

analog begin
    I(in,mid) <+ V(in,mid) / R;
    I(mid,ref) <+ C * ddt(V(mid,ref));
    V(out,ref) <+ V(mid,ref); // output buffer
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
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.