Subject: Re: 1364.1 pragmas
From: John Michael Williams (jwill@AstraGate.net)
Date: Fri Aug 30 2002 - 10:01:04 PDT
Hi Shalom.
For the sake of argument (to bring out more
reasons), I'll have to say that I disagree with your
reasons below.
The problem, is that they are based on the
assumption that comment directives are not "real" and
don't have to be processed or parsed: They are read
immediately and fail if somehow wrong. Specifically:
Shalom.Bresticker@motorola.com wrote:
>
> You also have a problem with mis-spelled directives in comments.
> If you do not recognize it as a directive, then it is just another comment.
Yes, and there also are problems with typing "or" instead
of "and" in the Verilog (or other language). Such an
error can not be found except in simulation (or some kind
of diligent design code walkthrough, which very rarely is
feasible in practice). In general, missing a directive has
less serious consequences than missing (the right)
operator in the code. But, yes, errors in an attribute,
a comment directive, or in the logic or naming conventions
of the project all are possible. Putting directives
in comments does not preserve them from designer errors.
>
> At least with attributes, you can identify it as some sort of directive.
But, what if the wrong parameter value or attribute was used?
>
> Shalom
>
> ...
> Another argument for attributes and against comments is that there are
> cases
> where a tool rewrites the code and removes all the comments.
This would be a problem only if the Std did not deal with it.
Presumably, attributes in comments would be parsed and
transferred
in the netlist, for a conforming tool.
Actually, these objections are not cogent for
another reason: Using comment directives
vs attributes really is a SYNTAX issue:
(* synthesis, full_case *) vs
//synthesis, full case
BOTH have the format of a comment (the first, an
obsolescent Pascal comment, the second a Verilog
or C++ comment).
When first encountered by the scanner, BOTH should
be treated as part of the language, and parsed as
language constructs, not as special comments.
The BIG benefit, is that the syntax of the attribute-comment,
after the comment delimiter itself ( "(*" or "//" ), could
be the SAME for all design languages. After scanning,
all internal code parsing attributes could be identical,
across all languages. This should help development time
as well as reduce the tool bug rate. Furthermore,
designers using more than one language would only have
one directive (attribute) format to deal with.
I'm talking myself into proposing that 1364 reverse
course and put the text of all attributes into Verilog
comments. Can I convince you?
>
> Shalom
--
John
jwill@AstraGate.net
John Michael Williams
This archive was generated by hypermail 2b28 : Fri Aug 30 2002 - 10:05:33 PDT