Altera_Forum
Honored Contributor
9 years agoConditional assignment statement vs selected assignment statement
Hello,
I have some experience with VHDL, but now I am trying to understand the details and not just using the code. What is the difference between the conditional assignment statement and the selected assignment statement? Additionally why in the example below can't be assign when r(3) = '1', but we have to consider all possibilities? Considering the following example of a priority encoder where r is a 4 bit input binary sequence to be encoded. with r select code <= "11" when "1000"|"1001"|"1010"|"1011"| "1100"|"1101"|"1110"|"1111", "10" when "0100"|"0101"|"0110"|"0111", "01" when "0010"|"0011", "00" when others; refers to page 22 in the document linked below code <= "11" when (r(3)=’1’) else "10" when (r(2)=’1’) else "01" when (r(1)=’1’) else "00"; refers to page 10 in the docment linked below Thanks! :) http://ece-research.unm.edu/jimp/vhdl_fpgas/slides/concurrent_stmts.pdf