Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Infix operator "+" Error

Thread Tools

Infix operator "+" Error

wadia wadia is offline
Junior Member
Join Date: Sep 2008
Posts: 2
Hi everybody,

I'm getting the following error:
No feasible entries for infix operator "+"

The program is as follow:
-- Fichier : Compteur_bcd10.vhdl
-- Description : Compteur BCD de 0 à 9
library IEEE;
use IEEE.std_logic_1164.all;
-- use IEEE.numeric_std.all;

entity compteur_bcd10 is -- définition des entrées/sorties
port(clk, en, rst_n : in std_logic;
rco : out std_logic;
q : out std_logic_vector(3 downto 0));
end compteur_bcd10;

architecture behav of compteur_bcd10 is
signal cnt : std_logic_vector(3 downto 0); --std_logic_vector(3 downto 0); -- signal interne
q <= cnt; -- q, la sortie vaut la valeur du compte actuel en tout temps
process(clk, rst_n) -- process sensible à l'horloge et au "clear"
if (rst_n='0') then -- "clear" asynchrone
cnt <= (others => '0');
rco <= '0';
elsif (clk'event and clk='1') then -- au front montant
if (en='1') then -- si enable vaut 1
if (cnt = "1010") then -- si on atteint 9, on fait un rco
cnt <= (others => '0'); -- et on remet le compteur a 0
rco <= '1';
else -- sinon, on compte
"ERROR LINE" cnt <= cnt + "0001";
rco <= '0';
end if;
cnt <= cnt;
rco <= '0';
end if;
end if;
end process;
end behav;

Could you please help me with this?

Thanks & Regards,


Note: I've tried using unsigned, but the error is still there.
Reply With Quote
wadia wadia is offline
Junior Member
Join Date: Sep 2008
Posts: 2
I've found the solution to this problem by adding the following line to my program:

use IEEE.std_logic_unsigned.all;

That's it !

Thanks anyway.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
error: (infix expression) for formal "din" is not a globally static expression tomer VHDL 0 07-27-2011 11:43 PM
ERROR: infix expression "<=" with simple vectors Trit VHDL 8 02-23-2009 08:09 PM
What does it mean with infix Tony Johansson C++ 25 04-11-2005 12:22 AM
type error resolving infix expression -- ERROR senthil VHDL 1 02-27-2004 10:40 AM
infix to postfix expression string for evalution. KidLogik C++ 5 02-03-2004 05:20 PM