RE: [sv-bc] Type of a concat expression

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Fri Jun 18 2010 - 02:26:01 PDT

The description of casting says,

"When changing the size, the cast shall return the value that a packed array type with a single [n-1:0] dimension would hold after being assigned the expression, where n is the cast size. The signedness shall pass through unchanged, i.e., the signedness of the result shall be the self-determined signedness of the expression inside the cast. The array elements shall be of type bit if the expression inside the cast is 2-state, otherwise they shall be of type logic.

When changing the signing, the cast shall return the value that a packed array type with a single [n-1:0] dimension would hold after being assigned the expression, where n is the number of bits in the expression to be cast ($bits(expression)). The signedness of the result shall be the signedness specified by the cast type. The array elements shall be of type bit if the expression inside the cast is 2-state; otherwise, they shall be of type logic."

Shalom

> -----Original Message-----
> From: Steven Sharp [mailto:sharp@cadence.com]
> Sent: Monday, June 14, 2010 10:32 PM
> To: Bresticker, Shalom; spsaha@cal.interrasystems.com
> Cc: sv-bc@eda.org; pradip@cal.interrasystems.com;
> sghosh@cal.interrasystems.com
> Subject: Re: [sv-bc] Type of a concat expression
>
> The responses so far have covered all aspects of the type of
> an expression
> except the range. The LRM allows concatenations to be
> indexed as if they
> were packed arrays with a range [width-1:0]. It is
> reasonable to assume
> that this is also how type() would treat it.
>
> Other expressions cannot be indexed, so this was apparently
> never specified
> for them. Since comparisons of type() are based on matching
> types, and that
> includes comparisons of the ranges, their range becomes
> significant, and
> should have been specified. I assume everyone would agree
> that it should
> be specified the same way as concatenations, as [width-1:0]
>
>
> Steven Sharp | Architect | Cadence
>
> P: 508.459.1436 M: 774.535.4149 www.cadence.com
>
>
>
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Jun 18 02:27:02 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 18 2010 - 02:29:57 PDT