They can be assigned inside a process or architecture block.
Conditional Signal Assignment : Priority
Conditional signal assignment is similar to if-then-else.
A conditional signal assignment consists of an assignment to one output (or a collection of outputs, such as an array of any type) and a series of conditional when statements, as shown. To ensure that all conditions are covered, you can use a terminating when others clause.
architecture mux1 of my_mux isSelected Signal AssignmentA selected signal assignment is similar to a conditional signal assignment but differs in that the input conditions specified have no implied priority.
begin
Y <= A when Sel = "00" else
B when Sel = "01" else
C when Sel = "10" else
D when others;
end mux1;
The "else" is the difference. These are bad examples because the code does not depend on the type of signal assignment. Either would work in this case.
beginFrom here.
with Sel select
Y <= A when "00",
B when "01",
C when ?0",
D when others;
end mux1;
http://www.vhdl.renerta.com/mobile/source/vhd00063.htm
ReplyDelete