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 :

Détecteur de passage


Sujet :

VHDL

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2018
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 24
    Localisation : France, Pas de Calais (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2018
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Détecteur de passage
    Bonsoir, je travaille actuellement sur un programme pour un TP et j'ai souhaité le préparer chez moi, j'ai donc réaliser un programme mais il me donne pas mal d'erreurs, j'y ai réfléchi et j'ai fais des recherches sur internet mais je n'ai trouvé aucune solution. J'aimerai comprendre ce qui ne va pas.

    Voila le code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    library IEEE;
    use IEEE.STD_LOGIC_1164.ALL;
    use ieee.std_logic_arith.all;
    use ieee.std_logic_unsigned.all;
     
    -- Uncomment the following library declaration if using
    -- arithmetic functions with Signed or Unsigned values
    --use IEEE.NUMERIC_STD.ALL;
     
    -- Uncomment the following library declaration if instantiating
    -- any Xilinx primitives in this code.
    --library UNISIM;
    --use UNISIM.VComponents.all;
     
    entity E_Passage is
        Port ( S : in  STD_LOGIC_VECTOR (1 downto 0);
               CLK : in  STD_LOGIC;
               ID : out  STD_LOGIC;
               C : buffer  STD_LOGIC);
    end E_Passage; 
     
    architecture A_Passage of E_Passage is
      Signal Q:STD_LOGIC_VECTOR (2 downto 0):="000";
    begin
      process(CLK)
      begin
        if CLK'event and CLK='1' then
          case Q is
     
            when "000" =>
              if S1='1' and S2='0' then
                Q<="001";
              else if S1='0' and S2='1' then
                Q<="010";
              else
                Q<="000";
              end if;
     
            when "001" =>
              if S1='0' and S2='0' then
                Q<="011";
              else
                Q<="001";
              end if;
     
            when "010" =>
              if S1='0' and S2='0' then
                Q<="011";
              else
                Q<="010";
              end if;
     
            when "011" =>
              if S1='1' and S2='0' then
                Q<="100";
              else if S1='0' and S2='1' then
                Q<="101";
              else 
                Q<="011";
              end if;
     
            when "100" =>
              if S1='1' and S2='1' then
                Q<="110";
              else
                Q<="100";
              end if;
     
            when "101" =>
              if S1='1' and S2='1' then 
                Q<="111";
              else
                Q<="101";
              end if;
     
            when "110" =>
              if S1='1' and S2='1' then
                Q<="000"
              end if;
     
            when "111" =>
              if S1='1' and S2='1' then
                Q<="000";
              end if;
     
          end case;
     
        end if;
     
      end process;
     
      ID <='1' when Q="110" else
           '0';
     
      C<='1' when Q="110" else
         '1' when Q="111" else
        '0';
     
    end A_Passage;
    et Voila les erreurs:
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 58: Syntax error near "when".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 65: Syntax error near "when".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 72: Syntax error near "when".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 81: Syntax error near "when".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 88: Syntax error near "when".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 95: Syntax error near "when".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 98: Syntax error near "end".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 105: Syntax error near "case".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 109: Syntax error near "process".
    ERROR:HDLCompiler:806 - "C:/Users/Benda/Desktop/PASSAGE/Passage/E_Passage.vhd" Line 118: Syntax error near "A_Passage".
    ERROR: ProjectMgmt - 10 error(s) found while parsing design hierarchy.
    Merci d'avance.

  2. #2
    Candidat au Club
    Homme Profil pro
    enseignant
    Inscrit en
    Mai 2019
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Cameroun

    Informations professionnelles :
    Activité : enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Mai 2019
    Messages : 6
    Points : 4
    Points
    4
    Par défaut
    j'ai lu ton code du début à la fin et j'ai remarqué deux signaux "S1" et "S2" que tu utilises sans avoir déclaré: résous se problème et réessayes

Discussions similaires

  1. passage d'un nom de table dans une procédure stockée
    Par thierry V dans le forum MS SQL Server
    Réponses: 7
    Dernier message: 26/07/2010, 16h48
  2. Pb BDE suite a passage en Windows 2000 pro
    Par ARIF dans le forum Paradox
    Réponses: 4
    Dernier message: 18/11/2002, 11h39
  3. [VB6]Passage d'un tableau dans une DLL écrite en delphi
    Par flash dans le forum VB 6 et antérieur
    Réponses: 6
    Dernier message: 20/09/2002, 10h15
  4. [VB6]Passage par référence d'une prop. d'objet à une fct
    Par -gYs- dans le forum VB 6 et antérieur
    Réponses: 15
    Dernier message: 02/09/2002, 08h55
  5. Passage de parametre a une anim Flash 5
    Par debug dans le forum Intégration
    Réponses: 4
    Dernier message: 03/06/2002, 17h59

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