RE: Comment on Issue 211

From: Michael McNamara (mac@verisity.com)
Date: Mon Aug 11 2003 - 16:19:09 PDT

  • Next message: Steven Sharp: "RE: Comment on Issue 211"

    Precedence: bulk

    Section 12.2 talks about overriding parameters. It never mentions
    localparams.

    The localparam is a new datatype introduced with 1364-2001, defined in
    Section 3.11.2.

    Section 3.11.2 clearly specifies that the value of localparams can not
    be overridden using the specific methods that apply to parameters.

    I quote:

      3.11.2 Local parameters - localparam

      Verilog-HDL localparam - local parameter(s) are identical to
      parameters except that they can not directly be modified with the
      defparam statement or by the ordered or named parameter value
      assignment. Local parameters can be assigned to a constant
      expression containing a parameters which can be modified with the
      defparam statement or by ordered or named parameter value
      assignment. See section 12.1.3 for details.

    So I believe the LRM is self consistent in this case, with the
    exception that the reference to 12.1.3 in Section 3.11.2 should
    instead point to 12.2

    I also note (again) that an index and/or a table of contents that went
    down two levels (which was contained in the DRAFT 6 which we all
    approved) would have helped your team immensely in getting this
    correct the first time.

    -mac

    Brophy, Dennis writes: > Precedence: bulk
    >
    > All,
    >
    > In regards to issue 211 we discussed this morning, the implementation of localparam in ModelSim appears to be consistent with the LRM. It may be that the words which appear in the LRM do not match the intent of the team.
    >
    > In 12.2.2.1, the override of values by an ordered list shall follow the order of declaration. When a localparam is sandwiched between two other non-local parameters, it is not possible to pass in the two parameters since the second value would be targeted to the localparam by LRM definition.
    >
    > If the intention was to "skip" a localparam, the LRM needs to be modified. Otherwise, a compliant implementation should issue an error. That is, the code shown in 211 should be flagged as an error and I think the LRM is clear on that point:
    >
    > 12.2.2.1 Parameter value assignment by ordered list
    >
    > The order of the assignments in the module instance parameter value
    > assignment by ordered list shall follow the order of declaration of
    > the parameters within the module. It is not necessary to assign values
    > to all of the parameters within a module when using this method. However,
    > it is not possible to skip over a parameter.
    >
    > -Dennis
    >
    > --
    > Dennis Brophy Email: dennisb@model.com
    > Director of Strategic Business Development Phone: +1 503-685-0893
    > Model Technology Fax: +1 503-685-0923
    > 8005 Boeckman Rd, Bldg E-4 Mobile: +1 503-706-8987
    > Wilsonville, OR 97070-7777 Home Fax: +1 503-579-2664



    This archive was generated by hypermail 2.1.4 : Mon Aug 11 2003 - 13:30:06 PDT and
    sponsored by Boyd Technology, Inc.