Re: errata/428: PROPOSAL - 2.5.1, value of 16'shc, request for clarification

From: Shalom.Bresticker@motorola.com
Date: Sun Sep 07 2003 - 08:20:01 PDT

  • Next message: Michael McNamara: "Amended minutes of 2003_8_11 meeting"

    Precedence: bulk

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

    From: Shalom.Bresticker@motorola.com
    To: Brad.Pierce@synopsys.com
    Cc: etf-bugs@boyd.com
    Subject: Re: errata/428: PROPOSAL - 2.5.1, value of 16'shc, request for
     clarification
    Date: Sun, 7 Sep 2003 18:07:22 +0300 (IDT)

     What you write is all correct, but a few points bother me:
     
     - The three notes (with or without the word "NOTE") come after
     an example which depends on them.
     
     - In the first note, the phrase "Sized negative constant numbers
     and sized unsigned constant numbers" is unclear, in that I had
     trouble understanding why it did not simply say
     "sized constant numbers".
     
     - Steven Sharp mentioned an unclear use of the phrase
     "unsigned number".
     
     - More generally, the whole subject of size-extension is not
     described clearly, consistently, and comprehensively in a single
     place in all its aspects. Other issues relating to this are
     #106 and #463, and I think there may be one other.
     
     Shalom
     
     
    > In Example 4 of 2.5.1
    >
    > REPLACE
    >
    > reg[11:0] a, b, c, d;
    > initial begin
    > a = 'h x; // yields xxx
    > b = 'h 3x; // yields 03x
    > c = 'h z3; // yields zz3
    > d = 'h 0z3; // yields 0z3
    > end
    > reg [84:0] e, f, g;
    >
    > e = 'h5; // yields {82{1'b0}, 3'b101}
    > f = 'hx; // yields {85{1'hx}}
    > g = 'hz; // yields {85{1'hz}}
    >
    >
    > WITH
    >
    > reg[11:0] a, b, c, d;
    > initial begin
    > a = 'h x; // yields 12'h xxx
    > b = 'h 3x; // yields 12'h 03x
    > c = 'h z3; // yields 12'h zz3
    > d = 'h 0z3; // yields 12'h 0z3
    > end
    > reg [84:0] e, f, g, h, i;
    > reg signed [84:0] j, k;
    >
    > e = 'h5; // yields {{82{1'b0}}, 3'b101}
    > f = 'hx; // yields {85{1'bx}}
    > g = 'hz; // yields {85{1'bz}}
    > h = 4'hx; // yields {{81{1'b0}}, 4'hx}
    > i = 16'ox; // yields {{69{1'b0}}, {16{1'bx}}}
    > j = 16'sb110; // yields {{82{1'b0}}, 3'b110}
    > k = 3'sb110; // yields {{82{1'b1}}, 3'b110}
    >
    > and
    >
    > REPLACE
    >
    > NOTES:
    >
    > 1) Sized negative constant numbers and sized unsigned
    > constant numbers are sign-extended when assigned to a
    > reg data type, regardless of whether the reg itself is
    > signed or not.
    >
    > 2) Each of the three tokens for specifying a number
    > may be macro substituted.
    >
    > 3) The number of bits that make up an unsized number
    > (which is a simple decimal number or a number without
    > the size specification) shall be at least 32.
    >
    > WITH
    >
    > Sized negative constant numbers and sized unsigned
    > constant numbers shall be sign-extended when assigned to a
    > reg data type, regardless of whether the reg itself is
    > signed or not.
    >
    > It shall be legal to macro substitute the three tokens
    > for specifying a number.
    >
    > The number of bits that make up an unsized number
    > (which is a simple decimal number or a number without
    > the size specification) shall be at least 32.
    >
    > http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&pr=428
    >
     
     --
     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
     
     



    This archive was generated by hypermail 2.1.4 : Sun Sep 07 2003 - 08:22:47 PDT and
    sponsored by Boyd Technology, Inc.