Keyword: SELECT
Select is a concurrent signal assignment statement that selects and assigns a value to a target signal from among a list of alternatives, based on the value of a given expression.
A select statement includes—in this order—the following:
(1) the reserved word "with", followed by the expression to be evaluated, followed by the reserved word "select",
(2) the target signal, followed by the reserved symbol "<=", followed by:
(a) the first value which could be assigned to the target signal, followed by the reserved word "when", followed by a choice which, if the expression evaluates to be that choice, will cause the first value to be assigned to the target signal, and
(b) second and subsequent values which could be assigned to the target signal, each followed by the reserved word "when", and each followed by a choice which, if the expression evaluates to be that choice, will cause the value to be assigned to the target signal.
Since the select statement chooses one and only one alternative for execution at a given time, all possible values for the expression must be covered in "when" statements. An "others" clause may be used to cover values not explicitly named.
Example
architecture concurrent of mux is
begin
with Sel select
Y <= A when "00",
B when "01",
C when "10",
‘X’ when others;
end concurrent;
LRM
9.5
See also