Difference between revisions of "Langage VHDL"

From Fixme.ch
Jump to: navigation, search
(Jongleur)
(Jongleur)
Line 53: Line 53:
  
 
=> travail en cours  
 
=> travail en cours  
* [FAIT] Réalisé un compteur de 2Hz et faire tourner les segment dans le sens des aiguilles d'une montre (sens de F1 -> E1 -> A1 -> A2 -> B2 -> C1... en on recommence)  
+
* [FAIT] Réalisé un compteur de 2Hz et faire tourner les segment dans le sens des aiguilles d'une montre (sens de F1 -> E1 -> A1 -> A2 -> B2 -> C1... en on recommence)
 +
* [EN COURS] avec le Switch S9 de la carte, doit permettre d'arrêter la séquence, de la redémarrer dans l'autre sens, si on appuie à nouveau la séquence s'arrête, si on appuie encore une fois al séquence repart dans la sens initial 
  
 
''In English :'' With an electronics board created by the ETML-ES School and equiped with a FPGA, realization / Simulation of a juggler with the both 7 Segments Display  
 
''In English :'' With an electronics board created by the ETML-ES School and equiped with a FPGA, realization / Simulation of a juggler with the both 7 Segments Display  

Revision as of 13:45, 14 September 2016


Description

In french :

En se basant sur des livres sur le VHDL, des supports de cours ou sur le net directement, ce wiki a pour but de montrer des exemples de codes réalisés sur des plaques d'évaluation.

L'onglet discussion peut être fort intéressant concernant des astuces, questions, problèmes rencontrés lors de développement en VHDL. Alors n'hésiter pas à compléter ce wiki et la page discussion et le projet "GITHUB" qui lui sera associé :-)

In English:

Based on the VHDL Books, cours support or links on the net, this wiki has for goal to show some VHDL examples releazied on experimental board.

Development Environment

For Windows

-> Dev environment for Philou :

  • Windows Seven SP1
    • Quartus II Version 9.1 SP2

Description Project

7 Segment Display - DONE

In french : A l'aide d'une FPGA (EMP1270T144C5) et d'une carte électronique créée par l'ETML-ES, réalisation d'un schéma logique concernant l'affichage 7 segments (de 0 à F) sous Quartus et ensuite réaliser le code en VHDL.

  • 4 entrées correspondant à des switch
  • [FAIT] réalisation d'une table de vérité
  • [FAIT] simplification de la table de vérité par karnaugh et trouvé les équations logiques
  • [FAIT] réalisation du schéma logique sous Quatrus
  • [FAIT] Simulation avec Quartus
  • [FAIT] Réalisation d'un code VHDL selon les équations trouvé avec les tables de Karnaugh

In English  : With an electronics board created by the ETML-ES School and equiped with a FPGA, realization of logic schemtatics concerning the 7 Segments dispaly (0 to F) under Quartus and to write a VHDL Code.

  • 4 inputs : (switches)
  • [DONE] Realization of a truth table
  • [DONE] simplification of the truth table by Karnaugh table and found the logic equation
  • [DONE] Realization of logic schematics (Quartus)
  • [DONE] Simulation with Quartus
  • [DONE] realization VHDL code according the Karnaugh Table

Jongleur

In french : A l'aide d'une FPGA (EMP1270T144C5) et d'une carte électronique créée par l'ETML-ES, réalisation / simulation d'un jongleur à l'aide des deux affichage 7 segments à disposition.

  • Les segments A / E / F de l'affichage 7Seg_A seront utilisés
  • Les segments A / B / C de l'affichage 7Seg_B seront utilisés
  • Utilisation du PEC12 pour lancement du jonglage
  • Reset pour arrêter le jonglage
  • 4 switches utilisés pour le mode de Jonglage
  • PEC12 pour le choix de la vitesse (allant de 0,5 Hz à 2 Hz)

=> travail en cours

  • [FAIT] Réalisé un compteur de 2Hz et faire tourner les segment dans le sens des aiguilles d'une montre (sens de F1 -> E1 -> A1 -> A2 -> B2 -> C1... en on recommence)
  • [EN COURS] avec le Switch S9 de la carte, doit permettre d'arrêter la séquence, de la redémarrer dans l'autre sens, si on appuie à nouveau la séquence s'arrête, si on appuie encore une fois al séquence repart dans la sens initial

In English : With an electronics board created by the ETML-ES School and equiped with a FPGA, realization / Simulation of a juggler with the both 7 Segments Display

  • Segments A / E / F of Display A will be used
  • Segments A / B / C of Display B will be used
  • Using of PEC12 to start the juggling
  • Reset to stop the juggling
  • 4 switches used for the mode of juggling
  • PEC12 to use the speed choice of juggling (to 0,5 Hz at 2 Hz)

=> work in progress

  • [DONE] Realized a cycle counter of 2Hz to do turned the segments in clockwise (Way: F1 -> E1 -> A1 -> A2 -> B2 -> C1... it is continuous

Project Source

VHDL Code

IN FRENCH: pour qu'un code VHDL soit au minium compilable/synthétisable, il faut qu'il ait un bloc d'entité (entity), une architecture et la déclaration de librairie (library).

IN ENGLISH: a VHDL code need 3 parts : 1/ declaration of libraries 2/ declaration of entity 3/ declaration of architecture

library

IN FRENCH: dans notre code VHDL pour que celui-ci puisse être compilé il faut ajouter une référence à une ou des librairies que nous voudrions utiliser.

IN ENGLISH: for that our VHDL code compiles, we need to use the different libraries, below the most library used.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.all;

entity

IN FRENCH: il faut aussi une entité qui contiendra les ports (entrée / sortie), soit réel, soit lié à un composant interne au composant électronique

IN ENGLISH: then a entity must been implemented, this one includes the ports (input/output) either real or linked a the electronic internal componant

PORTS

IN FRENCH: Pour déclarer un port, il faut : UN NOM, UN MODE (in / out / inout), UN TYPE (bit / std_logic / bit_vector / std_logic_vector)

IN ENGLISH: To declare a port, it must : a NAME, a MODE (in / out / inout), a TYPE (bit / std_logic / bit_vector / std_logic_vector)

entity NOM_ENTITY is
 port( -- délcaration ports IN/OUT 
      exemple_1 : in bit; 
      exemple_2 : out std_logic; 
      exemple_3 : inout std_logic_vector(3 downto 0)
 ); 
end NOM_ENTITY;

architecture

IN FRENCH : l'architecture est le corps du programme, celui-ci est composé de la déclaration interne des signaux qui ne sont pas utilisés dans l'entité du programme, ensuite utiliser le mot clé begin et écrire le comportement du programmes // affectation // déclaration de process


IN ENGLISH : the architecture is the program body, this one makes up of internal signal's declaration not used in the entity. Then use the key word begin follow-up of program's behavior // allocation // process statment.

Exemple

architecture Architecture_name of Entity_name is
 // déclaration signaux interne

 begin     
 
 //comportement systeme 
end Architecture_name;

compteur / counter

component

Link

lien WEB

lien PDF

lien interne

Participant