0% found this document useful (0 votes)
87 views4 pages

VHDL 2012 Part 2 PDF

This document provides an overview of sequential logic and processes in VHDL. It discusses how sequential logic must be described within processes, while combinational logic can be described outside of processes or within a process where the order of instructions is important. It also provides an example of a D flip-flop described using a process that is triggered on the clock edge, and how attributes can be used to test for specific signal conditions like a rising clock edge.

Uploaded by

Sòu Mia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views4 pages

VHDL 2012 Part 2 PDF

This document provides an overview of sequential logic and processes in VHDL. It discusses how sequential logic must be described within processes, while combinational logic can be described outside of processes or within a process where the order of instructions is important. It also provides an example of a D flip-flop described using a process that is triggered on the clock edge, and how attributes can be used to test for specific signal conditions like a rising clock edge.

Uploaded by

Sòu Mia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Liste de sensibilité des process

„ ZĂƉƉĞůƐ
… hŶƉƌŽĐĞƐƐ Ɛ͛ĞdžĠĐƵƚĞĞdžĐůƵƐŝǀĞŵĞŶƚƐŝƵŶĚĞƐƐŝŐŶĂƵdžůŝƐƚĠƐĚĂŶƐůĂ
ůŝƐƚĞĚĞƐĞŶƐŝďŝůŝƚĠĂĠǀŽůƵĠ
„ WŽƵƌƵŶĞďĂƐĐƵůĞ
hd/>/^d/KE^WZK^^ s,> …
…
><
>Zʹ Z^d
^LJŶĐŚƌŽŶĞ

WKhZ>^^h>^͕>^
„

„ ƐLJŶĐŚƌŽŶĞ

„ WŽƵƌƵŶǀĞƌƌŽƵ
sZZKh^͕>^KDWdhZ^͕>^ …
…
>;>ĂƚĐŚ ŶĂďůĞͿ
;ĞŶƚƌĠĞͿ

Z'/^dZ>>'͕͙ … >Zʹ Z^d


„ ^LJŶĐŚƌŽŶĞ
„ ƐLJŶĐŚƌŽŶĞ

„ ĞƐŽŝŶ͗ŽĚĞƌůĂƐĞŶƐŝďŝůŝƚĠăĚĞƐĨƌŽŶƚƐ 

Logique séquentielle et process Exemple de bascule D


„ WŽƵƌƵŶĞďĂƐĐƵůĞ
„ >ĂůŽŐŝƋƵĞƐĠƋƵĞŶƚŝĞůůĞĞƐƚŶĠĐĞƐƐĂŝƌĞŵĞŶƚĚĠĐƌŝƚĞĚĂŶƐůĞƐ Library ieee; -- en-tête

ƉƌŽĐĞƐƐ USE ieee.std_logic_1164;

„ >ĂůŽŐŝƋƵĞĐŽŵďŝŶĂƚŽŝƌĞƉĞƵƚġƚƌĞĚĠĐƌŝƚĞŚŽƌƐƉƌŽĐĞƐƐ Entity Bascule_D is --entité

;ŝŶƐƚƌƵĐƚŝŽŶƐĐŽŶĐƵƌƌĞŶƚĞƐͿŽƵĚĂŶƐƵŶƉƌŽĐĞƐƐ ;ů͛ŽƌĚƌĞĚĞƐ port(


D, CLK : in std_logic;
ŝŶƐƚƌƵĐƚŝŽŶƐĞƐƚŝŵƉŽƌƚĂŶƚͿ Q : out std_logic);
End Bascule_D ;
„ ^ƚƌƵĐƚƵƌĞĚ͛ƵŶƉƌŽĐĞƐƐ ͗
process (liste de signaux) Architecture ARCHI of Bascule_D is -- architecture
Begin
-- partie déclarative (si besoin)
Process(CLK)
begin Begin
if SEL = … if (CLK = ‘1’) then
Q <= D;
-- suite du code end if ;
end process; End process
End ARCHI ;
VHDL – IOGS 2011-2012  
Exemple de bascule D Notion d’attributs
„ WŽƵƌƵŶĞďĂƐĐƵůĞ
„ džĞŵƉůĞƐ
Architecture ARCHI of Bascule_D is -- architecture
Begin CLK’envent : ĨƌŽŶƚĚ͛ŚŽƌůŽŐĞ
Process(CLK)
Begin Q’right : ďŝƚĚĞĚƌŽŝƚĞ ĚƵŵŽƚY
wait until (CLK=‘1’)
Q <= D;
End process
Integer’range : ŐĂŵŵĞ ĚĞǀĂƌŝĂƚŝŽŶĚĞƐĞŶƚŝĞƌƐ
End ARCHI ;

„ /ŶƚĠƌġƚ͗ŵĞŝůůĞƵƌĞůŝƐŝďŝůŝƚĠ „ ƉƉůŝĐĂƚŝŽŶ
„ /ŶĐŽŶǀĠŶŝĞŶƚ͗ƵŶƐĞƵůƐŝŐŶĂůƚĞƐƚĂďůĞĂŝŶƐŝ CLK’envent and CLK = ‘1’ Æ ĚĠƚĞĐƚĞ ƵŶĨƌŽŶƚŵŽŶƚĂŶƚ
Ě͛ŚŽƌůŽŐĞ
VHDL – IOGS 2011-2012  VHDL – IOGS 2011-2012 

Bascule D avec Clear asynchrone Bascule D avec Clear synchrone


„ džĞŵƉůĞƐ „ džĞŵƉůĞƐ
Entity Basc_D is --entité Entity Basc_D is --entité
port( port(
D, CLK, CLEAR : in std_logic; D, CLK, CLEAR : in std_logic;
Q : out std_logic); Q : out std_logic);
End Basc_D ; End Basc_D ;

Architecture ARCHI of Basc_D is -- architecture Architecture ARCHI of Basc_D is -- architecture


Begin Begin
Process(CLK,CLEAR) Process(CLK,CLEAR)
Begin Begin
if CLEAR = ‘1’ then Q <= ‘0’ Å Clear asynchrone if (CLK’event and CLK = ‘1’) then
elsif (CLK’event and CLK = ‘1’) then Q <= D; Å Mettre un else if CLEAR = ‘1’ then Q <= ‘0
end if ; else Q <= D;
End process end if ;
End ARCHI ; End process
End ARCHI ;
 
Registre à décalage
„ džĞŵƉůĞƐ
Entity REGISTRE is --entité
port(
D_IN, CLK : in std_logic;
Q_OUT : out std_logic);
End EXEMPLE ;
^Z/Wd/KE h>E''
s,>;^h/dͿ͗s,>
Architecture ARCHI of REGISTRE is -- architecture
Begin
Signal S : std_logic
Process(CLK)
Begin ^dZhdhZ>
if (CLK’event and CLK = ‘1’) then !! Les signaux ne sont
S1 <= D_IN ; mis à jour qu’a la fin du
Q_OUT <= S1; process
end if ;
End process
„ End ARCHI ; 

VHDL structurel VHDL structurel

„ WƌŝŶĐŝƉĞ Entity MA_FCT is


Port( A,B,C,D,E,F,G,H,I: in std_logic_vector;
… ĐƌŝƌĞĚĞƐďůŽĐƐĚĞĐŽĚĞĚĠĐůĂƌĠƐĐŽŵŵĞĐŽŵƉŽƐĂŶƚƐ S : out);
End MA_FCT;
… ZĠƵƚŝůŝƐĞƌĐĞƐĐŽŵƉŽƐĂŶƚƐ
… KŶƉĂƌůĞĚ͛ŝŶƐƚĂŶĐŝĂƚŝŽŶĚĞĐŽŵƉŽƐĂŶƚůŽƌƐƋƵ͛ŽŶĨĂŝƚĂƉƉĞůăƵŶ Architecture ARCHIT of MA_FCT is
ŵŽĚƵůĞ Signal J,K,L : bit_vector -- Declarations
Component : OR3 port ( A1,B1,C1 : in std_logic; S1: out
… >ĞĐŽĚĞĚĞƐĐŽŵƉŽƐĂŶƚƐƉĞƵƚġƚƌĞĚĂŶƐůĞŵġŵĞĨŝĐŚŝĞƌ͕ĚĂŶƐƵŶ std_logic);
ĂƵƚƌĞĨŝĐŚŝĞƌ͕ŽƵĚĠũăĐŽŵƉŝůĠ͘ Component : AND3 port( A2,B2,C2 : in std_logic;
S2: out std_logic); -- declaration composant

„ /ŶƚĠƌġƚ UN : OR3 port map(A,B,C,J); -- description structurelle


DEUX : OR3 port map(D,E,F,K);
… ĞƐŝŐŶŚŝĠƌĂƌĐŚŝƐĠ TROIS: OR3 port map(G,H,I,L);
… ƉƉĞůăĚĞƐĠůĠŵĞŶƚƐĚĠũăŵŝƐĂƵƉŽŝŶƚ QUATRE: AND3 port map(J,K,L,S); -- Ici S est générée

End ARCHIT;
VHDL – IOGS 2011-2012  VHDL – IOGS 2011-2012 
VHDL structurel
„ /ŶƚĠƌġƚ
… ZĠƵƚŝůŝƐĞƌĚĞƐĨŽŶĐƚŝŽŶƐ
… ůĂƌƚĠĚ͛ĠĐƌŝƚƵƌĞ

„ /ŶĐŽŶǀĠŶŝĞŶƚ
… &ŝĐŚŝĞƌƐͨ ůŽƵƌƐ ͩ
„ ƌĠĂƚŝŽŶĚĞƉĂĐŬĂŐĞƋƵŝĐŽŶƚŝĞŶŶĞŶƚůĞƐĐŽŵƉŽƐĂŶƚƐ

„ ǀĞĐYƵĂƌƚƵƐ
… >͛ĂƐƉĞĐƚƐƚƌƵĐƚƵƌĞůÆ 'ƌĂƉŚŝƋƵĞ
… >͛ĂƐƉĞĐƚĂůŐŽƌŝƚŚŵŝƋƵĞÆ ƚĞdžƚƵĞůsŚĚů

VHDL – IOGS 2011-2012 

You might also like