[sv-bc] RE: SV 2012: Is forward typedef of nettype supported in SV

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Thu Oct 30 2014 - 00:30:25 PDT
No.
Both typedefs and type parameters use the data_type BNF, which does not include nettypes.

Shalom

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Datta, Kausik
Sent: Thursday, October 30, 2014 09:22
To: sv-bc@eda.org
Subject: [sv-bc] SV 2012: Is forward typedef of nettype supported in SV

Hi,
I have the following queries:


1.       Can NetType be used as forward typedef?

2.       Can NetType be passed in type parameter?

Forward typedef and parameterized type are useful way to declare generic type in SV which can be resolved later. Does this mechanism hold true for NetType also?
Exmaple 1:
...
typedef T;
T obj;
...
nettype logic T;
...

Example 2:
module bot #(type T1, type T2)
                      (input T1 in, output T2 out);
//...
endmodule

module top();
    typedef logic T2;
    nettype logic T1;

    T1 p;
    T2 q;

    bot #(T1, T2) b1 (p, q);
endmodule

Thanks
Kausik



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

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Oct 30 00:31:19 2014

This archive was generated by hypermail 2.1.8 : Thu Oct 30 2014 - 00:32:26 PDT