The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 1st, 2024, 6:35am
Pages: 1
Send Topic Print
call an analog function from another analog function? (Read 2221 times)
Vince Lee
New Member
*
Offline



Posts: 2

call an analog function from another analog function?
Feb 27th, 2014, 3:37pm
 
Is it OK to call an analog function from another analog function?

For example,

/*****example start*****/
analog function real f1;
   input x;
   real x;
   begin
       f1 = x*2;
   end
endfunction

analog function real f2;
   input x;
   real x;
   begin
       f2 = f1(x)+1;
   end
endfunction

/*****example end*****/

Thanks!
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: call an analog function from another analog function?
Reply #1 - Feb 28th, 2014, 9:53am
 
Yes. I tested this (I couldn't see why it shouldn't work) in both spectre with a VerilogA module and in AMS Designer with a VerilogAMS module, with no problems.

Regards,

Andrew.
Back to top
 
 
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.