To see why you get the error message, look at your code like this:
An <= "1110" when anode = "00" else (AN <= "1101")....
The else
clause will be compiled as a comparison of AN
with 1101
to see if it's less-than-or-equal-to. Which is of type boolean
, which is incompatible with the type of An
, a vector. (I wish VHDL hadn't picked <=
as an assignment operator, but there we are!)
The syntax you need is more like this (note the lack of <=
on the other lines)
An <= "1110" when anode = "00" else
"1101" when anode = "01" else
"1011" when anode = "10" else
"0111" when anode = "11" else
null;