[sv-ec] Redefinition of type identifiers defined within an interface

From: Kakoli Bhattacharya <kakoli_at_.....>
Date: Wed Sep 10 2008 - 22:52:52 PDT
Hello,

According to the LRM
"User-defined type identifiers have the same scoping rules as data identifiers,
 except that hierarchical refer-ence to type identifiers shall not be allowed.
 References to type identifiers defined within an interface through ports are 
 allowed provided they are locally redefined before being used."

As far as I have understood the following eg is ok:

interface intf;
typedef int myint;
endinterface

module top(*intf i*);
typedef i.myint newint;
newint a;
endmodule

But suppose I define the top module as follows:

module top();
*intf i;*
typedef i.myint newint;
newint a;
endmodule

i.e, If I use an instance name instead of a port then should it be an error?

Some of the standard tools are passing both the types but some are giving 
error for the 2nd case.

Regards,
Kakoli





-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Sep 10 23:03:37 2008

This archive was generated by hypermail 2.1.8 : Wed Sep 10 2008 - 23:04:23 PDT