Re: [sv-ac] revised 1549

From: John Havlicek <john.havlicek_at_.....>
Date: Mon Oct 01 2007 - 11:46:24 PDT
Hi Doron:

I agree with you on the typos.  I will fix these and upload a new
version shortly.

On 6.24, I think that you are misreading the scope of those rules, 
although I can see why this mistake is easy to make.  Let's look at 
more of the text from 6.24:

   In a static cast, the expression to be cast shall be enclosed in
   parentheses that are prefixed with the casting type and an
   apostrophe. If the expression is assignment compatible with the
   casting type, then the cast shall return the value that a variable of
   the casting type would hold after being assigned the expression. If
   the expression is not assignment compatible with the casting type,
   then if the casting type is an enumerated type, the behavior shall be
   as described as in 6.24.2, and if the casting type is a bit-stream
   type, the behavior shall be as described in 6.24.3.
   
      int'(2.0 * 3.0)
      shortint'({hFA,hCE})
   
   A positive decimal number as a data type means a number of bits to
   change the size.
   
      17'(x - 2)
   
   The signedness can also be changed.
   
      signed'(x)
   
   The expression inside the cast must be an integral value when changing
   the size or signing. When changing the size, the signing shall pass
   through unchanged and the result type shall be a one-dimensional
   packed array with a right bound of zero. When changing the signing,
   the type of the expression to be cast shall pass through unchanged,
   except for the signing.

I think that the first paragraph gives a general rule:

   If the expression is assignment compatible with the casting type,
   then the cast shall return the value that a variable of the casting
   type would hold after being assigned the expression.

I think that the rule you are citing from the last paragraph applies
only to the case of using a positive decimal number as a data type.
I think this because of the way the phrases "change the size" and
"change the signing" have been used to link the ideas.  And it makes
sense to specify a particular representation [n-1:0] when casting to
size n'.

Brad Pierce has commented in response to Shalom that 

   type(logic[1:2])'(e)

has type logic[1:2], not type logic[1:0].

J.H.

> X-ExtLoop1: 1
> X-IronPort-AV: E=Sophos;i="4.21,217,1188802800"; 
>    d="scan'208";a="290384470"
> X-MimeOLE: Produced By Microsoft Exchange V6.5
> Content-class: urn:content-classes:message
> Date: Mon, 1 Oct 2007 16:15:43 +0200
> X-MS-Has-Attach: 
> X-MS-TNEF-Correlator: 
> Thread-Topic: [sv-ac] revised 1549
> Thread-Index: AcgEIo/zimh+pZoaTVuQBzHffXczuwAD3YEQ
> From: "Bustan, Doron" <doron.bustan@intel.com>
> X-OriginalArrivalTime: 01 Oct 2007 14:15:44.0841 (UTC) FILETIME=[8E5EBB90:01C80435]
> 
> Hi John, I have two comments about the formal semantics:
> 
> 1=2E A typo: At F.3.3.1 and F.3.6.1
> 
>    | w j |=3D^d ( T ) iff  w j |=3D T.
>    | w j |=3D^d ( U ) iff  w j |=3D U.
> 
> 
>    Should be
> 
>    | w j |=3D^d ( T ) iff  w j |=3D^d T.
>    | w j |=3D^d ( U ) iff  w j |=3D^d U.
> 
> 
> 
> 2=2E I still have problems with the definition of casting. At 6.24 (p 105)
>    It says:
> 
>    "The expression inside the cast must be an integral value when
> changing   =20
>    the size or signing. When changing the size, the signing shall pass =20
>    through unchanged and the result type shall be a one-dimensional
> packed
>    array with a right bound of zero. When changing the signing, the type
> of  =20
>    the expression to be cast shall pass through unchanged, except for
> the=20
>    signing."
> 
>    The "right bound of zero" requirement might corrupt the item usage.
>    I would consider a 2 operand item function where the second operand
> 
>    specified the type.
> 
> Doron
> 
> -----Original Message-----
> From: owner-sv-ac@server.eda.org [mailto:owner-sv-ac@server.eda.org] On
> Behalf Of John Havlicek
> Sent: Monday, October 01, 2007 1:59 PM
> To: sv-ac@server.eda-stds.org
> Subject: [sv-ac] revised 1549
> 
> Hi Folks:
> 
> I have uploaded to Mantis revisions of the 1549 documents for
> Clause 16 and Annex F.
> 
> They are=20
> 
> 1549_2007-10-01_jh.pdf
> 1549.formal_semantics_arguments_passing.2007-10-01.pdf
> 
> 
> The changes to the Clause 16 document from the previous version
> are small:
> 
> 1=2E Removed "mutatis mutandis".  I couldn't find an easy way to
>    substitute something else, so I just deleted it.
> 2=2E Added a change to relax footnote 21 in A.10 so that $ can be
>    parsed through primary as an entire sequence_actual_arg or
>    property_actual_arg.
> 
> The changes to the Annex F document are more substantial.  There
> have been a number of mails regarding them.  Also, the rewriting
> algorithm description has been reorganized.  Previously, changes
> were done on all arguments and the composition of the steps was
> supposed to work for all cases.  Since exceptions have to be made,
> I thought it would be clearer to split cases and describe the
> changes for each case separately.  I expect that this will also
> make it easier to maintain.
> 
> J=2EH.
> 
> --=20
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> ---------------------------------------------------------------------
> 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 Mon Oct 1 11:47:24 2007

This archive was generated by hypermail 2.1.8 : Mon Oct 01 2007 - 11:47:36 PDT