From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Mon Nov 03 2003 - 04:10:00 PST
The following reply was made to PR errata/211; it has been noted by GNATS.
From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: "James A. Markevitch" <jam@magic.com>
Cc: etf-bugs@boyd.com
Subject: Re: errata/211: PROPOSAL - 3.11.2: localparam behavior not clear
Date: Mon, 03 Nov 2003 14:16:47 +0200
The proposal is good.
I would slightly modify it as follows:
> In 3.11.2
>
> Change the reference in the first paragraph from 12.1.3 to 12.2.
Delete this change.
Issue #150 already changed the text to be as follows:
"Verilog HDL localparam - local parameter(s) are identical to parameters except
that they can not directly be modified by defparam statements (see 12.2.1) or
module instance parameter value assignments (see 12.2.2). Local parameters can be
assigned constant expressions containing parameters, which can be modified with
defparam statements or module instance parameter value assignments."
> In 12.2.2.1
>
> Add the following to the end of the section:
>
> Local parameters cannot be overridden, therefore, they are not
> considered part of the ordered list for parameter value assignment.
> In the following example, addr_width will be assigned the value of 12
> and data_width will be assigned the value of 16. mem_size will not be
> explicitly assigned a value due to the ordered list, but will have
> the value 4096 due to its declaration expression.
>
> module my_mem (addr, data);
> parameter addr_width = 16;
> localparam mem_size = 1 << addr_width;
> parameter data_width = 8;
> ...
> endmodule
>
> module top;
> ...
> my_mem #(12, 16) m(addr,data);
> endmodule
>
> In 12.2.3
>
> Add the following sentence between the first and second sentences:
>
> Overriding a parameter, either due a defparam or instantiation
> statement, effectively forces the value of the parameter,
> independent of any expression associated with the parameter
> declaration.
I would reword as follows:
"However, overriding a parameter, whether by a defparam statement or in a module
instantiation statement, effectively forces the parameter to a new value,
regardless of any expression associated with the parameter declaration in the
module definition."
> Add the following sentence to the paragraph:
>
> If memory_size is updated due to either a defparam or instantiation
> statement, then it will take on that value, regardless of the value
> of word_size.
--
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
: Mon Nov 03 2003 - 04:10:04 PST
and
sponsored by Boyd Technology, Inc.