RE: [sv-bc] Doubts on Streaming Operator

From: Rich, Dave <Dave_Rich_at_.....>
Date: Thu Jan 04 2007 - 10:09:20 PST
As long as all the operands inside the streaming operator have fixed
sizes types and any 'with' clause is a constant range, I don't see any
problem making the result a self-determined type.

Dave

> -----Original Message-----
> From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org]
On
> Behalf Of Brad Pierce
> Sent: Thursday, January 04, 2007 9:49 AM
> To: sv-bc@server.eda-stds.org
> Subject: RE: [sv-bc] Doubts on Streaming Operator
> 
> But "int j = {>>{a,b,c}};" is an assignment-like context.  The
question
> is whether a streaming_concatenation can occur outside of such a
> context.  There are no examples of such usage in the LRM, and I have
> trouble reconciling the error messaging requirements of 8.17 with the
> viewpoint that a streaming_concatenation has a self-determined type.
I
> contend that a streaming_concatenation is more closely analogous to an
> assignment_pattern than to a concatenation.
> 
> -- Brad
> 
> -----Original Message-----
> From: Bresticker, Shalom [mailto:shalom.bresticker@intel.com]
> Sent: Thursday, January 04, 2007 12:04 AM
> To: Brad Pierce; sv-bc@eda-stds.org
> Subject: RE: [sv-bc] Doubts on Streaming Operator
> 
> Why should that be?
> 
> If we have an example
> "int j = {>>{a,b,c}}; // error: j is 32 bits < 96 bits"
> 
> that seems to imply that the streaming_concatenation does have a
> definite type.
> 
> In an assignment pattern, the contents of the pattern are interpreted
> according to the context. That does not seem to be the case with a
> streaming concatenation.
> 
> So why indeed should it require a cast?
> 
> By the way, 8.17 has examples like
> "{<<{8'b0011_0101}} // generates stream 'b1010_1100 (bit reverse)".
> 
> The notation in the comment "'b1010_1100" is an unsized literal,
> implying it is at least 32 bits. I don't think that was the intention.
> 
> Shalom
> 
> 
> > Regarding your first question, in
> >
> >    http://www.eda-stds.org/svdb/bug_view_page.php?bug_id=0001526
> >
> > I claimed it is not semantically correct, writing --
> >
> >    Streaming concatenation, like assignment pattern, has no
> > self-determined type
> >
> >    The description in 8.17 that "The stream is not an integral
value;
> to
> > participate in an expression, a cast is required." is both confusing
> and
> > incomplete.
> >
> >    Instead it should echo the text in 8.13 and say something like --
> "A
> > streaming concatenation has no self-determined data type, but can be
> > used as one of the sides in an assignment-like context when the
other
> > side has a self-determined data type or as the operand in a static
> > cast."
> 
> --
> 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 Thu Jan 4 10:09:48 2007

This archive was generated by hypermail 2.1.8 : Thu Jan 04 2007 - 10:09:55 PST