[sv-bc] Exploding unpacked constructor items

From: Greg Jaxon <Greg.Jaxon@synopsys.com>
Date: Tue Feb 01 2005 - 14:22:12 PST

(partial) Background related to today's discussion of section 4.14.1

During 2004, a few examples were removed from early parts
of section 4 (or perhaps 7.?? Unpacked array expressions)
which had illustrated the use of an unpacked array (or a slice of one)
to represent multiple items in an array constructor expression list.
The were many sources of confusion about where this
syntactic shortcut led. Among them were:

- Once the unpacked elements become list items, shouldn't
   they also be subject to itemwise truncation and extension
   rules?
   int int_UPV[n:0] = {1,2,...,n}
   byte UPV [n:0] = int_UPV ; // illegal, but
   byte UPV [n:0] = { int_UPV }; // legal??
   The wisdom of this was subject to some doubt.

- Shouldn't multiple concatenation syntax be adjusted to
   help produce unpacked vector subsequences to use in these
   situations?
   Although many felt that it should (and I recall seeing
   examples that used it), there was a decidability problem
   when it came to distributing the constructor's type over
   its item list where items are themselves ambiguous {}s. Do
   nested constructors yield a single list item, or multiple
   list items? If you have two, how do you split up their
   responsibilities?

- How should multidimensional packed arrays be treated in
   these constructions? As listed items, are they "exploded"?
   As constructed results, can their leading packed dimension
   be built by exploding sequences of other packed multidimensional
   arrays?

- Depending on how you answer the last question, can
   you convert from packed to unpacked array of bits by saying:
   bit UP[31:0] = { 42 }?

The proponents of this shortcut were sent back to the drawing board
but they did not return with a concrete answer, and the trial
implementations were mothballed.

Greg Jaxon
Received on Tue Feb 1 14:22:15 2005

This archive was generated by hypermail 2.1.8 : Tue Feb 01 2005 - 14:22:29 PST