Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters are not visible from analog functions #75

Open
kulikov309 opened this issue Nov 3, 2017 · 1 comment
Open

Parameters are not visible from analog functions #75

kulikov309 opened this issue Nov 3, 2017 · 1 comment

Comments

@kulikov309
Copy link

Hi ADMS developers,

I'm trying to read module parameters from analog functions and get a parsing error:
[fatal..] [./test.va:17:17]: at 'p1':
[fatal..] identifier never declared

Below is my Verilog-A file:

`include "discipline.h"

module mymodule (p,q);
electrical p,q;

parameter real p1 = 1.0;
parameter real p2 = 2.0;
parameter real p3 = 3.0;


  analog   function real f1;
    input x;
    begin
      //works
      //f1 = x * 1.0;
      //doesn't work. p1 is not visible from f1
      f1 =  x * p1; 
    end
  endfunction


analog
  begin
    real c;
    c = f1(5.0) + p2*p3;
    I(p,q) <+ c;
  end
endmodule

@ngwood
Copy link
Contributor

ngwood commented Jun 15, 2021

I recently noticed this myself. This feature first appeared in VAMS-LRM-2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants