RE: [sv-ec] restriction on typedef on net.

From: Steven Sharp <sharp_at_.....>
Date: Sun Dec 23 2007 - 09:56:44 PST
>From: "Rich, Dave" <Dave_Rich@mentor.com>

>But what if you had 
>
>typedef wire logic w1;
>typedef struct {logic m1; w1 m2} s_t;
>
>Is 
>wire s_t s1; //legal?
>var s_t s2; // illegal?
>
>Now what is supposed to be a data type is carrying more information that
>gets much more complicated to define in the context of parameterized
>data types.

Yes.  This example shows the complexity where you could build a
composite data type where part of the type has the wireness specified
and part does not.  It is not clear whether that is legal, what it
would mean, and how the type is allowed to be used.

The language provides mechanisms for extracting and comparing types.
Is a type that has a "wire" modifier considered the same as the type
without?  If you have a wire of a type, do you need a mechanism for
extracting just the type part, so you can declare a variable of that
type?

It is all much simpler if you don't combine those two distinct concepts
in the first place.

Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Dec 23 09:57:07 2007

This archive was generated by hypermail 2.1.8 : Sun Dec 23 2007 - 09:57:45 PST