Explorer les Livres électroniques
Catégories
Explorer les Livres audio
Catégories
Explorer les Magazines
Catégories
Explorer les Documents
Catégories
1° ANNEE ELN
Modélisation et Synthèse des Circuits Logiques
Exercice 5.
Décrire en Vhdl la machine d’état du système
d’ouverture d’une porte automatique. La porte
ne s’ouvre que si l’on tape la séquence ‘1’, ‘2’,
‘3’
Exercice 8
Etablir le code VHDL du circuit décrit par le
graphe d’état ci contre
Exercice 9 Séquenceur
On désire réaliser une fonction dont la sortie S
recopie l’état logique présent sur son entrée E si
celle-ci est restée stable après 2 coups d’horloge
successifs.
L’entrée asynchrone R AZ définit l’état initial du
système. - Décrire en Vhdl ce circuit
1.Compléter le chronogramme ci-contre
en fonction du comportement décrit
précédemment.
Exercice 4
Exercice 5.
Library ieee ;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;
Entity fsm_Cadenas is
Port(clk, reset,INo : IN std_logic ;
INd : IN std_logic_vector(3 downto 0) ;
Dv: OUT std_logic);
End Entity;
Architecture fsm of fsm_Cadenas is
Type states is (Attente,Ld1,Ld2,Ld3, Ld4, Ld5, CVr, CDVr);
type NumericCodeType is array (4 downto 0) of Integer range 0 to 9;
type vect is array(4 downto 0) of std_logic_vector(3 downto 0) ;
constant EntryCode : NumericCodeType := (2,6,0,4,8);
signal code: vect ;
Signal etat : states;
signal CP: std_logic;
Begin
Process(clk, reset)
Begin
If reset='1' then etat <=Attente;
elsif rising_edge(clk) then
Case etat is
When Attente =>
for i in 0 to 4 loop
Code(i)<=std_logic_vector(to_unsigned(Entrycode(i),4));
End loop;
if INo='1' then etat<=Ld1;
else etat<=Attente; end if;
When Ld1 => if CP='1' then etat<= CVr;
elsif INo='1' then etat<=Ld2;
Code<= "0000"&code(4 downto 1) ;
else etat<=Ld1; end if;
When Ld2 => if CP='0' then etat<= CVr;
elsif INo='1' then etat<=Ld3;
Code<= "0000"&code(4 downto 1) ;
else etat<=Ld2; end if;
When Ld3 => if CP='0' then etat<= CVr;
elsif INo='1' then etat<=Ld4;
Code<= "0000"&code(4 downto 1) ;
else etat<=Ld3; end if;
When Ld4 => if CP='0' then etat<= CVr;
Exercice7
Exercice8
library IEEE; when S2 => etat <=S4;
use ieee.std_logic_1164.all; When S3 => etat<=S5;
Entity fsm_MS is When S4=> if x='0' then etat<=S5;
Port(clk,x, reset: IN std_logic ; else etat<=S6; end if;
z: OUT std_logic); When S5=> etat<=S0;
End Entity; When S6=> etat<=S0;
Architecture fsm of fsm_MS is End case;
Type states is (S0, S1,S2, S3, S4,S5,S6); End if;
Signal etat : states; End process;
Begin Process(x,etat) --Bloc de sortie
Process(clk, reset) Begin
Begin case etat is
If reset='1'then etat<=S0; when S0|S1|S4|S6 => z<=not(x);
Elsif rising_edge(clk) then when others => z<=x;
Case etat is end case;
When S0=> if x='0'then etat<=S1; end process;
else etat<=S2; end if; End architecture;
When S1=> if x='0' then etat<=S3;
else etat<=S4; end if;