> I would suggest to normalize the range to the (0,N-1) bounds, but to > decide on either [0:N-1] or [N-1:0] choice based on the kind of type > declaration from which the part select selects a part. If the MSB of the > type declaration is bigger than LSB, then use [N-1:0] type for the part > select; otherwise, use the [0:N-1] type. This way the order of "element > significance" will be preserved. Normalize, but conserve endianness - that is a new proposal! Looking at only classical part selects, it is even pretty reasonable. Could you write out the result type for A[X+:L] and A[X-:L], please? Do you want it to take endianness from the +/- syntax, or from A? [Yulik] From A. The +/- is just a syntactical convention. It should not affect the type - in the same way that it doesn't affect the choice of whether X is going to be the LSB or MSB of the selection - this choice depends only on the type of A. Fortunately we're disputing a pretty minor point in the LRM. How often are the results of part selects re-indexed anyway? [Yulik] Not often, but still we need to have definition that takes that into account if it happens. BTW, the reason I'm suggesting this "endianness conservation" is because today it is enough to compare the types of the expressions being assigned to decide on what bit should go where. If the endianness will not be preserved in the types of the part selects, there will be a need to also to look on the expressions themselves and check whether they are part selects and what is the endianness of the types of the objects they select. By having endianness preserved, the choice is going to be simpler and consistent with the rest of expression kinds. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed, 14 Mar 2007 10:42:06 +0200
This archive was generated by hypermail 2.1.8 : Wed Mar 14 2007 - 01:43:30 PDT