Re: errata/454: 2.3.1: 2'sb0000000_10 == 2'sb10 ?

From: Steven Sharp (sharp@cadence.com)
Date: Sat Aug 30 2003 - 16:20:01 PDT

  • Next message: Shalom Bresticker: "Re: errata/454: 2.3.1: 2'sb0000000_10 == 2'sb10 ?"

    Precedence: bulk

    The following reply was made to PR errata/454; it has been noted by GNATS.

    From: Steven Sharp <sharp@cadence.com>
    To: etf-bugs@boyd.com
    Cc:
    Subject: Re: errata/454: 2.3.1: 2'sb0000000_10 == 2'sb10 ?
    Date: Sat, 30 Aug 2003 19:10:10 -0400 (EDT)

    >In a numerical constant, if the unsigned number is larger than
    >the size specified for the constant, is the unsized number
    >truncated, losing the bits on the left?
     
     Well, the size of the resulting constant definitely has to be the size
     that was specified. That much is clear in the LRM. How the value of
     those bits are determined in this situation is not clear. Truncation
     would be consistent with all other related situations in the language.
     
     I would expect a tool to at least provide a warning in this situation.
     It would not be unreasonable to consider this to be illegal syntax and
     produce an error. However, Verilog-XL just produces a warning and
     truncates. The result is as you suggested.
     
     Steven Sharp
     sharp@cadence.com
     



    This archive was generated by hypermail 2.1.4 : Sat Aug 30 2003 - 16:20:29 PDT and
    sponsored by Boyd Technology, Inc.