Re: [sv-bc] issue 14


Subject: Re: [sv-bc] issue 14
From: Dave Rich (David.Rich@synopsys.com)
Date: Wed Nov 26 2003 - 14:39:24 PST


Françoise,

If I say

typedef bit node;

Is that a definition or an alias? Isn't an alias a definition also.

If you treat an interface more like a type, and less like a module,
referring to a type is not a true XMR/OOMR/NID/XREF. Since the interface
must be connected to an instance declaration, the resolution is no
different than that of a type parameter.

FYI, the reason the typedef is needed at all is syntactical, I am told.

Dave

Francoise Martinolle wrote:

> We talked about this issue at the last meeting and we said that if a
> type is defined in an interface and used in a module which passes this
> interface as aport, this type must be redefined locally.
>
> I thought we meant that we needed an actually redefinition of the type
> but when I looked at the example given it shows an alias of the type
> and not a redefinition.
> interface intf_i;
> typedef int data_t;
> endinterface
>
> module sub(intf_i_i p)
> typedef p.data_t my_data_t;
> my_data_t data; //type of 'data'' will be int when connected to
> interface above
> endmodule
>
> Instead of typedef p.data my_data_t; This is just creating an alias
> without saying anything about the actual type.
>
> I would have expected to find the typedef REDEFINED in the module as
> an int so that we know it is an int without having to elaborate the
> interface.
>
> typedef int p.data_t; This is telling me that the type data_t defined
> in the interface p is an int.
>
> Otherwise we still have XMR to typedefs.
>
> Francoise
> '
>
>

-- 
--
David.Rich@Synopsys.com
Technical Marketing Consultant
http://www.SystemVerilog.org
tele:  650-584-4026
cell:  510-589-2625



This archive was generated by hypermail 2b28 : Wed Nov 26 2003 - 14:40:14 PST