Re: Clause 4

From: Paul Floyd <Paul_Floyd_at_.....>
Date: Wed Jul 02 2008 - 08:17:55 PDT
Bresticker, Shalom wrote:

Shalom,

>If I understand you, you are referring to use of concatenation for array
>literals.
>  
>

Yes, mostly.

>I had previously commented (on a previous draft) that in SV, such forms
>require the brackets to be prefixed by an apostrophe and are not called
>concatenations.
>
>On Clause 3, I commented thus:
>
>"The BNF non-terminal constant_concatenation is used for array
>initialization, as in real_type and variable_type in Syntax 3-1,
>param_assignment in Syntax 3-2, net_assignment in Syntax 3-6, for
>example. 
>
>That non-terminal is missing the apostrophe preceding the curly brackets
>that 3.4 says is needed: "For parameters defined as arrays, the
>initializer shall be a constant_param_arrayinit expression which is a
>list of constant expressions containing only constant numbers and
>previously defined parameters within '{ and } delimiters."
>
>And the "constant_param_arrayinit" mentioned there does not appear
>anywhere."
>  
>

I go along with this, as a change from the 2.2 LRM.

>And 4.2.13 itself says,
>
>"The concatenation shall be expressed using the brace characters { and
>}, with commas separating the expressions within. It should not be
>confused with the array literal syntax '{ } which is array of values.
>Confusion can arise because { } is the array literal syntax in the C
>language whereas it means something very different in the Verilog HDL
>and Verilog-AMS HDL languages."
>  
>

How does this fit in with 4.5.1 Vector or array arguments to analog 
operators? This says that an array can be passed as an array_identifier 
(no problem with that) or an analog_constant_concatenation (and 
analog_constant_concatenation has no mention other than in this 
subclause). A.8.1 describes analog_filter_function_concatenation, which 
sounds like the same thing. And it looks to me like 2.2 LRM style array 
concatenation. So should analog filters also be using '{} as well?

It would make sense to me if A.8.1 were renamed "Array literals", and 
used the tick before opening curly braces.  Plus a new description of 
concatenations (no tick, concerning bitwise concatenations and 
strings).  Otherwise we seem to have two different rules for the syntax 
of defaults for array parameters and for analog filters.

Regards
Paul Floyd
-- 
Dr Paul Floyd
Mentor Graphics Corporation




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Jul 2 08:22:22 2008

This archive was generated by hypermail 2.1.8 : Wed Jul 02 2008 - 08:22:42 PDT