Beruflich Dokumente
Kultur Dokumente
ENSL1 :
Electronique numrique et synthse logique
1
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Ce circuit sera dit combinatoire si, chaque fois quon lui prsente une mme combinaison en entre, il donnera toujours la mme rponse en sortie. Il sera dit squentiel si, une mme combinaison en entre, prsente des instants diffrents, peut donner des rponses diffrentes en sortie.
2
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Circuits combinatoires
Dcodeurs Binaire naturel binaire rflchi Dcodeur 2 4, 3 8, BCD 7 segments, Encodeur de priorit Encodeur 4 2, 8 3, Multiplexeur Multiplexeur 2 1, 4 1, Dmultiplexeur Dmultiplexeur 1 2, 1 4, Additionneur Soustracteur Comparateur
3
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
4
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Dcodeur BN
1/
BR (Recherche du schma)
trouver le schma logique du circuit combinatoire qui gnre une valeur de sortie en binaire rflchie, correspondant une valeur dentre exprime en binaire naturel
2/
5
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Dcodeur BN
3/
BR (Recherche du schma)
E2 E1 E0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 S2 S1 S0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0
4/
ENSL1
Dcodeur BN
5/
BR
S2 = E2 S1 = E2 S0 = E1 E1 E0
(Recherche du schma)
Etablir le schma
E2 E1 E0
E2
INPUT VCC XOR OUTPUT OUTPUT
S2
E1
INPUT VCC
S1
S2 S1 S0
inst
XOR OUTPUT
E0
INPUT VCC
S0
inst2
7
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
5/ 6/
ENSL1
Dcodeur BN
1/
BR (Description VHDL)
trouver le schma logique du circuit combinatoire qui gnre une valeur de sortie en binaire rflchie, correspondant une valeur dentre exprime en binaire naturel
2/
9
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Dcodeur BN
3/
BR (Description VHDL)
entity bn_br is port ( E2,E1,E0 : in std_logic; S2,S1,S0 : out std_logic ); end bn_br;
10
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Dcodeur BN
4/
BR (Description VHDL)
E2 E1 E0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 S2 S1 S0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0
5/
Si les quations sont simples, crire la dclaration darchitecture laide daffectations simples.
Cest le cas S2 = E2 S1 = E2 S0 = E1 E1 E0
11
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Dcodeur BN
S2 = E2 S1 = E2 S0 = E1
BR (Description VHDL)
E1 E0
5/ Dclaration darchitecture
architecture bn_br_arch of bn_br is begin S2 <= E2; S1 <= E2 xor E1; S0 <= E1 xor E0; end bn_br_arch; bn_br_arch
12
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Dcodeur BN
BR (Description VHDL)
13
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Dcodeur BN BR (Description VHDL utilisant une affectation conditionnelle) 6/ Description faite directement partir de la table de vrit :
architecture bn_br_arch2 of bn_br is signal entree,sortie : std_logic_vector (2 downto 0); begin entree(2) <= E2; Ne pas oublier dinitialiser les entree(1) <= E1; cases du tableau des entres entree(0) <= E0; avant de lutiliser. sortie <= "000" when entree="000" else "001" when entree="001" else "011" when entree="010" else "010" when entree="011" else "110" when entree="100" else "111" when entree="101" else "101" when entree="110" else "100" ; S2 <= sortie(2); Ne pas oublier daffecter les S1 <= sortie(1); signaux de sorties avant de S0 <= sortie(0); fermer larchitecture end bn_br_arch2; 14
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
E2 E1 E0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1
S2 S1 S0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0
ENSL1
Dcodeur BN BR (Description VHDL utilisant une affectation slective) 6/ Description faite directement partir de la table de vrit :
E2 E1 E0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1
S2 S1 S0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0
architecture bn_br_arch2 of bn_br is signal entree,sortie : std_logic_vector (2 downto 0); begin entree(2) <= E2; entree(1) <= E1; entree(0) <= E0; with entree select sortie <= "000" when "000" , "001" when "001" , "011" when "010" , "010" when "011" , "110" when "100" , "111" when "101" , "101" when "110" , "100" when others; others; S2 <= sortie(2); S1 <= sortie(1); S0 <= sortie(0); end bn_br_arch2; 15
Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Michel KRAMMER
ENSL1
Un dcodeur 2 4 est un circuit 2 entres et 4 sorties. Un dcodeur 3 8 est un circuit 3 entres et 8 sorties. Cest un circuit qui, a un instant donn, na quune seule sortie active, parmi les 4 ou les 8. Cest la sortie dont lindice correspond la valeur dentre. Ltat actif dune sortie peut tre ltat 1 ou ltat 0.
16
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
S3
0 1 0 1
E1 E0
S2 S1 S0
17
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
4/
quations videntes
18
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Dcodeur 2 4
5/
(Recherche du schma)
S0 = E1.E0 S1 = E1.E0 S2 = E1.E0 S3 = E1.E0
Etablir le schma
E1 E0
NOT
AND2 OUTPUT
E1
INPUT VCC
inst3
NOT
S0
S0 S1 S2 S3
inst4
AND2 OUTPUT
E0
INPUT VCC
inst
S1
inst5
AND2 OUTPUT
S2
inst6
AND2 OUTPUT
S3
inst7
19
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
ENSL1
(Description VHDL)
Un dcodeur BCD 7 segments est un circuit de commande dun afficheur 7 segments. Il gnre en sortie les 7 signaux ncessaires laffichage du symbole hexadcimal, correspondant la valeur binaire dentre comprise entre 0 et 15
2/
Il possde 4 entres (valeur binaire de 0 15) , et 7 sorties commandant chacune les segments de lafficheur.
21
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
(Description VHDL)
a b c d e f g S0 S1 S2 S3 S4 S5 S6 1 1 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 1 1 1 0 0 0 1 1 1
22
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
(Description VHDL)
23
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
S0 S1 S2 S3 S4 S5 S6 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 1 1 0 1 1 0 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1
Dclaration darchitecture (en utilisant une affectation slective) slective) a E3 E2 E1 E0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 b c d e f g architecture bcd_7seg_2_arch of bcd_7seg_2 is begin with E select S <= "1111110" when "0000" , "0110000" when "0001" , "1101101" when "0010" , "1111001" when "0011" , "0110011" when "0100" , "1011011" when "0101" , "1011111" when "0110" , "1110000" when "0111" , "1111111" when "1000" , "1111011" when "1001" , "1110111" when "1010" , "0011111" when "1011" , "1001110" when "1100" , "0111101" when "1101" , "1001110" when "1110" , "1000111" when others ; end bcd_7seg_2_arch; 25
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
S0 S1 S2 S3 S4 S5 S6 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 1 1 0 1 1 0 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1
S sel1 sel0
26
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Table de vrit
Sel1 Sel0 0 0 1 1 0 1 0 1 S E0 E1 E2 E3
Equation
S = Sel1.Sel0.E0 + Sel1.Sel0.E1 + Sel1.Sel0.E2 + Sel1.Sel0.E3
27
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Schma
E3 E2 E1 E0 Sel1 Sel0
AND3
E3
INPUT VCC
inst
AND3
E2
INPUT VCC
OR4
inst7
OUTPUT AND3
E1
INPUT VCC
inst8
AND3
inst11
E0
INPUT VCC
inst9
NOT
Sel1
inst12
NOT
Sel0
inst13
28
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1 Multiplexeurs 4 1
( 1re Description VHDL utilisant une affectation simple) S = Sel1.Sel0.E0 + Sel1.Sel0.E1 + Sel1.Sel0.E2 + Sel1.Sel0.E3
library ieee; use ieee.std_logic_1164.all; entity mux4_1 is port ( ); end mux4_1; architecture mux4_1_arch1 of mux4_1 is begin S <= ((not Sel1) and (not Sel0) and E0) or ((not Sel1) and Sel0 and E1) or (Sel1 and (not Sel0) and E2) or (Sel1 and Sel0 and E3) ; end mux4_1_arch1; E3,E2,E1,E0,Sel1,Sel0 : in std_logic; S: out std_logic
29
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1 Multiplexeurs 4 1
conditionnelle) (2me Description VHDL utilisant une affectation
Symbole :
mux4_1 E3 E2 E1 E0 Sel1 Sel0 S
inst
Sel1 Sel0 0 0 1 1 0 1 0 1
S E0 E1 E2 E3
ENSL1 Multiplexeurs 4 1
slective ) ( 3me Description VHDL utilisant une affectation
les entres aiguiller sont dclares sous forme de simple bit les entres de slection sont regroupes sous forme de BUS
library ieee; use ieee.std_logic_1164.all; entity mux_4_1 is port ( E3,E2,E1,E0 : in std_logic; sel: in std_logic_vector ( 1 downto 0); S: out std_logic ); end mux_4_1; architecture mux_4_1_arch3 of mux_4_1 is begin with sel select s <= E0 when "00" , E1 when "01" , E2 when "10" , E3 when others; end mux_4_1_arch3; 31
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Symbole :
mux_4_1 E3 E2 E1 E0 sel[1..0] inst1 S
Sel1 Sel0 0 0 1 1 0 1 0 1
S E0 E1 E2 E3
32
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Table de vrit
Sel1 Sel0 0 0 1 1 0 1 0 1 S0 S1 S2 S3 E 0 0 0 0 E 0 0 0 0 E 0 0 0 0 E
Equations
S0 = Sel1.Sel0.E S1 = Sel1.Sel0.E S2 = Sel1.Sel0.E S3 = Sel1.Sel0.E
33
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Schma
AND3
INPUT VCC
OUTPUT
S3
S3 S2 S1 S0
inst5
AND3 OUTPUT
S2
inst6
AND3 OUTPUT
S1
Sel1 Sel0
NOT
Sel1
INPUT VCC
inst7
AND3 OUTPUT
inst
NOT
Sel0
INPUT VCC
S0
inst4
inst8
34
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Symbole:
dmux1_4 E S3
sel[1..0] S2 S1 S0
inst
35
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
En binaire:
bit de retenue
1 1 1
bits dentres
Si on arrive trouver le schma logique, dune cellule capable de gnrer le bit de somme et le bit de retenue, pour toutes les combinaisons possibles des bits dentres, alors en cascadant n cellules identiques, on arrivera faire laddition de nombres au format n bits.
bit de somme
Chaque cellule additionneur aura : 3 bits dentres : an (bit de rang n du nombre A) bn (bit de rang n du nombre B) rn (retenue gnre par la cellule de rang n-1) sn (bit de somme de rang n) rn (retenue de rang n applique la cellule de rang n+1)
an bn Add rn+1 sn rn
2 bits de sortie :
36
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
s4 s3 s2 s1 s0
a3
b3
r3
a2
b2
r2
a1
b1
r1
a0
b0
r0
an
bn Add
rn
an
bn Add
rn
an
bn Add
rn
an
bn Add
rn
rn+1 sn
rn+1 sn
rn+1 sn
rn+1 sn
s4
s3
s2
s1
s0
37
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
an bn Add rn+1 sn rn
Karnaugh:
rn+1
rn
an bn 00
01 0 1
11 1 1
10 0 1
0 1
0 0
rn
01 1 0
11 0 1
10 1 0
0 1
0 1
sn= rn.an.bn + rn.an.bn + rn.an.bn + rn.an.bn sn= rn.(an.bn + an.bn) + rn.(an.bn + an.bn) sn= rn.(an bn) + rn.(an bn) = rn an
bn
sn= rn
an
bn
38
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Symbole:
inst
XOR OUTPUT
sn
rin
inst3
AND2
inst1
AND2 OR3 OUTPUT
rout
rn+1
inst
inst2
AND2
inst5
inst4
39
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
a[0] b[0]
rin a b
inst
s rout
a[3..0]
INPUT VCC
OUTPUT
s[4..0]
b[3..0]
INPUT VCC
Add
s[1] a[1] b[1]
rin a b
inst1
s rout
Add
s[2] a[2] b[2]
rin a b
inst2
s rout
Add
s[3] a[3] b[3]
rin a b
inst3
s rout
s[4]
40
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Symbole:
Add rin a b
inst
);
s rout
rn an 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1
bn 0 1 0 1 0 1 0 1
rn+1 sn 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1
41
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1 Comparateur
Cest un circuit qui reoit deux nombres binaire A & B, en entre, comme ladditionneur, et qui dtermine sur trois sorties si : A>B, A<B ou A=B. Principe de la comparaison :
Soit deux nombres A= 01101101 et B= 01110100, simplement en les observant, on peut dire que
A<B
Il suffit pour cela de comparer leurs bits de mme rang, en commenant par les poids forts :
A= 0 1 1 0 B= 0 1 1 1
Le premier bit 1 rencontr sur lun des deux nombres, alors que son quivalent est 0 sur lautre, permet de dterminer le plus grand des deux nombres
42
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
sin, ein & iin : bits dentre, utiliss lors de la mise en cascade de plusieurs cellules
Deux cas dterminerons des comportements diffrents de la cellule : 1er cas : 2me cas : Si an = bn , alors sout = sin, eout = ein, iout = iin Si an bn , soit 2 possibilits : an=1 et bn=0 (an > bn) , alors sout=1, eout=0, iout=0 an=0 et bn=1 (an < bn) , alors sout=0, eout=0, iout=1
43
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
Equations
44
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
sout = an.bn + sin.(an . bn) e = e .(a . b )
out in n n
Comp_sch sin ein iin b a
inst
Schma
bn
NOT
INPUT VCC
inst inst6
AND2 OR2
sout
sout iout
inst12
an
NOT
INPUT VCC
OUTPUT
iout
inst5
XNOR
inst7
inst13
AND2
inst9 sin
INPUT VCC
inst8
AND2 OUTPUT
ein
INPUT VCC
eout
eout
inst10
AND2
iin
INPUT VCC
inst11
45
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Comparateur 4 bits
GND VCC
b[3..0]
b[0] a[0]
a[3..0]
b[1] a[1]
b[2] a[2]
b[3] a[3]
S E I
46
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Comparateur (description VHDL) Symbole :
library ieee; use ieee.std_logic_1164.all; entity comp is port ( sin,ein,iin,b,a : in std_logic; sout,eout,iout : out std_logic ); end comp; architecture comp_arch of comp is signal entree : std_logic_vector (1 downto 0); begin entree(1) <= a; entree(0) <= b; sout <= iout <= eout <= '1' when entree="10" else '0' when entree="01" else sin; '0' when entree="10" else '1' when entree="01" else iin; '0' when entree="10" else '0' when entree="01" else ein;
Comp_sch sin ein iin b a
inst
end comp_arch;
47
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
INPUT VCC
OUTPUT
inst
Ralit tPHL tf
E
tPLH tr
Reprsentation
49
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
00 01 11 0 0 1 0 1 0 A.C
10 1 1 A.B
0 1
F = A.C + A.B
Lala se rencontre lorsque lon passe dune case une case adjacente de mme valeur ntant pas dans un mme groupement
Dans notre exemple on risque de rencontrer un ala sur un changement dtat de la variable dentre A lorsque C=0 et B=1
50
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
ENSL1
Schma :
F = A.C + A.B
NOT
A B=1 C=0
INPUT VCC
AND2
inst inst2
A.B
OR2 OUTPUT
AND2
inst4
inst1
C=1
inst3
A.C
A A A.C A.B F
0 1 0
Etat transitoire de trs courte dure, du aux temps de propagation travers les portes logiques, o pendant environ 1ns les 2 entres du OU sont 0. Ce qui provoque un ala.
51
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010
00 01 11 0 0 1 0 1 0 A.C
10 1 1 A.B B.C
0 1
ENSL1
53
Michel KRAMMER Iut de Toulon Dpt: GEII - Semestre 1 2009/2010