On 26/08/2011, at 5:19 AM, Scott Thibault wrote:
> It’s backwards to define your problem set in terms of what preprocessors are capable of and ignores the fact that we have existing features in the language that overlap with that problem set. There are in fact useful features that would require a preprocessor. As stated, one of those is the ability to deal with code that simply won’t compile in one tool but not another. However, there are other features that might be better managed with the generate statement. The generate statement is conditional compilation. So we have a language that already has some form of conditional compilation. I think it is necessary to carefully look at each use case of what you are calling “conditional compilation” and consider whether it should be addressed by the existing mechanism or a new (i.e. preprocessor) mechanism.
Any generate statement extensions requirements you or someone else might propose (and the proposals would be welcomed) can't serve to limit conditional compilation further. It's not an either/or situation.
Conditional compilation isn't what a preprocessor does, it's what you use it for. Conditional text might be a more apt description. What a generate statement addresses and what conditional text does appears to be largely orthogonal. A designer can certainly produce an equivalent description using conditional text, but there are other ways to do so, too.
Generate is an elaboration mechanism while a preprocessor is textual (analysis time). The contrast between the two is to give a preprocessor access to all of VHDL. The only duplicative mechanism that is readily apparent is context declarations/references which allow limited conditional text.
Other than denying enabling features there is no way to limit the scope of a conditional text mechanism, it can produce any language construct that is appropriate for the place in a design unit it is found in and does not provide a mechanism for class nor language construct extension as envisioned, simply providing conditional inclusion or exclusion or arbitrary text.
This "conditional compilation" proposal is being built from the bottom up and doesn't threaten any proposed language changes (as yet).
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Aug 25 16:44:50 2011
This archive was generated by hypermail 2.1.8 : Thu Aug 25 2011 - 16:44:57 PDT