A Bad attempt at a Priority Circuit
architecture bad of priority is
-- priority circuit, Y7 highest priority input
-- Y1 is lowest priority input
-- uses just one when-else concurrent statement.
dout <= "111" when (y7 = '1') else "000";
dout <= "110" when (y6 = '1') else "000";
dout <= "101" when (y5 = '1') else "000";
dout <= "100" when (y4 = '1') else "000";
dout <= "011" when (y3 = '1') else "000";
dout <= "010" when (y2 = '1') else "000";
dout <= "001" when (y1 = '1') else "000";