Conditional if-else Statement - 2022.1 English

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
Release Date
2022.1 English

The syntax for a conditional if-else statement is:

if (expression)




The else is optional and assumes a latch or flip-flop depending on whether or not there was a clock statement. Code with multiple if and else entries can also be supported, as shown in the following example:

If (expression1)


elsif (expression2)


elsif (expression3)




This example is synthesized as a priority if statement.

If the first expression is found to be TRUE, the others are not evaluated.

If unique or priority if-else statements are used, Vivado synthesis treats those as parallel_case and full_case, respectively.