std_logic_vector to integer give always 0
You haven’t given enough info: your snippet is incomplete (nowhere do you actually show that the value should be anything but 0), the error could be in your simulation, and I’m not sure why you’re using processes. 

But ultimately, assuming you have added the appropriate library and packages, the function call is correct.

Check your code against this:

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;

entity conv_test is
   Port ( a : in STD_LOGIC_VECTOR (7 downto 0);
          b : out integer);
end conv_test;

architecture Behavioral of conv_test is

begin

b &lt;= to_integer(signed(a));

end Behavioral;


For unsigned integer, modify the snippet as:

b &lt;= to_integer(unsigned(a));


reference