Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

found '0' definitions of operator "+" in VHDL

Tags:

vhdl

At first I wanna point out that this is my first attempt with VHDL so be kind. I want to read the X1 ... X4 inputs and produce the sum of the ones at the output. This my code

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity counter_of_aces is 
  Generic(N: integer := 3);
     port( X1, X2, X3, X4 : IN BIT; 
        count: out std_logic_vector(N-1 downto 0)); 
end counter_of_aces;

architecture behavioral of counter_of_aces is 
signal counter : std_logic_vector(Ν-1 downto 0);
begin 
  process (X1, X2, X3, X4) 
  begin
    counter <= "0";
    if(X1='1' OR X2='1' OR X3='1' OR X4='1')then 
        counter <= counter + "1"; --O counter λειτουργεί ως στοιχείο μνήμης 
    else
        counter <= counter;
    end if; 
  end process; 
end behavioral;

and I get the following errors

ERROR:HDLCompiler:69 - Line 11: <í> is not declared.
ERROR:HDLCompiler:1731 - Line 17: found '0' definitions of operator "+", cannot determine exact overloaded matching definition for "+"
ERROR:HDLCompiler:854 - Line 10: Unit <behavioral> ignored due to previous errors.

Which "i" is it referring to and what about the others? Thanks in advance.

like image 806
Billy Grande Avatar asked Oct 27 '14 23:10

Billy Grande


1 Answers

Start your VHDL with

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_unsigned.all;
like image 175
Boris Ivanov Avatar answered Sep 27 '22 22:09

Boris Ivanov