Top Banner
Compte Rendu TP N°1 Le but de ce TP est l’exploration de l’environnement ISE ainsi que la découverte de flot de conception sur FPGA en utilisant des applications de base. ISIMM 2014/2015 BEDOUI Nidhal HAMDI AmenAllah
17

Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Mar 14, 2023

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Compte Rendu TP N°1 Le but de ce TP est l’exploration de l’environnement ISE ainsi que la

découverte de flot de conception sur FPGA en utilisant des

applications de base.

ISIMM 2014/2015 BEDOUI Nidhal HAMDI AmenAllah

Page 2: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Table des matières

Table des matières

Introduction _________________________________________________________________ 1

Concernant l’éditeur Xilinx ISE _____________________________ Erreur ! Signet non défini.

Application ______________________________________________________________ 3-->15

Page 3: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 01

Introduction Le VHIC hardware description langage (VHIC : Very High Speed Integrated Circuit) a été

formalisé en 1987 par l’IEEE, sous la norme IEEE 1076-87. Une importante évolution est

parue en 1993, sous la norme IEEE 1076-93. C’est cette version du langage du langage qui

est majoritairement supportée par les outils du marché.

Le VHDL est un langage de description matériel, ce n’est absolument qu’un langage

«Software » comme le C ou le Java.

A partir de ce langage, on peut définir un système par une structure hiérarchique de fonctions

par une structure matérielle, en encore par une modélisation temporelle (même si elle n’est

pas utilisable pour faire du code synthétisable).

Ce langage permet d’aller d’un niveau d’abstraction très élevée, par une description

algorithmique, jusqu’à un niveau proche du matériel, où l’on décrit le système par un ensemble

de portes logiques et d’interconnexions (« Gate Level »). Entre les deux, se trouve le niveau

RTL (Register Transfer Level), qui permet de définir le système par une architecture de type

machine de Moore ou Mealy.

Application écrit

en VHDL

Synthèse :

Compilation et

génération du

schéma RTL

Simulation

fonctionnelle

Mapping

Placement et

routage sur

support

Simulation

temporelle

Configuration du

bitstream sur

FPGA

Page 4: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 02

Concernant l’éditeur Xilinx ISE Xilinx fournit dans son pack d’outils différents soft permettant la création de systèmes

embarqués sur puce, parmi ces softs on dénombre ISE (Integrated Software Environment) et

EDK (Embedded Development Kit), tous les deux nous offrent la possibilité d’avoir un

Bitstream pour la programmation des FPGA suivant l’application ciblée.

Page 5: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 03

Application Mode d’exploitation de l’outil ISE :

Création d’un projet sur ‘’ ISE webpack ‘’

1- On lance le logiciel Xilinx 13.1

2- On sélectionne File -> new Project. Une fenêtre s’ouvre puis on saisit le nom de

projet :

3- On appuie sur le bouton Next, une nouvelle fenêtre s’ouvre dans laquelle on choisit les

caractéristiques de la cible d’implémentation.

Page 6: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 04

on a choisi comme cible Spartan3E :

Pour le comportement du circuit, on utilise deux méthodes pour l’exploiter :

1èr méthode :

----------------------------------------------------------------------------------

-- Company:

-- Engineer:

-- Create Date 14:17:46 02/02/2015

-- Design Name:

-- Module Name: additionneur - Behavioral

Page 7: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 05

-- Project Name:

-- Target Devices:

-- Tool versions:

-- Description:

--

-- Dependencies:

--

-- Revision:

-- Revision 0.01 - File Created

-- Additional Comments:

----------------------------------------------------------------------------------

Library IEEE;

Use IEEE.STD_LOGIC_1164.ALL;

Entity additionneur is

Port (x: in STD_LOGIC_VECTOR (4 downto 0) ;

y: in STD_LOGIC_VECTOR (4 downto 0);

cin : in STD_LOGIC;

clk : in STD_LOGIC;

sum : out STD_LOGIC_VECTOR (4 downto 0;

cout : out STD_LOGIC);

end additionneur;

Architecture Behavioral of additionneur is

Begin

Page 8: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 06

sum <= cin xor ( x xor y ) ;

cout <= ( x and y ) or ( x and cin ) or ( y and cin ) ;

end Behavioral;

Tableau des resources:

Device Utilization Summary

Logic Utilization Used Available Utilization Note(s)

Number of 4 input LUTs 2 29,504 1%

Number of occupied Slices 1 14,752 1%

Number of bonded IOBs 5 250 2%

On obtient le circuit logique :

Page 9: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 07

Test Bench

Programme de test Bench :

--------------------------------------------------------------------------------

-- Company:

-- Engineer:

--

-- Create Date: 15:44:50 02/09/2015

-- Design Name:

-- Module Name: C:/Users/poste/Desktop/Amen nidhal/projet1/application_tb.vhd

Page 10: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 08

-- Project Name: projet1

-- Target Device:

-- Tool versions:

-- Description:

--

-- VHDL Test Bench Created by ISE for module: application1

--

-- Dependencies:

--

-- Revision:

-- Revision 0.01 - File Created

-- Additional Comments:

--

-- Notes:

-- This testbench has been automatically generated using types std_logic and

-- std_logic_vector for the ports of the unit under test. Xilinx recommends

-- that these types always be used for the top-level I/O of a design in order

-- to guarantee that the testbench will bind correctly to the post-implementation

-- simulation model.

--------------------------------------------------------------------------------

LIBRARY ieee;

USE ieee.std_logic_1164.ALL;

Page 11: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 09

-- Uncomment the following library declaration if using

-- arithmetic functions with Signed or Unsigned values

--USE ieee.numeric_std.ALL;

ENTITY application_tb IS

END application_tb;

ARCHITECTURE behavior OF application_tb IS

-- Component Declaration for the Unit Under Test (UUT)

COMPONENT application1

PORT(

x : IN std_logic;

y : IN std_logic;

cin : IN std_logic;

cout : OUT std_logic;

sum : OUT std_logic

);

END COMPONENT;

--Inputs

Page 12: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 10

signal x : std_logic := '0';

signal y : std_logic := '0';

signal cin : std_logic := '0';

--Outputs

signal cout : std_logic;

signal sum : std_logic;

-- No clocks detected in port list. Replace <clock> below with

-- appropriate port name

-- constant <clock>_period : time := 10 ns;

--

BEGIN

-- Instantiate the Unit Under Test (UUT)

uut: application1 PORT MAP (

x => x,

y => y,

cin => cin,

cout => cout,

sum => sum

);

Page 13: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 11

-- -- Clock process definitions

-- -- <clock>_process :process

-- begin

-- <clock> <= '0';

-- wait for <clock>_period/2;

-- <clock> <= '1';

-- wait for <clock>_period/2;

-- end process;

--

--

-- -- Stimulus process

-- stim_proc: process

-- begin

-- -- hold reset state for 100 ns.

-- wait for 100 ns;

--

-- wait for <clock>_period*10;

--

-- -- insert stimulus here

--

-- wait;

-- end process;

x <= '0','1' after 20 ns, '0' after 150 ns;

Page 14: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 12

y <= '1','0' after 40 ns, '0' after 100 ns;

cin <= '0','1' after 20 ns, '0' after 100 ns;

END;

2èm méthode

----------------------------------------------------------------------------------

-- Company:

-- Engineer:

--

Page 15: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 13

-- Create Date: 15:19:06 02/09/2015

-- Design Name:

-- Module Name: application1 - Behavioral

-- Project Name:

-- Target Devices:

-- Tool versions:

-- Description:

--

-- Dependencies:

--

-- Revision:

-- Revision 0.01 - File Created

-- Additional Comments:

--

----------------------------------------------------------------------------------

library IEEE;

use IEEE.STD_LOGIC_1164.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

Page 16: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 14

-- any Xilinx primitives in this code.

--library UNISIM;

--use UNISIM.VComponents.all;

entity application1 is

Port ( x : in STD_LOGIC;

y : in STD_LOGIC;

cin : in STD_LOGIC;

cout : out STD_LOGIC;

sum : out STD_LOGIC);

end application1;

architecture Behavioral of application1 is

signal s1,s2,s3,s4:std_logic ;

component xor1 is

port(a,b : in std_logic ;s : out std_logic);

end component;

component and1 is

port(a,b : in std_logic ;s : out std_logic);

end component;

component or1 is

port(a,b,c : in std_logic ;s : out std_logic);

end component;

Page 17: Manipulation Synthèse VHDL - TP en XILINX ISE - Mr Boubaker Mohammed - Tunisie - ISIMM

Pg. 15

Begin

k1:xor1 port map (a=>x, b=>y, s=>s1);

k2:xor1 port map (a=>s1, b=>cin, s=>sum);

k3:and1 port map (a=>x, b=>y, s=>s2);

k4:and1 port map (a=>x, b=>cin, s=>s3);

k5:and1 port map (a=>y, b=>cin, s=> s4);

k6:or1 port map (a=>s2, b=>s3, c=>s4, s=>cout);

End Behavioral ;