using if/elsif:
Proc_priority_encoder2 : process(s_CLOCK, s_RESET) --worse performance over CASE statement
begin
if (s_RESET = '1') then
s_DEC_IN_Q1 <= (others=>'0');
s_DEC_OUT_Q1 <= (others=>'0');
elsif (s_CLOCK'event and s_CLOCK='1') then
s_DEC_IN_Q1 <= s_DEC_IN;
if (s_DEC_IN_Q1 = "000000000000000001") then
s_DEC_OUT_Q1 <= "00000001";
elsif (s_DEC_IN_Q1 = "000000000000000010") then
s_DEC_OUT_Q1 <= "00000010";
elsif (s_DEC_IN_Q1 = "000000000000000011") then
s_DEC_OUT_Q1 <= "00000011";
elsif (s_DEC_IN_Q1 = "000000000000000100") then
s_DEC_OUT_Q1 <= "00000100";
elsif (s_DEC_IN_Q1 = "000000000000001000") then
s_DEC_OUT_Q1 <= "00000101";
elsif (s_DEC_IN_Q1 = "000000000000010000") then
s_DEC_OUT_Q1 <= "00000110";
elsif (s_DEC_IN_Q1 = "000000000000100000") then
s_DEC_OUT_Q1 <= "00000111";
elsif (s_DEC_IN_Q1 = "000000000001000000") then
s_DEC_OUT_Q1 <= "00001000";
elsif (s_DEC_IN_Q1 = "000000000010000000") then
s_DEC_OUT_Q1 <= "00001001";
elsif (s_DEC_IN_Q1 = "000000000100000000") then
s_DEC_OUT_Q1 <= "00001010";
elsif (s_DEC_IN_Q1 = "000000001000000000") then
s_DEC_OUT_Q1 <= "00001011";
elsif (s_DEC_IN_Q1 = "000000010000000000") then
s_DEC_OUT_Q1 <= "00001100";
elsif (s_DEC_IN_Q1 = "000000100000000000") then
s_DEC_OUT_Q1 <= "00001101";
elsif (s_DEC_IN_Q1 = "000001000000000000") thenp
s_DEC_OUT_Q1 <= "00001110";
elsif (s_DEC_IN_Q1 = "000000000010000000") then
s_DEC_OUT_Q1 <= "00001111";
elsif (s_DEC_IN_Q1 = "000000000010000000") then
s_DEC_OUT_Q1 <= "00010000";
elsif (s_DEC_IN_Q1 = "000000000010000000") then
s_DEC_OUT_Q1 <= "00010001";
elsif (s_DEC_IN_Q1 = "000000000010000000") then
s_DEC_OUT_Q1 <= "00010011";
else
s_DEC_OUT_Q1 <= "00000000";
end if;
end if;
end process;