I want to convert a 16-bit std_logic_vector into an integer to use it in a process realising a Moore machine.
entity steuerung is
port (
Clk : in std_logic;
Reset : in std_logic;
AktPos : in std_logic_vector(15 downto 0);
Notaus : in std_logic;
Betrieb : in std_logic;
HPR : in std_logic;
HPL : in std_logic;
ESR : in std_logic;
ESL : in std_logic;
CntClr : out std_logic;
LedR : out std_logic;
LedG : out std_logic;
M_An : out std_logic;
M_Li : out std_logic;
M_Re : out std_logic;
State : out std_logic_vector(5 downto 0)
);
end steuerung;
architecture BEHAVE of steuerung is
begin
process (Reset, Clk, Notaus, Betrieb, AktPos, ESR, ESL) is
type zustand is (steht, links, rechts, neuUnten, neuOben, alarm);
variable zustands_vektor : zustand;
variable ausgabe_vektor : std_logic_vector(5 downto 0);
variable cnt : integer range 0 to 65535 := conv_integer(unsigned(AktPos));
But I'm getting a few errors concerning the last line of code. The console tells me the following:
"no declaration for "unsigned"
no overloaded function found matching 'conv_integer'"
and also a few errors in the std_logic_arith library (which I definitely included, although not seen in the code)
What have I done wrong?