tp n2_circuits combinatoires
DESCRIPTION
ElectroniqueTRANSCRIPT
-
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
Par M. JAROU 1 | P a g e
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
1. Objectif : Concevoir, simuler, tester et les implmenter sur une cible CPLD/FPGA en utilisant Quartus II, les
circuits de la logique combinatoire suivants :
Additionneur (Adder)
Soustracteur (Subtractor)
Comprateur (Comparator)
Encodeur (Encoder)
Dcodeur (Decoder)
Multiplexeur (MUX)
Dmultiplexeur (DMUX)
2. Activits pratiques Activit pratique 1 : Additionneur (Adder)
Now, we proceed to the design, simulation and test of Fu
includes three inputs (A, B, and Cin), one Sum output and Cout output.
Truth table of Full Adder
Circuit diagrams and symbol by using graphic entries (fulladd.gdf)
Edition du schma 1. Crer un nouveau projet, puis un nouveau fichier Schmatique. Editer le schma bloc de l additionneur complet. 2. Enregistrez puis compilez votre projet. 3. Ouvrez un nouveau fichier de simulation et ajouter les pins au fichier. 4. Lancez la simulation.
Simulation result of fulladd.gdf circuit (document fulladd.wvf)
-
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
Par M. JAROU 2 | P a g e
Implmentation sur la cible CPLD : 1. 2. :
Entres/Sorties du design PIN de CPLD
A 47
B 48
Cin 49
Sum 7
Cout 8
LED_COM 141
Assignement de Pin de EPF10K30ATC144-3
3. Maintenant vous pouvez charger votre programme dans votre carte CPLD.
Edition du code VHDL du design 1. Editer le code VHDL du design Enregistrer et compiler votre code. 2. 3. Envoyez le code vers votre carte de dveloppement CPLD.
Activit pratique 2 : Additionneur de 4bits (Ripple Carry Adder 4 Bytes) In primary two sections, the adder only deals with add of one-bit, but actual circuit usual completes addition of four-bit and
beyond four-bit. In multiple bits addition, if carry bit of each addition state uses carry out of previous addition stage. This is
called Ripple Carry Adder as following figure.
Circuit diagrams of Ripple Carry Adder by using graphic entries (document rip_add.gdf)
1. Crer un nouveau projet, puis un nouveau fichier Schmatique. Editer le schma bloc de l additionneur 4bits. 2. Enregistrez puis compilez votre projet. 3. Ouvrez un nouveau fichier de simulation et ajouter les pins au fichier. 4. Lancez la simulation :
Simulation result of circuit rip_add.gdf (document rip_add.wvf)
-
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
Par M. JAROU 3 | P a g e
Implmentation sur la cible CPLD : 1. 2. :
Entres/Sorties du design PIN de CPLD
A0, A1, A2, A3 68, 67, 65, 64
B0, B1, B2, B3 81, 80, 79, 78
S0, S1, S2, S3 11, 10, 9, 8
C4 7
LED_COM 141
Assignement de Pin de EPF10K30ATC144-3
3. Maintenant vous pouvez charger votre programme dans votre carte CPLD.
Activit pratique 4 : Soustracteur de 4 bits (Substractor)
The
subtraction. The
completed by taking NOT from B0 B3 and setting C0 to 1.
compsub.gdf)
1. Crer un nouveau projet, puis un nouveau fichier Schmatique. Editer le schma bloc du soustracteur de bits. 2. Enregistrez puis compilez votre projet. 3. Ouvrez un nouveau fichier de simulation et ajouter les pins au fichier. 4. Lancez la simulation :
Implmentation sur la cible CPLD : 1. 2. :
Entres/Sorties du design PIN de CPLD
A0, A1, A2, A3 68, 67, 65, 64
B0, B1, B2, B3 81, 80, 79, 78
S0, S1, S2, S3 11, 10, 9, 8
C4 7
LED_COM 141
Assignement de Pin de EPF10K30ATC144-3
3. Maintenant vous pouvez charger votre programme dans votre carte CPLD.
-
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
Par M. JAROU 4 | P a g e
Edition du code VHDL du design 1. Editer le code VHDL du design. Enregistrer et compiler votre code. 2.
Activit pratique 4 : Comparateur (Comparator) The comparator decides the relationship between input A and input B. It compares input of two n-bit binary number and
produces three possible relation outputs (G, Eand L).
Circuit of Comparator by using graphic entries (document compr.gdf)
1. Crer un nouveau projet, puis un nouveau fichier Schmatique. Editer le schma bloc du comparateur de mots de 2bits. 2. Enregistrez puis compilez votre projet. 3. Ouvrez un nouveau fichier de simulation et ajouter les pins au fichier. 4. Lancez la simulation :
Simulation result of circuit compr.gdf (document compr.wvf)
-
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
Par M. JAROU 5 | P a g e
Implmentation sur la cible CPLD : 1. Ajouter un 2. :
Entres/Sorties du design PIN de CPLD
X0 48
X1 47
Y0 63
Y1 62
G 7
E 8
L 9
LED_COM 141
Assignement de Pin de EPF10K30ATC144-3
3. Maintenant vous pouvez charger votre programme dans votre carte CPLD.
Edition du code VHDL du design 1. Editer le code VHDL du design Enregistrer et compiler votre code. 2.
Activit pratique 4 : Encodeur (Encoder) Because the memory cell of calculator is 2-state memory way, the calculator external character set (alphabet, numeric and
symbol) need to encode by binary, then save in memory. This encoding movement usual needs encoding circuit to finish.
On the other hand, the encoded code which get from memory need to be decoded for output in its original form.
The following figure illustrates the procedure from input, save in binary, process and output data. Generally, the character
set not only express in binary, but also binary encoding. The reason is reduced binary bit length.
We see this situation from the following table, the binary of -bit and binary
encoding only need four-bit.
Input, save in binary, process and output data process flows.
binary encoding of alphabet character set
Truth table of Encoder
-
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
Par M. JAROU 6 | P a g e
The application of key binary encoding after binary
expression
Truth table of Encoder
Circuit of Encoder by using graphic entries (document encod10.gdf)
5. Crer un nouveau projet, puis un nouveau fichier Schmatique. Editer le schma bloc d . 6. Enregistrez puis compilez votre projet. 7. Ouvrez un nouveau fichier de simulation et ajouter les pins au fichier. 8. Lancez la simulation :
-
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
Par M. JAROU 7 | P a g e
Simulation result of circuit encod10.gdf (document encod10.wvf)
Implmentation sur la cible CPLD : 1. 2. se fera selon le tableau suivant :
Assignement de Pin de EPF10K30ATC144-3
3. Maintenant vous pouvez charger votre programme dans votre carte CPLD.
Edition du code VHDL du design 1. Editer le code VHDL du design Enregistrer et compiler votre code. 2.
Activit pratique 4 : Dcodeur (Encoder)
An n bit to 2n Decoder can decode n bits to 2
n data. The following figure is an application decoder drives 16 LEDs. We see
each LED connecting current- cause
1) Dcodeur 4 vers 16(4 to 16 Decoder)
Four-bit encoder drives 16 LEDs
Truth table of Decoder
-
TP N2 : Circuits combinatoires sous Quartus II CPLD/FPGA
Par M. JAROU 8 | P a g e
Circuit of Decoder by using graphic entries (document dec4x16.gdf)
2) Dcodeur BCD/7segments vers 16(BCD to 7 Segment Decoder) 7-segment display constitutes by seven rectangle LED as following , but some right-bottom of 7-segment displays have one
circle LED. In digital circuit, 7-segment display is passive component and use frequently. 7-segment display can be divided
into common anode structure and common cathode structure. If we use common anode 7-segment display, we to connect
LED will on and bright. The bright electric
current is supplied by Vcc. Contrary, If we use common cathode 7-segment display, we need to connect common cathode
to en corresponding rectangle LED will be on and bright.
Exterior and category of 7-segment display