title: Error in to_integer
body: <pre><code>library ieee;
  use ieee.std_logic_1164.ALL;
  use ieee.numeric_bit.ALL;
  use ieee.numeric_std.ALL;
  entity multiplexer is
  port (A,B: in std_logic_vector (7 downto 0);
  CI: in std_logic;
  CO: out std_logic;
  ANS: out std_logic_vector (7 downto 0);
  OP: in std_logic_vector(1 downto 0);
  EN: in std_logic);
  end multiplexer;
  architecture archi of multiplexer is 
  signal tmp: std_logic_vector (8 downto 0);
  begin
  process (EN) begin
  if (EN = '1') Then
  case OP is
  when "00" =&gt;
  tmp &lt;= std_logic_vector((TO_INTEGER(A)+TO_INTEGER(B)+TO_INTEGER (CI)),9);
  ANS&lt;= tmp(7 downto 0);
  CO &lt;= tmp(8);
  when "01" =&gt;
  tmp &lt;= std_logic_vector((to_integer(A)-to_integer(B)+to_integer (CI)),9);
  ANS&lt;= tmp(7 downto 0);
  CO &lt;= tmp(8);
  when others =&gt; NULL;
  end case;
  else
  NULL;
  end if;
  end process;
  end archi;
  </code></pre>
  
  <p>The errors are coming in the To_integer part. I donot know what I am doing wring over here? Also previously I had used the numeric_arith and numeric_unsigned.all and then the subprograms were conv_integer the program compiled but there were no output in the ANS and CO areas. They were defined as undefined. I am attaching the wave output for reference. Please help. 
  <a href="https://i.stack.imgur.com/n2w29.jpg" rel="nofollow noreferrer">Previous wave output</a>  </p>