Re: [sv-bc] Deadline for detailed feedback on Data Types on Nets Proposal

From: Kevin Cameron <kcameron@altera.com>
Date: Mon Nov 15 2004 - 14:34:46 PST

Mark Hartoog wrote:

>>I tend to agree that 'reg' should not be a data type and that it
>>would be better to use 'reg' instead of 'var'.
>>
>>Could someone please remind us again of the arguments for keeping
>>'reg' as a data type that is equivalent to 'logic'?
>>
>>
I think it was sloppy usage in SuperLog that got grandfathered into SV.

>I'm not sure what the history of arguments on this are, but this
>declaration, which is now legal would become illegal:
>
>typedef struct { reg a; } ST;
>ST s;
>
>Since the fields of a struct are not variables but only data types.
>
>
I would have thought the struct is a data-type and if it is used as a
variable then the individual fields would also be variables?

If you view a struct as just a collection of objects then I would expect
the object s.a to behave the same as (say) "reg s_a", so why would
it be illegal?

If you consider reg as a declaration of a driver &
signal/signal-reference (which I do) then I think you would have
disallow associating a struct with a net if it contains reg types, but
I don't see a reason for not allowing references to it or other variable
usage.

Kev.

-- 
Altera Corp, 101 Innovation Drv, San Jose, CA 95134. T# (408) 544 7126
Received on Mon Nov 15 14:34:53 2004

This archive was generated by hypermail 2.1.8 : Mon Nov 15 2004 - 14:35:07 PST