Andy
unread,Jul 24, 2013, 7:35:42 PM7/24/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Cory,
Conditional compilation for most languages is accomplished through a text preprocessor that alters the source code before it gets to the compiler. Therefore the pre-altered source code need not even be legal syntax for the compiler, so long as the pre-processor makes it legal (or removes it). This is how C and Verilog do conditional compilation, using 'define macros, etc.
Do not confuse synthesis with compilation. Compilation is only the first synthesis step, fallowed by one or more mapping and optimization stages. All VHDL code is compiled, but some of the compiled code may be optimized or mapped to nothing, depending on static (known at synthesis time) values.
For Synplify Pro, if you have if-generate statements, their effects (e.g. multiplexers and controlling ciruitry) are shown in the RTL-level view of the design, but they are optimized out during mapping, and are not present in the Technology (gate-level) view, nor in the gate level netlist. So at Synplify performs the elaboration phase during mapping. This may not be true for other synthesis tools, which may combine elaboration with compilation.
A good example of the difference between a "static" value in VHDL simulation(usually a constant, generic, literal, etc.) and a "static" value in synthesis is in the index of a for-loop. For VHDL simulation, the loop index is a dynamic value that takes on different values at different times. For synthesis, loops are always automatically unrolled, and therefore each reference to the loop index after unrolling is a static value which is then optimized.
Andy