From: Shalom Bresticker (r50386@email.sps.mot.com)
Date: Tue Jul 11 2000 - 05:42:40 PDT
My sharp-eyed colleague, Patrick Doane, from Motorola's Somerset PowerPC microprocessor design center in Austin, seems to have found
two
significant errata in Draft 5.
Thanks, Patrick !
<p>Patrick Doane wrote:
>
> Hi Shalom,
>
> It looks like many of the complaints that I had with Draft 4 have been
> fixed for Draft 5. However, there is still one major problem that I see.
>
> Existing rules for module_parameter_port_list and
> list_of_port_declarations are inconsistent with uses in documentation.
> For example, module generic_fifo on p.184 will not parse with this grammar
> because the semicolon is missing from the end of the parameter declaration.
Patrick means: The top example on p. 184 uses the module_parameter_port_list described in Syntax 12-1 on p. 170.
The syntax is:
module_parameter_port_list ::= #(parameter_declaration {,parameter_declaration})
parameter_declaration must end with a semicolon.
So according to this syntax, the line in the generic_fifo example should be:
#(parameter MSB=3, LSB=0, DEPTH=4 ; )
and if it were split into two parameter_declarations, it would be:
#(parameter MSB=3;, parameter LSB=0, DEPTH=4 ; )
requring semicolon + comma spearation between the parameter_declarations.
Was this the idea ?
In any case, the example does not match the BNF.
<p>Similarly (p. 188),
> According to the grammar, I would need to write a module with ports like
> this:
>
> module m(
> input x,y,z;, // <- note the extra comma here
> output a,b,c;
> );
This is according to the BNF:
list_of_port_declarations ::= (port_declaration {, port_declaration }) | ()
where again port_declaration must end with semicolon,
and an additional comma separates between port_declarations.
The example on p. 191 uses just commas to separate between port_declarations.
<p>> I would strongly suggest that the ',' be removed from the list separator
> making the above example be:
>
> module m(
> input x,y,z;
> output a,b,c;
> );
>
> There are advantages to ';' separated over ',' separated:
>
> 1) Existing practice: We use this style today in Somerset for *all* of
> our current designs.
>
> 2) Easier to use: A designer can simply cut/paste their port
> declarations into the port list. No extra fiddling is needed.
>
> 3) Easier to parse: The resulting grammar (for that part at least) is
> LALR(1). Separating with a comma makes the grammar ambiguous and the
> rewrite involves additional state variables that can be easily messed up.
>
> Patrick
--************************************************************************ Shalom Bresticker email: shalom@msil.sps.mot.com Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268 P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890 http://www.motorola-semi.co.il/ ************************************************************************
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:54:13 PDT
and
sponsored by Boyd Technology, Inc.