From: Adam Krolnik (adamk@cyrix.com)
Date: Mon Jun 14 1999 - 11:05:59 PDT
Good afternoon:
Please respond by email with your vote for the wording
of this enhancement.
Proposal:
`elsif ::= `else ifdef
Section 18.4 Add the word "`elsif" to the title.
Add these lines to the end of the first paragraph.
If the `elsif directive exists (instead of the `else) the compiler
checks for the definition of the variable name. If the name exists
the lines following the `elsif directive are included. This
directive is a shorthand for `else `ifdef ... `endif. This directive
does not need a corresponding `endif directive. This directive must
be preceeded by an `ifdef or 'ifndef directive.
<p>Replace the syntax box with this text:
conditional_compilation_directive ::=
ifdef_directive | ifndef_directive
ifdef_directive ::=
'ifdef text_macro_name
first_group_of_lines
other_directive
`endif
ifndef_directive ::=
`ifndef text_macro_name
first_group_of_lines
other_directive
`endif
other_directive ::=
[ else_directive | elsif_directive ]
else_directive ::=
`else
second_group_of_lines
elsif_directive ::=
`elsif text_macro_name
second_group_of_lines
`other_directive
Replace the second and third bullet with this one:
- if the text macro name is defined, the first group of lines is compiled
as part of the description. If there is an `else or `elsif directive,
these groups of lines are ignored.
- If the text macro name has not been defined, the first group of lines
is ignored. If there is an `elsif compiler directive, it is evaluated
like the `ifdef compiler directive. If there is an `else compiler directive
the second group of lines is compiled.
Add example 3
Example-3 The following example shows usage of chained nexted conditional
compilation directives.
module test;
`ifdef first_block
`ifndef second_nest
initial $display("first_block defined.");
`else
initial $display("first_block and second_nest defined.");
`endif
`elsif second_block
initial $display("second_block defined, first_block not defined.");
`else
`ifndef last_result
initial $display("first_block, second_block, last_result not defined.");
`elsif real_last
initial $display("first_block, second_block not defined; last_result and
real_last defined.");
`else
initial $display("Only real_last defined!");
`endif
`endif
endmodule
<p><p> Adam Krolnik
Verification Engineer
Cyrix - NSC.
Richardson TX. 75085
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:53:27 PDT
and
sponsored by Boyd Technology, Inc.