RE: [sv-bc] Is '1 allowed in a concatenation?

From: Rich, Dave <Dave_Rich@mentor.com>
Date: Mon Mar 22 2010 - 13:09:48 PDT

Shalom,

To me, this is a simple merge related issue. In fact, the first
paragraph of 5.7.1 is now wrong because there are now THREE forms to
express integer literal constants: a simple decimal number, a based
literal constant, and the bit filling literal added by SV.

The pre-SV text in Section 11.4.12 is excluding all literal with an
explicit size constant because all other forms at the time did not have
a deterministic size. Plus I think people were confused writing 'hFF and
expecting to have it take up only 8 bits.

'1 in the absence of a context is understood to be 1'b1, as well as
looking like a single bit, so there is no confusion in allowing it in a
concatenation. Plus it is already allowed in a number of implementations
and we (mentor) would not be in favor of making it illegal.

Dave

> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> Bresticker, Shalom
> Sent: Monday, March 22, 2010 7:47 AM
> To: Cliff Cummings; sv-bc@eda.org
> Subject: RE: [sv-bc] Is '1 allowed in a concatenation?
>
> Hi, Cliff.
>
> It is clear that if '1 is legal in a concatenation, then it is a
single
> bit.
> The question is whether it is legal.
>
> At best, the LRM is ambiguous about it.
>
> Since 11.4.12 says that unsized constants are not allowed in
> concatenations and 5.7.1 calls '1 unsized, it is reasonable to
conclude
> that it is not legal. As pointed out, a simple unsized constant is
also
> not allowed even though its size is well-defined (32 bits).
>
> Regards,
> Shalom
>
> > -----Original Message-----
> > From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On
> > Behalf Of Clifford E. Cummings
> > Sent: Monday, March 22, 2010 4:40 PM
> > To: sv-bc@eda.org
> > Subject: Re: [sv-bc] Is '1 allowed in a concatenation?
> >
> > Hi, Shalom -
> >
> > There may be a wording problem in the standard, but adding '1 or '0
> > to a concatenation is the same as adding 1'b1 or 1'b0.
> >
> > I point this out as an exception to '0 and '1 expansion in my
> > training classes.
> >
> > Rationale:
> > What would be expected if you had declared:
> > logic [15:0] data1 = {'1,8'hAA};
> > logic [15:0] data2 = {8'hAA, '1};
> > logic [15:0] data3 = {'0, 8'hAA,'0, '1};
> >
> > There would have to be some rather interesting assumptions on the
> > part of the compiler to determine the intended size of the '0 or '1
> > expansion, including a number of special cases. The assumptions
might
> > not be obvious to an end user and debugging these declarations might
> > be rather time-consuming.
> >
> > It was just easier to say that in these self-determined contexts,
> > each '1 or '0 is just a single bit.
> >
> > Regards - Cliff
> ---------------------------------------------------------------------
> 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.
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Mar 22 13:10:49 2010

This archive was generated by hypermail 2.1.8 : Mon Mar 22 2010 - 13:10:52 PDT