Forwarding from Jonathan Bromley:
----- Forwarded Message -----
From: "Jonathan Bromley" <jonathan.bromley@verilab.com>
To: "Paul Graham" <pgraham@oasys-ds.com>
Sent: Saturday, July 31, 2010 4:34:18 AM
Subject: Re: [sv-bc] Expression size while processing 'inside' construct
Paul,
Once again replying to you in the hope you'll be kind enough to forward it to the reflector.
OK, I have a question -- are the operands to the streaming concatenation self-determined? I would say they are. It seems to me that the whole point of streaming concatenation is to take a value as-is and convert it to a bit-stream to be reconstructed later on. Resizing the value based on the context would defeat the purpose.
I'm asking because I have a pcr against a leading simulator. The simulator developers seem to think that the operand (within the {}) of the streaming concat is sized based on the surrounding context.
It's clear that you've found yet another oversight in my 2009 text :-(
I think this problem almost certainly springs from the phrase
the stream created by the source streaming_concatenation
shall be implicitly cast to the type of the target
in 11.4.14. It has already been noted that this conflicts with the
requirement to left-justify, and it's clearly inappropriate to use
the word "cast" here.
I am in no doubt that the stream_expressions should have
self-determined size. The mechanism for constructing a
generic_stream described in 11.4.14 probably should say
that explicitly, but it in fact appeals to bit-stream casting -
which, in its turn, rather obviously assumes that the size
is self-determined but doesn't say so explicitly.
I would say, though, that there is "reductio ad absurdum"
evidence in favour of self-determined size: what happens
when one of the components of the streaming-concat
is itself a streaming-concat (a possibility explicitly
permitted by the LRM)? How could that inner streaming-
concat possibly have context-determined size?
thanks
Jonathan Bromley
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Sat Jul 31 10:46:44 2010
This archive was generated by hypermail 2.1.8 : Sat Jul 31 2010 - 10:49:13 PDT