hi, is there any predefined function in vhdl, that returns index of the bit that is set to '1' in a vector. thanks
1 | for i in slv'reverse_range loop |
2 | if (slv(i) == '1') then |
3 | firstSet <= i; |
4 | exit; |
5 | end if; |
6 | end loop; |
felix wrote: > that returns index of the bit that is set to '1' in a vector. (How) can you be sure that only 1 bit is set in the vector?
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.