And
, nand
, or
and nor
operators in VHDL are short-circuit operators in some cases. The behavior depends on the operands types.
You're using type std_logic
, which is not listed:
9.2 Operators - General
In general, operands in an expression are evaluated before being associated with operators. For certain
operations, however, the right-hand operand is evaluated if and only if the left-hand operand has a certain
value. These operations are called short-circuit operations. The binary logical operations and, or, nand, and
nor defined for operands of types BIT and BOOLEAN are all short-circuit operations; furthermore, these
are the only short-circuit operations.
[...]
NOTE 2—A user-defined operator that has the same designator as a short-circuit operator (i.e., a user-defined operator
that overloads the short-circuit operator) is not invoked in a short-circuit manner. Specifically, calls to the user-defined
operator always evaluate both arguments prior to the execution of the function.
In case of an or
operator, if the first operand is true, the second operand will not be evaluated.
In case of an and
operator, if the first operand is false, the second operand will not be evaluated.
I think that std_logic
is not listed, is a mistake that was made when incorporating IEEE Std. 1164 into IEEE Std. 1076 for VHDL-2008.