RE: Verilog AMS access function namespace

From: Marq Kole <marq.kole_at_.....>
Date: Mon Aug 03 2009 - 01:47:47 PDT
Hi Surya,

The point here is that if there is another identifier already defined that has the same name as an access function there is a potential clash. Consider for instance a module called Temp that has been defined using an electrical disicpline. If after this module another module is being defined using the thermal discipline you will have a clash between the Temp as a module name and the Temp as an access function for this new module.

`include "disciplines.vams"

module Temp (a, b);
  electrical a, b;
...
endmodule

module X(a, b);
  thermal a, b;
  ...
  analog Temp(a) <+ Temp(b) + 12.0;
endmodule

However, this looks like a theoretical issue as the definition of the module Temp should already create a clash due to the predefined nature Temperature. Defining the nature Temperature after the module Temp is problematic for a similar reason. The rule also doesn't state what the result is when the access function name has not been added to the module's name space - I would expect a compile-time error.

Anyway, there is no talk of a second access function in the rule - only a second identifier with the same name.

Cheers,
Marq

From: owner-verilog-ams@server.eda.org [mailto:owner-verilog-ams@server.eda.org] On Behalf Of Surya Pratik Saha
Sent: Monday 3 August 2009 9:56
To: verilog-ams@server.eda.org
Subject: Verilog AMS access function namespace

Hi,
Recently I have started to study Verilog AMS to build its analyzer.

I can understand the term "access function" is very important in this language. In the 2.3.1 LRM, it is mentioned:
3.13.2 Access functions
Each access function name, defined before a module is parsed, is automatically added to that module's name space unless there is another identifier defined with the same name as the access function in that module's name space.

I am not clear how another "access function" can be defined inside a module's name space, as I can understand "access function" can only be defined by a "nature" or its related "discipline" which can only be declared outside a module. Can someone please show me an example?


--

Regards

Surya

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Aug 3 12:12:28 2009

This archive was generated by hypermail 2.1.8 : Mon Aug 03 2009 - 12:12:37 PDT