The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 19th, 2024, 8:40pm
Pages: 1
Send Topic Print
[Solved] VerilogA - Branches and assignment (Read 925 times)
saigoutham
New Member
*
Offline



Posts: 4

[Solved] VerilogA - Branches and assignment
Oct 23rd, 2019, 7:58am
 
Hi,
I am new to Verilog-A and saw the following model for a Diode in Cadence's AMS reference manual.

module diode (a, c) ;
inout a, c ;
electrical a, c ;
parameter real rs=0, is=1e-14, tf=0, cjo=0, phi=0.7 ;
parameter real kf=0, af=1, ef=1 ;
analog begin
I(a, c) <+ is*(limexp((V(a, c)-rs*I(a, a))/$vt) - 1);
I(a, c) <+ white_noise(2* `P_Q * I(a, c)) ;
I(a, c) <+ flicker_noise(kf*pow(abs(I(a, c)),af),ef);

end
endmodule

How to read and understand this line? "I(a, c) <+ white_noise(2* `P_Q * I(a, c)) ;"
I see I(a,c) is being used on both left and right side of the assignments.
Thank you for the help.
Regards,
Sai.
Back to top
 
« Last Edit: Oct 23rd, 2019, 1:31pm by saigoutham »  
View Profile   IP Logged
saigoutham
New Member
*
Offline



Posts: 4

Re: [Solved] VerilogA - Branches and assignment
Reply #1 - Oct 23rd, 2019, 1:33pm
 
I apologize for missing that these statements are evaluated "sequentially". I was thinking that these statements are part of a simultaneous equation
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: [Solved] VerilogA - Branches and assignment
Reply #2 - Oct 24th, 2019, 6:11am
 
To avoid the confusion you had initially, I would have written the module as

id = is*(limexp((V(a, c)-rs*I(a, a))/$vt) - 1);
I(a, c) <+ id;
I(a, c) <+ white_noise(2* `P_Q * id) ;
I(a, c) <+ flicker_noise(kf*pow(abs(id),af),ef);
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.