The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Modeling >> Behavioral Models >> call an analog function from another analog function?
https://designers-guide.org/forum/YaBB.pl?num=1393544224

Message started by Vince Lee on Feb 27th, 2014, 3:37pm

Title: call an analog function from another analog function?
Post by Vince Lee on 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!

Title: Re: call an analog function from another analog function?
Post by Andrew Beckett on 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.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.