From: Shalom.Bresticker@freescale.com
Date: Sat Nov 06 2004 - 13:30:00 PST
The following reply was made to PR errata/483; it has been noted by GNATS.
From: Shalom.Bresticker@freescale.com
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/483: PROPOSAL: 4.2: Bit/part-selects of parameters
Date: Sat, 6 Nov 2004 23:36:45 +0200 (IST)
The following was the original issue:
> Sections 4.2 and 4.2.1 should mention that it is possible to take
> the bit- and part-select of parameters that are not declared
> real or realtime.
>
> And in constant_primary the parameter_identifier production should
> be changed to something like --
>
> | parameter_identifier
> [ {"[" constant_expression "]" }
> "[" constant_range_expression "]"
> ]
>
> Also, is it true that any constant_primary is also a primary?
> This is not obvious from the BNF.
During the ensuing discussion, there was also a tangential discussion of
the 'type' of a parameter.
I think this issue should be split into 2 separate ones.
The following is a proposal to deal with the original issue.
At the same time, it also makes a few more semi-related changes.
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)."
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)
-- Parameter
-- Parameter (not real) bit-select or part-select
-- 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.
15. In A.8.4, and wherever else the constant_primary production appears
CHANGE
| parameter_identifier
TO
| parameter_identifier { <b>[</b> constant_range_expression <b>]</b> }
Wow! I made it!
--
Shalom Bresticker Shalom.Bresticker @freescale.com
Design & Verification Methodology Tel: +972 9 9522268
Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478
This archive was generated by hypermail 2.1.4
: Sat Nov 06 2004 - 13:30:20 PST
and
sponsored by Boyd Technology, Inc.