Forum Discussion
Altera_Forum
Honored Contributor
13 years agoYour assignment to a is done outside a process, so imagine that it happens (nearly) instantly. (instead of conditionally).
The assignment to a is using more of a priority list to determine your output. If i(7) = '1', it doesn't matter what 6-0 are, your output will be "111". If i(7)=0, then i(6) is examined next. If you re-wrote your statement as: a<="000" when i(0) = '1' else "001" when i(1) = '1' else .. "111" when i(7) = '1' else "000"; then i(0) = '1' would take priority over all others.