Se connecter avec
S'enregistrer | Connectez-vous

Vhdl addtion debit vector

Dernière réponse : dans Programmation

Bonjours a tous ,

on faite j ai un probleme au niveau d'un additon entre deux bit vector car en faite en sortie il faute que je puisse allumer des afficher c est pour pkoi il me faut faire l'additon

VOICI LE PROGRAMME EN VHDL :

library IEEE;
use IEEE.std_logic_1164.all;


entity afficheur is
port (clk: in STD_LOGIC;
entreesonar: in STD_LOGIC;
sortiesonar: in STD_LOGIC;
afficheur: out STD_LOGIC_VECTOR (9 downto 0));
end;

architecture afficheur_arch of afficheur is

--diagram signal declarations
signal comptage: STD_LOGIC_VECTOR (9 downto 0);

-- SYMBOLIC ENCODED state machine: affichagedesled
type affichagedesled_type is (affichage, attente, incrementatoncompteur, RAZCOMPTEUR);
signal affichagedesled: affichagedesled_type;

begin
--concurrent signal assignments
--diagram ACTIONS;


affichagedesled_machine: process (clk)

begin

if clk'event and clk = '1' then
case affichagedesled is
when affichage =>
affichagedesled <= attente;
when attente =>
if entreesonar = '1' then
affichagedesled <= RAZCOMPTEUR;
end if;
when incrementatoncompteur =>
comptage<= comptage + "000000001";
if sortiesonar = '0' then
affichagedesled <= affichage;
end if;
when RAZCOMPTEUR =>
comptage<= "000000000";
if sortiesonar = '1' then
affichagedesled <= incrementatoncompteur;
end if;
when others =>
null;
end case;
end if;
end process;

-- signal assignment statements for combinatorial outputs
afficheur_assignment:
afficheur <= comptage when (affichagedesled = affichage) else
comptage;

end afficheur_arch;


ERREUR :

afficheur.vhd (LIGNE 45) : (E601) Bad operand types 'std_logic_vector(9 downto 0)' and 'string(1 to 9)' for operator '+'.



Merci de bien vouloir m'aider car j ai absolument besoin de faire cette addtion svp :pt1cable:  :love: 

Autres pages sur : vhdl addtion debit vector

Lassé par la pub ? Créez un compte
Lassé par la pub ? Créez un compte
Tom's guide dans le monde