Macro Example Two - 2022.1 English

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2022-06-06
Version
2022.1 English

'ifdef MYVAR

module if_MYVAR_is_declared;

...

endmodule

'else

module if_MYVAR_is_not_declared;

...

endmodule

'endif

 

Note:   When synthesis runs, Vivado will automatically set the SYNTHESIS macro. So, when using ‘ifdef SYNTHESIS, it will be triggered during the synthesis run.