'ifdef MYVAR
module if_MYVAR_is_declared;
...
endmodule
'else
module if_MYVAR_is_not_declared;
...
endmodule
'endif
注記: 合成を実行すると、Vivado により SYNTHESIS マクロが自動的に設定されます。`ifdef SYNTHESIS を使用すると、合成の実行中にこのマクロが実行されます。
'ifdef MYVAR
module if_MYVAR_is_declared;
...
endmodule
'else
module if_MYVAR_is_not_declared;
...
endmodule
'endif