Subject: Packed structure initialization/assignment
From: Gordon Vreugdenhil (gvreugde@synopsys.com)
Date: Mon Oct 14 2002 - 08:38:37 PDT
Given some packed structure type and a variable declaration of the
form:
Packed_struct_type packed_var = {1,2,3,4,5,6,7,8,9};
it is not clear whether the {...} expression should be interpreted
as a concat or a structure.
My thoughts on the options:
1) "prefer" to treat this as a structure but allow that only if
the self-determined properties of each element match the
fields.
2) always require this to be a concat unless coerced.
3) always require this to be a concat.
The problem is that the interpretation of {...} must now appeal
to the LHS of the assignment or initialization. I don't particularly
like that but don't see any way to avoid it. Even in the
coercion case, one must figure out that
Packed_struct_type'{....}
is supposed to be a structural creation field-by-field versus a
concat followed by coercion of the bitvector to the packed field type.
Gord.
-- ---------------------------------------------------------------------- Gord Vreugdenhil gvreugde@synopsys.com Staff Engineer, VCS (Verification Tech. Group) (503) 547-6054 Synopsys Inc., Beaverton OR
This archive was generated by hypermail 2b28 : Mon Oct 14 2002 - 08:39:06 PDT