Re: errata/93: PROPOSAL - Section 17.10.2 errors in the example

From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Mon Jan 06 2003 - 04:30:02 PST

  • Next message: Shalom.Bresticker@motorola.com: "errata/250: A.8.3: Is expression redundant in range_expression?"

    Precedence: bulk

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

    From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
    To: etf-bugs@boyd.com
    Cc:
    Subject: Re: errata/93: PROPOSAL - Section 17.10.2 errors in the example
    Date: Mon, 06 Jan 2003 14:23:31 +0200

    > A good point that I did not think of. The LRM does not specify
    > what should be returned if a conversion fails.
    >
    > Obviously, whoever wrote this section did not consider the
    > possibility that a conversion would fail.
     
     I think the LRM is quite clear that the function returns 0 if there is no
     string match, and non-zero if there is a string match.
     
     The case of an illegal conversion is dealt with explicitly at the end of
     para. 4, and says,
     "If characters exist in the string available for conversion,
     which are illegal for the specified conversion,
     the variable shall be written with the value 'bx."
     
    > The best solution would be to invert the condition code --
    > 0 means "all is well", 1 means "no such string", 2 means
    > "conversion failed".
     
     That would be incompatible with $test$plusargs,
     which has existed for years.
     
     I suggest not to change the currently defined behavior.
     
     Comments on the suggested version of the example:
     
     1. `define STRING [1024*8:0]
     
     should be
     
     `define STRING [1024*8:1]
     
     
     2. module ieee1354_example;
     
     should be
     
     module ieee1364_example ;
     
     
     3. The line "frequency = 8.333330" should be printed in the second case as
     well.
     
     
     4. The line "Running test number x." should be printed in the second case
     as well.
     
     Shalom
     
     --
     Shalom Bresticker Shalom.Bresticker@motorola.com
     Design & Reuse Methodology Tel: +972 9 9522268
     Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
     POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478
     
     "The devil is in the details."
     
     
     



    This archive was generated by hypermail 2.1.4 : Mon Jan 06 2003 - 04:31:28 PST and
    sponsored by Boyd Technology, Inc.