RE: [sv-bc] part selects on arbitrary expressions

From: Feldman, Yulik <yulik.feldman_at_.....>
Date: Sun Mar 11 2007 - 01:32:12 PST
I see that this section (I assume it is 5.5.1 in 1364-2005) specifies
the signedness, but I don't see where it specifies whether the result
should be a scalar or a vector. 

Nevertheless, a simple scalar/vector categorization is clearly
insufficient due to several reasons:

1. A selection of a multidimensional array that doesn't select all
array's dimensions should be a multidimensional array, not a
scalar/vector.

2. In SV, the data type of the result may be any user-defined type (such
as struct/union/enum); not only a scalar/vector. 

3. In SV, where array query system functions are introduced, if the data
type is a vector/array, it is also important to specify the bounds of
the selection are. I.e. for a selection a[5:4], whether the bounds are
"original" [5:4], the "normalized" [1:0], or any other specification.

4. The specification should make it clear whether the data type of a bit
select or a part select selecting one element is one element of the
selected type (which doesn't have to be a scalar) or an array of one
such element.

5. In SV, the type of an array-like selection (a[5:4]) from a packed
struct/union should also be specified.

6. In SV, aside the signedness, it is also important to known whether
the returned array type is packed or not.

There are probably other points to consider in the specification; this
is just a partial list.

--Yulik.

-----Original Message-----
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On
Behalf Of Michael (Mac) McNamara
Sent: Thursday, March 08, 2007 12:53 AM
To: Brad Pierce; sv-bc@server.eda-stds.org
Subject: RE: [sv-bc] part selects on arbitrary expressions

1364 defines the type of bit and part selects to be unsigned scalars and
vectors, respectively (Section 4.5.1 of 1364-2001-C), This section also
defines the type of a concatenate operation to be unsigned. 

Extending part selects to operate on complex types would require
evaluation of its implication on this as well.  But the good news is the
type of part and bit selects are currently well defined.

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Brad
Pierce
Sent: Wednesday, March 07, 2007 2:11 PM
To: sv-bc@eda-stds.org
Subject: Re: [sv-bc] part selects on arbitrary expressions

A type reference such as type(A[7:4]) can be used in a comparison
controlling a generate (as described in 6.10 and 6.9.1).  And it appears
to be legal to ask for $left(type(A[7:4])).  Plus, there's always the
$typename() function of 22.2.

So the meaning of a legal SV program could easily depend on knowing the
exact type of the result of a part-select.  It's not in general enough
to only know the size of that type.

If the LRM has not fully specified the result types of part-selects yet,
that's a serious gap.

Likewise for the result types of the arithmetic operators.

-- Brad




--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Mar 11 01:33:10 2007

This archive was generated by hypermail 2.1.8 : Sun Mar 11 2007 - 01:33:33 PST