G
Gerry
Guest
Hi
The following simple code:
variable ulut_index_tmp : unsigned(3 downto 0);
ulut_index_tmp := ulut_alu3(0) & ulut_alu2(0) & ulut_alu1(0) & ulut_alu0(0);
ulut_tmp_dst0(0) := ulut_tmp_lut0(unsigned(ulut_index_tmp(3 downto 0), 4));
So in the variable ulut_index_tmp i concatenate 4 bits, and with this
for bits I wanna look up 1 bit in the 16 bit value ulut_tmp_lut0.
However, when I do it this way, then it tells me:
Type error in variable ulut_index_tmp. Needed type natural.
But when I say natural instead of unsigned it tells me illegal
conversion. Anyone an idea how to convert this so that this works?
Should also be sythesizable
Thanks1
The following simple code:
variable ulut_index_tmp : unsigned(3 downto 0);
ulut_index_tmp := ulut_alu3(0) & ulut_alu2(0) & ulut_alu1(0) & ulut_alu0(0);
ulut_tmp_dst0(0) := ulut_tmp_lut0(unsigned(ulut_index_tmp(3 downto 0), 4));
So in the variable ulut_index_tmp i concatenate 4 bits, and with this
for bits I wanna look up 1 bit in the 16 bit value ulut_tmp_lut0.
However, when I do it this way, then it tells me:
Type error in variable ulut_index_tmp. Needed type natural.
But when I say natural instead of unsigned it tells me illegal
conversion. Anyone an idea how to convert this so that this works?
Should also be sythesizable
Thanks1