Re: [sv-bc] Comments on SV-BC 254 Aggregate expressions -> constructors

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Fri Oct 08 2004 - 17:29:51 PDT

Dave,

The good news is that we seem to agree on what's legal and what's not,
so it's probably just a question of wordsmithing.

In the language of 5.6, "A continous assignment is implied when a
variable is connected to the output port of an instance." I feel that
an assignment is implied in some other situations, too.

>In your re-write I think there is one change in wording that I don't agree
>with. I think there is a substantial difference between the concepts
>'right-hand value in an assignment' and 'in the context of an assignment'.
>
>For example, in the declaration below that I consider to be legal:
>
>struct {int A; struct {int a, b;} ab;} a_ab = {1, {2,3}};

I think of the inner {2,3} as being assigned to a field of type

          struct {int a, b;}

In the language of the proposal "In an aggregate constructor or packed
structure constructor ... each member expression shall be ... evaluated
as if it were the right-hand value of an assignment to a variable of
that type."

>Or in a similar example
>
>typedef struct {int value1, value2;} strong_int;
>
>function strong_int foo( input strong_int arg1);
>...
>endfunction
>
>strong_int A = foo( {1,2} );

I think of copying the value of into arg1 as an assignment.

I'm willing to be corrected about these kinds of situations not being
assignments, but then I don't see the difference between "in the context
of an assignment" and "the right-hand value of an assignment". If these
situations are not assignments, then we are not in the context of
an assignment. Maybe we could think of a third way to phrase this
which is better than both?

-- Brad
Received on Fri Oct 8 17:29:57 2004

This archive was generated by hypermail 2.1.8 : Fri Oct 08 2004 - 17:30:04 PDT