Does SystemVerilog contain a feature whereby it is able to detect what program is compiling the code (for synthesis or simulation) and then include or exclude sections of file for processing?
This feature could be used to declare "simulation only" code blocks and also write portable code whereby a design block instantiates different IP depending on wheather it is being compiled by Quartus, Libero or some other FPGA compiler.
generate
depending on a parameter passed to the compiler, or anifdef
. \$\endgroup\$ – awjlogan Aug 30 '20 at 13:10-- pragma translate off
(and on) if you merely need to distinguish between synthesis (obeys the pragma) and simulation (does not). I'd expect something similar in Verilog surely? Extending to different synth tools ... no. But you can pass a different value to a generic from different synthesis scripts, and "if ... generate" or use configurations. \$\endgroup\$ – user16324 Aug 30 '20 at 13:13