bilbot L'Isarien des Flandres | Code :
- library ieee;
- use ieee.std_logic_1164.all;
- use ieee.std_logic_arith.all;
- use ieee.std_logic_unsigned.all;
- ENTITY decodeur_odometrie IS
- PORT
- (
- ina,inb,clk,oe,selodo,selbyt : IN STD_LOGIC;
- donnee : OUT STD_LOGIC_VECTOR(5 DOWNTO 0);
- ack : INOUT STD_LOGIC
- );
- END decodeur_odometrie;
- ARCHITECTURE description OF decodeur_odometrie IS
- SIGNAL ina_old,inb_old,ina_filtre,inb_filtre,oe_filtre : STD_LOGIC; --variables permettant de decoder les impulsions des encodeurs
- SIGNAL a1,a2,b1,b2,oe1,oe2 : STD_LOGIC; --variables permettant de faire le filtrage numériques des impulsions
- SIGNAL cpt,cpt_out : STD_LOGIC_VECTOR (11 DOWNTO 0); --variable servant au comptage puis a la bufferisation lors d'une demande de lecture
- SIGNAL inc,dec : STD_LOGIC;
- BEGIN
- --Decodage des impulsions pour l'incrémentation du cpt
- inc <= ina_old and inb_old and not(ina_filtre) and inb_filtre;
- inc <= not(ina_old) and inb_old and not(ina_filtre) and not(inb_filtre);
- inc <= not(ina_old) and not(inb_old) and ina_filtre and not(inb_filtre);
- inc <= ina_old and not(inb_old) and ina_filtre and inb_filtre;
- --Decodage des impulsions pour la decrementation du cpt
- dec <= ina_old and inb_old and ina_filtre and not(inb_filtre);
- dec <= ina_old and not(inb_old) and not(ina_filtre) and not(inb_filtre);
- dec <= not(ina_old) and not(inb_old) and not(ina_filtre) and inb_filtre;
- dec <= not(ina_old) and inb_old and ina_filtre and inb_filtre;
- ---gestion de la lecture
- donnee <= cpt_out(11 downto 6) when (oe_filtre = '1' and ack = '1' and selodo = '0' and selbyt = '0') else
- cpt_out(5 downto 0) when (oe_filtre = '1' and ack = '1' and selodo = '0' and selbyt = '1') else
- "ZZZZZZ" ;
-
- PROCESS (clk)
- begin
- if (clk'event and clk ='1') then
- ---filtrage oe
- oe2 <= oe1;
- oe1 <= oe2;
- if ((oe2 and oe1 and oe) = '1' and ack ='0') then
- oe_filtre <= '1';
- cpt_out <= cpt;
- ack <= '1';
- elsif (oe2 and oe1 and oe) = '0' then
- oe_filtre <= '0';
- end if;
- ---filtrage du canal a
- a2 <= a1 ;
- a1 <= ina;
- if (a2 and a1 and ina) = '1' then
- ina_filtre <= '1';
- elsif (a2 and a1 and ina) = '0' then
- ina_filtre <= '0';
- end if;
- ---filtrage du canal b
- b2 <= b1 ;
- b1 <= inb;
- if (b2 and b1 and inb) = '1' then
- inb_filtre <= '1';
- elsif (b2 and b1 and inb) = '0' then
- inb_filtre <= '0';
- end if;
- ---sauvegarde des valeur filtrees
- ina_old <= ina_filtre;
- inb_old <= inb_filtre;
- if dec = '1' then
- cpt <= cpt-1;
- elsif inc = '1' then
- cpt <= cpt+1;
- end if;
- end if;
- END PROCESS;
- END description;
|
voila lorsque je rentre ca le compilo me sort ca comme erreur
Error: Can't resolve multiple constant drivers for net "inc" at decodeur_odo.vhd(28)
Error: Constant driver at decodeur_odo.vhd(29)
Error: Can't elaborate top-level user hierarchy
Error: Quartus II Analysis & Synthesis was unsuccessful. 3 errors, 0 warnings
Error: Processing ended: Tue Feb 15 11:44:40 2005
Error: Elapsed time: 00:00:01
Error: Quartus II Full Compilation was unsuccessful. 3 errors, 0 warnings
Je comprend pas pourquoi il me sort ces erreurs, en fait apres divers essais le pb semble venir de mon affectation conditionnelle (L38 a 40) présente au tout debut (qd je l'enleve le compilo veut bien compiler) mais je vois vraiment pas ou se situe le pb car elle ne touche pas aux variables...(j'ai reverifié la syntaxe plusieurs fois et c'est bon) Message édité par bilbot le 15-02-2005 à 12:07:14
|