C
Clemens
Guest
Hi
Normally I always used the function conv_integer to convert a
std_logic_vector into an integer. However, now I have a signal
defined as follows:
signal test : unsigned(31 downto 0);
I wanna use a slice of test for a 4-bit table look-up and I tried
it like this
lookup(conv_integer(test(3 downto 0)));
which doesnt work
However, the following codeexample would be compiled:
lookup(conv_integer(std_logic_vector(test(3 downto 0))));
Anyone can tell me how to do that without this extra converting step to
std_logic_vector?
Many thanks,
Clemens
Normally I always used the function conv_integer to convert a
std_logic_vector into an integer. However, now I have a signal
defined as follows:
signal test : unsigned(31 downto 0);
I wanna use a slice of test for a 4-bit table look-up and I tried
it like this
lookup(conv_integer(test(3 downto 0)));
which doesnt work
However, the following codeexample would be compiled:
lookup(conv_integer(std_logic_vector(test(3 downto 0))));
Anyone can tell me how to do that without this extra converting step to
std_logic_vector?
Many thanks,
Clemens