IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VHDL Discussion :

object "compteurT" is used but not declared


Sujet :

VHDL

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Février 2016
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Mayenne (Pays de la Loire)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2016
    Messages : 2
    Points : 1
    Points
    1
    Par défaut object "compteurT" is used but not declared
    Salut,

    Je fais un projet "Question pour un champion" avec une carte DE2
    lorsque je veux lieer mes deux fichier vhdl (FSM & compteur + affichage7segments) j'ai les erreurs :
    10482 : object "compteurT" is used but not declared
    10558 : cannot associate formal port "compteurT" of mode "out" with an expression

    1er fichier fsm:

    library ieee;
    use ieee.std_logic_1164.all;

    entity TP1_S2_HUET_ROBIN is
    port(
    a: in STD_LOGIC;
    b: in STD_LOGIC;
    c: in STD_LOGIC;
    raz:in BIT;
    clk: in STD_LOGIC;
    va: out STD_LOGIC;
    vb: out STD_LOGIC;
    vc: out STD_LOGIC;
    compteurT: out integer
    );
    end TP1_S2_HUET_ROBIN;

    architecture questionpourunchampion of TP1_S2_HUET_ROBIN is
    type etats is (etape1,etape2);
    signal etat1: etats;
    signal etat2: etats;
    begin
    etapes: process(clk,raz)
    begin
    if raz = '0'
    then etat1 <= etape1;
    elsif rising_edge(clk)
    then
    etat1 <= etat2;
    end if;
    end process etapes;

    deroulementetape: process(a,b,c,etat1,clk)
    begin
    case etat1 is
    when etape1 => /*si etat1 = etape1*/
    /* qqfais a letape 1
    on eteins les leds
    et reinitialise compteur
    + afficheur a vide */
    va <= '0';
    vb <= '0';
    vc <= '0';
    etat2 <= etape2;/*passe a l'etape 2*/

    when etape2 =>
    /* qqfais a letape 2
    on detecte 1ere appuie sur bouton
    on allume la led du bouton
    on attend bouton raz */
    if a = '0' /*si bouton A pressé*/
    then va <= '1'; /*on allume la led A*/
    vb <= '0';
    vc <= '0';
    compteurT <= 1;

    elsif b = '0' /*si bouton B pressé*/
    then vb <= '1'; /*on allume la led B*/
    va <= '0';
    vc <= '0';
    compteurT <= 1;

    elsif c = '0' /*si bouton C pressé*/
    then vc <= '1'; /*on allume la led C*/
    vb <= '0';
    va <= '0';
    compteurT <= 1;

    end if;
    end case;
    end process deroulementetape;
    end questionpourunchampion;


    2eme fichier compteur:

    library ieee;
    use ieee.std_logic_1164.all;

    entity ecompteur is
    port(

    raz:in BIT;
    clk: in STD_LOGIC;
    compteurC : in integer;
    Digit0,Digit1,Digit2,Digit3,Digit4,Digit5,Digit6: out STD_LOGIC
    );
    end ecompteur;

    architecture acompteur of ecompteur is
    begin
    pcompteur: process(clk,raz,compteurC)
    variable cpt: integer:= 0;
    begin
    if compteurC = 1 then
    if raz = '0'
    then cpt := 0;
    elsif rising_edge(clk)
    then
    if cpt < 100000000
    then cpt := cpt + 1;
    end if;
    end if;

    if cpt > 10 and cpt <= 50000000
    then
    Digit0 <= '0';
    Digit1 <= '0';
    Digit2 <= '0';
    Digit3 <= '0';
    Digit4 <= '0';
    Digit5 <= '0';
    Digit6 <= '0';
    end if;

    if cpt > 50000000 and cpt < 100000000
    then
    Digit0 <= '1';
    Digit1 <= '1';
    Digit2 <= '1';
    Digit3 <= '1';
    Digit4 <= '1';
    Digit5 <= '1';
    Digit6 <= '1';
    end if;

    if cpt = 100000000
    then cpt := 0;
    Digit0 <= '1';
    Digit1 <= '1';
    Digit2 <= '0';
    Digit3 <= '1';
    Digit4 <= '0';
    Digit5 <= '0';
    Digit6 <= '1';
    end if;

    end if;
    end process pcompteur;

    end acompteur;

    3eme fichier mapping (ici sont les erreurs):

    library IEEE;
    use IEEE.std_logic_1164.all;
    use WORK.all;

    entity emapping is
    port (
    a,b,c,raz,clk:in std_logic;
    va,vb,vc: out std_logic;
    Digit0,Digit1,Digit2,Digit3,Digit4,Digit5,Digit6: out std_logic
    );
    end emapping;

    architecture amapping of emapping is

    component TP1_S2_HUET_ROBIN
    port(
    a,b,c,raz,clk: in std_logic;
    va,vb,vc: out std_logic;
    compteurT: out integer
    );
    end component TP1_S2_HUET_ROBIN;

    component compteur
    port(
    raz,clk: in std_logic;
    compteurC: in integer;
    Digit0,Digit1,Digit2,Digit3,Digit4,Digit5,Digit6: out std_logic
    );
    end component compteur;

    signal compte: integer;

    begin
    bbbb : TP1_S2_HUET_ROBIN port map( a, b, c, raz, clk, va, vb, vc, compteurT);
    aaaa : compteur port map(raz, clk, compte, Digit0, Digit1, Digit2, Digit3, Digit4, Digit5, Digit6);

    end architecture amapping;
    /*
    configuration cmapping of emapping is
    for FSM
    for bbbb : TP1_S2_HUET_ROBIN USE ENTITY WORK.TP1_S2_HUET_ROBIN;
    end for;

    for aaaa : compteur USE ENTITY WORK.compteur;
    end for;
    end for;
    end configuration cmapping;
    */

  2. #2
    Membre expérimenté

    Homme Profil pro
    Collégien
    Inscrit en
    Juillet 2010
    Messages
    545
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Afghanistan

    Informations professionnelles :
    Activité : Collégien

    Informations forums :
    Inscription : Juillet 2010
    Messages : 545
    Points : 1 429
    Points
    1 429
    Par défaut
    Bonjour,

    Comme indiqué dans le message d'erreur, dans l'entité emapping tu utilise un objet appelé compteurT sans le déclarer.

  3. #3
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Février 2016
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Mayenne (Pays de la Loire)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2016
    Messages : 2
    Points : 1
    Points
    1
    Par défaut
    En fait, compteurC est le signal d'entrée du compteur mis a '1' par le signal de sortie compteurT, ils ne sont donc pas des entrée sortie de mon circuit totale mais juste une liaison entre les deux components.

Discussions similaires

  1. [SAX] Erreur parsing SAX: The entity "lg" was referenced, but not declared.
    Par nouknouk dans le forum Format d'échange (XML, JSON...)
    Réponses: 1
    Dernier message: 12/10/2009, 13h24

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo