When-Then-Else Keyword
condition
Use
This statement is used in equations. Equations use the four assignment operators = and ?= (combinational or detailed), and := and ?:= (registered pin-to-pin).
Example
WHEN (Mode == S_Data) THEN { Out_data := S_in;
[ ELSE equation ];
-or-
[ WHEN condition THEN ] equation ;
[ ELSE equation ];
Note: Equation blocks used within a conditional expression such as When-Then-Else
result in logic functions that are logically ANDed with the conditional
expression that is in effect.
CAUTION: When-Then-Else is only supported in equations. Use If-Then-Else for state diagrams.
ELSE A=C;
S_Valid := 1;
}
ELSE WHEN (Mode == T_Data) THEN { Out_data := T_in;
T_Valid := 1;
}
See Also