errata/483: PROPOSAL - 4.2: Bit/part-selects of parameters

From: Shalom.Bresticker@freescale.com
Date: Tue Nov 09 2004 - 08:11:59 PST

  • Next message: Shalom.Bresticker@freescale.com: "errata/609: PROPOSAL - string should be a primary not an expression"

    2004-11-09: I added more explicit language in 3.11.2 and in
    4 to clarify that localparams and specparams can use selects
    as well. In 4, I also added strings to list of operands
    (see issue 609).

    2004-11-08: I added to the proposal an additional change in
    the BNF of constant_primary to support bit- and part-selects
    of specify parameters. Shalom

    0. Add references to 487 and 489 to see further discussion
    in 483.

    1. Section 3.3.1 ("Specifying vectors") ends as follows:

    "NOTES:

    1) Implementations may set a limit on the maximum length of a vector,
    but they will at least be 65536 (2**16) bits.

    2) Implementations do not have to detect overflow of integer operations."

    Since NOTES are not normative, CHANGE these to:

    "Implementations may set a limit on the maximum length of a vector,
    but the limit shall be at least 65536 (2**16) bits.

    Implementations are not required to detect overflow of integer operations."

    2. In section 3.3.2 ("Vector net accessibility"),

    CHANGE the last sentence from

    "If the keyword <b>scalared</b> is used, bit-selects and part-selects of the
    object shall be permitted, and the PLI shall consider the object
    <i>expanded</i>."

    TO

    "If the keyword <b>scalared</b> is used or if neither <b>scalared</b> nor
    <b>vectored</b> is used, bit-selects and part-selects of the
    object shall be permitted, and the PLI shall consider the object
    <i>expanded</i>."

    Also ADD to the Examples the following:

    reg [31:0] bus32 ; // a bus that will be expanded

    3. Section 3.6 is "Net initialization". The corresponding text for variables is
    in 3.2.2 ("Variable declarations").

    The proposal is to delete this sub-section and move its text to be a new
    paragraph at the end of 3.2.1 ("Net declarations").

    4. In 3.9 ("Integers, reals, times, and realtimes"),
    ADD a new paragraph after the paragraph beginning "The time variables...".

    The new paragraph is:

    "Bit-selects and part-selects of vector regs, integer variables, and time
    variables shall be allowed (See 4.2)."

    CHANGE

    "NOTE--Implementations may limit the maximum size of an integer variable,
    but they shall at least be 32 bits."

    TO

    "Implementations may limit the maximum size of integer variables,
    but it shall be at least 32 bits."

    5. In 3.11.1 ("Module parameters"), ADD a new paragraph at the end, but
    before the Examples. The new paragraph is:

    "Bit-selects and part-selects of parameters which are not of type <b>real</b>
    shall be allowed (See 4.2)."

    5A. In 3.11.2 ("Local parameters - localparam"), ADD a new
    paragraph after the first paragraph as follows:

    "Bit-selects and part-selects of local parameters which are
    not of type <b>real</b> shall be allowed (See 4.2)."

    6. In 3.11.3 ("Specify parameters"), ADD a new paragraph before the first
    "Examples:". The new paragraph is:

    "Bit-selects and part-selects of specify parameters which are not of type
    <b>real</b> shall be allowed (See 4.2)."

    7. In the introduction to Section 4, paragraph 3 contains,

    "The operands of a constant expression consist of constant numbers,
    parameter names, constant bit-selects of parameters, constant part-selects
    of parameters, and constant function calls (see 10.3.5) only, ..."

    CHANGE this to:

    "The operands of a constant expression consist of constant numbers,
    parameters, constant bit-selects and part-selects of parameters,
    and constant function calls (see 10.3.5) only, ..."

    8. Paragraph 5 says,

    "An operand can be one of the following:

    -- Constant number (including real)
    -- Net
    -- Variables of type reg, integer, time, real, and realtime
    -- Net bit-select
    -- Bit-select of type reg, integer, and time
    -- Net part-select
    -- Part-select of type reg, integer, and time
    -- Array element
    -- A call to a ... function ..."

    CHANGE this to:

    "An operand can be one of the following:

    -- Constant number (including real) or string
    -- Parameter (including local and specify parameters)
    -- Parameter (not real) bit-select or part-select (including local and specify parameters)
    -- Net
    -- Net bit-select or part-select
    -- <b>reg</b>, <b>integer</b>, or <b>time</b> variable
    -- <b>reg</b>, <b>integer</b>, or <b>time</b> variable bit-select or part-select
    -- <b>real</b> or <b>realtime</b> variable
    -- Array element
    -- Array element bit-select or part-select
    -- A call to a ... function ..."

    9. In Table 4-1, add a new row after the first row:

    -------------------------------------
    | unary + unary - | Unary operators |
    -------------------------------------

    10. In Section 4.2 ("Operands"), CHANGE the 3 paragraphs from:

    "There are several types of operands that can be specified in expressions.
    The simplest type is a reference to a net or a variable in its complete form --
    that is, just the name of the net or variable is given. In this case, all
    of the bits making up the net or variable value shall be used as the operand.

    If a single bit of a vector net, reg variable, integer variable, or time
    variable is required, then a bit-select operand shall be used. A part-select
    operand shall be used to reference a group of adjacent bits in a vector net,
    vector reg, integer variable, or time variable.

    A memory word can be referenced as an operand. A concatenation of other
    operands (including nested concatenations) can be specified as an operand.
    A function call is an operand."

    TO

    "There are several types of operands that can be specified in expressions.
    The simplest type is a reference to a net, variable or parameter in its complete
    form -- that is, just the name of the net, variable or parameter is given.
    In this case, all of the bits making up the net, variable or parameter value
    shall be used as the operand.

    If a single bit of a vector net or reg, integer or time variable, or parameter
    is required, then a bit-select operand shall be used. A part-select
    operand shall be used to reference a group of adjacent bits in a vector net
    or reg, integer or time variable, or parameter.

    An array element or a bit-select or part-select of an array element can be
    referenced as an operand. A concatenation of other
    operands (including nested concatenations) can be specified as an operand.
    A function call is an operand."
    11. In 4.2.1 ("Vector bit-select and part-select addressing")
    CHANGE the beginning from:

    "Bit-selects extract a particular bit from a vector net, vector reg,
    integer variable, or time variable. The bit can be addressed using an
    expression. If the bit-select is out of the address bounds or the bit-select
    is x or z, then the value returned by the reference shall be x. A bit-select
    or part-select of a scalar, or of a variable declared as real or realtime,
    shall be illegal.

    Several contiguous bits in a vector net, vector reg, integer variable,
    or time variable can be addressed and are known as part-selects."

    TO:

    "Bit-selects extract a particular bit from a vector net or reg,
    integer or time variable, or parameter. The bit can be addressed using an
    expression. If the bit-select is out of the address bounds or the bit-select
    is x or z, then the value returned by the reference shall be x. A bit-select
    or part-select of a scalar, or of a variable or parameter of type real or
    realtime, shall be illegal.

    Several contiguous bits in a vector net or reg, integer or time variable,
    or parameter can be addressed and are known as part-selects."

    12. In paragraph 4, CHANGE

    "An indexed part-select of a vector net, vector reg, integer variable, or time
    variable is given with the following syntax"

    TO:

    "An indexed part-select of a vector net or reg, integer or time variable,
    or parameter is given with the following syntax"

    13. In paragraph 6, CHANGE

    "Part-selects of any type that address a range of bits that are completely
    out of the address bounds of the net, reg, integer, or time, ..."

    TO:

    "Part-selects of any type that address a range of bits that are completely
    out of the address bounds of the net, reg, integer, time or parameter ..."

    14. Note: In all these places, "reg", "integer", "time" and "parameter"
    should be bold. "net" should not be bold.

    15. In Syntax 4-2 and A.8.4, in the constant_primary production,
    CHANGE
     
        | parameter_identifier
        | specparam_identifier
     
    TO
     
        | parameter_identifier { <b>[</b> constant_range_expression <b>]</b> }
        | specparam_identifier { <b>[</b> constant_range_expression <b>]</b> }

    http://wa.boyd.com/cgi-bin/issueproposal.pl?cmd=view&database=default&pr=483



    This archive was generated by hypermail 2.1.4 : Tue Nov 09 2004 - 08:12:14 PST and
    sponsored by Boyd Technology, Inc.