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?