Forum Discussion
Altera_Forum
Honored Contributor
16 years agoIt depends on where you want to do it. If "000" is the value of some signal - say some_signal and you have various options then use a case statement, e.g.:
case some_signal
when "000" =>
PRICE <= "110010";
when "111" =>
PRICE <= some other value;
when others =>
PRICE <= some default value;
end case; note that the case statement has to be within a process. You could do if then else: if some_signal = "000" then
PRICE <= "110010";
else
PRICE <= some value;
end if; If you don't want / have a process then you coule write it as a concurrent statement - i.e just on its own: PRICE <= "110010" when some_signal = "000" else "some default value";