RE: [sv-bc] enum range with keyword

From: Rich, Dave <Dave_Rich@mentor.com>
Date: Mon Mar 22 2010 - 14:44:57 PDT

Paul,

This feature came directly from Vera, which does not have the generate facility, nor does it have wires. The other thing it does not have is parameters; this feature could have easily been designed to create an array of parameter labels instead. At the time, there was probably too much other activity going on to catch this. It does create yet another language exception from Vera that does not exist anywhere else in SystemVerilog.

Dace

> -----Original Message-----
> From: Paul Graham [mailto:pgraham@oasys-ds.com]
> Sent: Monday, March 22, 2010 2:19 PM
> To: Steven Sharp
> Cc: shalom bresticker; sv-bc@eda.org; Greg Jaxon; djones@xtreme-eda.com;
> Rich, Dave
> Subject: Re: [sv-bc] enum range with keyword
>
> Just curious, what was the original motivation behind this enum range
> syntax? How is it considered useful to generate a bunch of enum names
> like n_1, n_2, ..., n_10 automatically?
>
> And I don't really want to suggest adding any new features, but why is
> this automatic name generation facility only defined for enums? Why not
> for wires?
>
> Paul
> ----- Original Message -----
> From: "Steven Sharp" <sharp@cadence.com>
> To: "Greg Jaxon" <Greg.Jaxon@synopsys.com>, djones@xtreme-eda.com, "Dave
> Rich" <Dave_Rich@mentor.com>
> Cc: "shalom bresticker" <shalom.bresticker@intel.com>, sv-bc@eda.org
> Sent: Monday, March 22, 2010 4:09:53 PM
> Subject: RE: [sv-bc] enum range with keyword
>
> This would be illegal by the BNF. It requires enum_identifier, and a
> keyword is not an identifier.
>
> Also, the main reason keywords are reserved is so that lexical analysis
> can recognize keywords without messy context dependence. That applies
> just as much in this situation as in any other. It doesn't matter to
> lexical analysis that the eventual formed identifiers aren't keywords.
> Lexical analysis is dealing with the input source text, not the formed
> identifiers.
>
> If the formed identifiers come out to be keywords (e.g. pull0), that
> doesn't present any problem for lexical analysis, since it isn't having
> to process those keywords in its input text. It does make it impossible
> for the user to refer to those formed identifiers elsewhere without
> using an escaped identifier. An escaped identifier should work, because
> the LRM specifies that the identifier name is the name without the
> backslash or terminating white space. So \pull0 refers to an identifier
> with the name pull0, which matches the formed identifier.
>
> Steven Sharp
> sharp@cadence.com
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Mar 22 14:46:50 2010

This archive was generated by hypermail 2.1.8 : Mon Mar 22 2010 - 14:46:59 PDT