The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 19th, 2024, 11:54am
Pages: 1
Send Topic Print
Getting AC voltages in VerilogA or VerilogAMS (Read 1087 times)
DrDave57
New Member
*
Offline



Posts: 1

Getting AC voltages in VerilogA or VerilogAMS
Feb 21st, 2019, 10:14am
 
I am creating a module to save the AC voltage from a simulation.

I used this code in my AC analysis and it reports the DC voltage instead of the AC. I need to get magnitude and phase or the real and imaginary parts.
Can someone help me with this?

if (analysis("ac")) begin
     $display("freq = %4.2f. v1 = %4.2f, v2 = %4.2f", $freq, abs(V(v1)), V(v2));
end

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



Posts: 1998
Massachusetts, USA
Re: Getting AC voltages in VerilogA or VerilogAMS
Reply #1 - Feb 21st, 2019, 1:01pm
 
The language does not support getting the ac voltage.
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.