If |
LRM §8.7. |
The if statement selects for execution one or none of the enclosed sequences of statements, depending on the value of one or more corresponding conditions.
[ label: ] if condition then sequential_statements [ elsif condition then sequential_statements ] [ else sequential_statements ] end if [ label ];
For the execution of an if statement, the condition specified after if (and any conditions specified after elsif) are evaluated in succession until one evaluates to true or all conditions are evaluated to false. The final else is treated as elsif true then.
If one condition is true, then the corresponding sequence of statements is executed.
if C = "000" then Y <= A; elsif C = "010" then Y <= B; elsif C = "100" or C = "110" then Y <= C; else Y <= D; end if;