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

From: Brad.Pierce@synopsys.com
Date: Mon Oct 27 2003 - 23:00:13 PST

  • Next message: Shalom.Bresticker@motorola.com: "errata/209: Re: errata/209: hierarchical_identifier"

    In 2.5.1, in the first paragraph, REPLACE

       "The second form specifies a sized constant"

    WITH

       "The second form specifies a based constant"

    In 2.5.1, at the end of the first paragraph, append
    the following sentence --

      "It shall be legal to macro substitute these
       three tokens."

    In 2.5.1, at the end of the paragraph beginning
    "The first token", append the following sentence --

      "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."

    In 2.5.1, at the end of the paragraph beginning
    "Simple decimal numbers", append the following sentence --

       "Sized constant numbers shall be sign-extended
       when assigned to a reg data type, regardless of
       whether the reg itself is signed or not."

    In 2.5.1, in the paragraph beginning "If the size
    of the unsigned number", REPLACE

       "If the size of the unsigned number is smaller
        than the size specified for the constant, the
        unsigned number shall be padded to the left
        with zeros. If the leftmost bit in the unsigned
        number is an x or a z, then an x or a z shall
        be used to pad to the left respectively."

    WITH

       "If the size of the third token is smaller
        than the size specified for the constant, the
        the token shall be padded to the left
        with zeros, unless the leftmost bit in the token
        is an x or a z, in which case x's or z's shall
        be used to pad to the left respectively."

    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

    REMOVE

    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.

    http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&database=default&pr=428



    This archive was generated by hypermail 2.1.4 : Mon Oct 27 2003 - 23:00:37 PST and
    sponsored by Boyd Technology, Inc.