SlideShare a Scribd company logo
1 of 41
VHDL: una breve introduzione DRESD   H ow  T o (DHow2) – L1 DRESD Team [email_address]
VHDL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduzione Il Linguaggio VHDL viene utilizzato per:  Documentare, Simulare, Sintetizzare  circuiti e sistemi logici. Esso è costituito da più parti alcune delle quali fanno parte integrale del linguaggio stesso, mentre altre vengono integrate da opportuni “packages” realizzati all’interno di “libraries”
Un primo esempio A <= B + C after 5.0 ns ,[object Object],[object Object],[object Object],[object Object],B C A + 8 8 8
Descrizione / Documentazione ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],Simulazione
Sintesi Logica ,[object Object],[object Object],[object Object],[object Object],[object Object]
Progetto in VHDL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Struttura generale di un programma Area sequenziale Area sequenziale Area concorrente
Entity ,[object Object],[object Object],[object Object],entity   circuito   is port  (  a, b :  in   bit ; c :  out   bit  ); end entity ; Nome della entity Nome delle porte Modo delle porte (direzione) Tipo delle porte Parole riservate circuito a b c
Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object]
Architecture: Descrizione comportamentale ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Processi ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Architecture: descrizione strutturale ,[object Object],[object Object],[object Object],[object Object],[object Object]
Un primo esempio…
Sommare due numeri interi positivi
Addizione senza segno bit-slice a propagazione di riporto ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],c i  x i  y i   s i  c i+1 0  0  0  0  0 0  0  1  1  0 0  1  0  1  0 0  1  1  0  1 1  0  0  1  0 1  0  1  0  1 1  1  0  0  1 1  1  1  1  1
Full Adder - expression x i y i c i c i+1 s i Full Adder Full Adder x i   y i   c i s i x i   y i   c i c i+1
Half adder
Full Adder
Addizione senza segno  ripple-carry Prestazioni: calcolo dei ritardi ,[object Object],[object Object],[object Object],[object Object],[object Object],FA n-1 FA 1 FA 0 x 0   y 0 x 1   y 1 x n-1  y n-1 s 1 s 0 c 0 c n c 2 c 1 s n-1
Ripple Carry Adder Ripple-Carry Architecture Full Adder x 0 y 0 c 0 s 0 Full   Adder x 1 y 1 c 1 c 2 s 1 Full Adder x n-1 y n-1 c n-1 c n s n-1 n-bit  Ripple Carry Adder s n-1  s 0 x n-1  y n-1  x 0  y 0 c 0 c n Ripple-Carry Adder
n-bit  Ripple Carry Adder s n-1  s 0 x n-1  y n-1  x 0  y 0 n-bit  Ripple Carry Adder s 2n-1  s n x 2n-1  y 2n-1  x n  y n x kn-1  y kn-1 c 0 c n c 2n Ripple Carry Block Adder n-bit  Ripple Carry Adder s kn-1  s (k-1)n c (k-1)n c kn
Addizione veloce  (ad anticipazione di riporto)   Funzioni di generazione e di propagazione del riporto ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Addizione veloce calcolo dei riporti in parallelo   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Carry Look-Ahead Adder Carry Look-Ahead Logic: Internal architecture CLA Logic c 0 c n x 0  y 0 x n-1  y n-1 c n-1 c 1 Carry Look-Ahead Logic x 0  y 0 G 0  P 0 c 0 c 1 x 1  y 1 G 1  P 1 c 2 G n-1  P n-1 x n-1  y n-1
Addizione veloce Esempio: prestazioni per un CLA a 4 bit 2 x 0   y 0 x 1   y 1 s 1 s 0 c 0 c 1 P 0   G 0 2 2 1 5 2 x 2   y 2 s 2 c 2 P 1   G 1  P 0   G 0 2 2 1 5 x 3   y 3 s 3 c 3 P 2  G 2 P 1  G 1 P 0 G 0 2 2 1 5 c 4 2 1 P 3  G 3 P 2  G 2 P 1 G 1 P 0 G 0 3 ,[object Object],[object Object],[object Object],[object Object],3 3 3 c 4 3 CLA logic Full Adder dove  G i =x i y i  P i =x i +y i c 0 c 0 c 0 c 0
Carry Look-Ahead Adder Carry Look-Ahead Logic Carry Look-Ahead Logic Full Adder c 0 s 0 Full Adder c 1 s 1 Full Adder x n-1  y n-1 s n-1 c n-1 x 1  y 1 x 0  y 0 c n x 0  y 0 x n-1  y n-1
E in VHDL?
Complichiamo un pò il problema...
VHDL – Half Adder ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],x y enable carry result Half Adder
Entity Half Adder ENTITY half_adder IS PORT( x, y, enable : IN BIT;   carry, result : OUT BIT); END half_adder; x y enable carry result Half Adder
Half Adder: Circuito
HA: Descrizione comportamentale ARCHITECTURE half_adder_a OF half_adder IS BEGIN PROCESS (x, y, enable) BEGIN IF enable = ‘1’ THEN result <= x XOR y; carry <= x AND y; ELSE carry <= ‘0’; result <= ‘0’; END IF; END PROCESS; END half_adder_a;
HA: Descrizione dataflow ARCHITECTURE half_adder_b OF half_adder IS BEGIN carry <= enable AND (x AND y); result <= enable AND (x XOR y); END half_adder_b;
HA: Descrizione strutturale ,[object Object],ARCHITECTURE half_adder_c OF half_adder IS COMPONENT and2 PORT (in0, in1 : IN BIT;   out0 : OUT BIT); END COMPONENT; COMPONENT and3 PORT (in0, in1, in2 : IN BIT;   out0 : OUT BIT); END COMPONENT; COMPONENT xor2 PORT (in0, in1 : IN BIT;   out0 : OUT BIT); END COMPONENT; -- description is continued on next slide
HA: Descrizione strutturale -- continuing half_adder_c description SIGNAL xor_res : BIT; -- internal signal -- Note that other signals are already declared in entity BEGIN A0 : and2 PORT MAP (enable, xor_res, result); A1 : and3 PORT MAP (x, y, enable, carry); X0 : xor2 PORT MAP (x, y, xor_res); END half_adder_c;
Architecture ,[object Object],[object Object],[object Object]
Piccola nota... Double DRIVEN ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],S operazione1 operazione2
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Questions

More Related Content

What's hot

Qt Concurrent
Qt ConcurrentQt Concurrent
Qt ConcurrentQT-day
 
Acadevmy - TypeScript Overview
Acadevmy - TypeScript OverviewAcadevmy - TypeScript Overview
Acadevmy - TypeScript OverviewFrancesco Sciuti
 
Acadevmy - ES6 Modern JS Today
Acadevmy - ES6 Modern JS TodayAcadevmy - ES6 Modern JS Today
Acadevmy - ES6 Modern JS TodayFrancesco Sciuti
 
Lezione 11 (26 marzo 2012)
Lezione 11 (26 marzo 2012)Lezione 11 (26 marzo 2012)
Lezione 11 (26 marzo 2012)STELITANO
 
Sistemi Operativi: Il kernel linux - Lezione 06
Sistemi Operativi: Il kernel linux - Lezione 06Sistemi Operativi: Il kernel linux - Lezione 06
Sistemi Operativi: Il kernel linux - Lezione 06Majong DevJfu
 
Lezione 12 (28 marzo 2012) funzioni memoria - puntatori
Lezione 12 (28 marzo 2012) funzioni   memoria - puntatoriLezione 12 (28 marzo 2012) funzioni   memoria - puntatori
Lezione 12 (28 marzo 2012) funzioni memoria - puntatoriSTELITANO
 
Complessità e ordinamento di Ezio Sperduto
Complessità e ordinamento di Ezio SperdutoComplessità e ordinamento di Ezio Sperduto
Complessità e ordinamento di Ezio SperdutoVitalij Zadneprovskij
 
Elliptic Curve Method di Lenstra
Elliptic Curve Method di LenstraElliptic Curve Method di Lenstra
Elliptic Curve Method di Lenstrapeppespe
 
Functional Programming per tutti
Functional Programming per tuttiFunctional Programming per tutti
Functional Programming per tuttiGiancarlo Valente
 
[Ebook ita - security] introduzione alle tecniche di exploit - mori - ifoa ...
[Ebook   ita - security] introduzione alle tecniche di exploit - mori - ifoa ...[Ebook   ita - security] introduzione alle tecniche di exploit - mori - ifoa ...
[Ebook ita - security] introduzione alle tecniche di exploit - mori - ifoa ...UltraUploader
 
Sottoprogrammi in Visual Basic
Sottoprogrammi in Visual BasicSottoprogrammi in Visual Basic
Sottoprogrammi in Visual Basicfilippotrotta
 
Sottoprogrammi in Visual Basic
Sottoprogrammi in Visual BasicSottoprogrammi in Visual Basic
Sottoprogrammi in Visual Basicfilippotrotta
 
5 Strutture Iterative
5   Strutture Iterative5   Strutture Iterative
5 Strutture Iterativeguest60e9511
 
Introduzione a R
Introduzione a RIntroduzione a R
Introduzione a RMCalderisi
 
Soluzione esame b del 13 giugno 2012
Soluzione esame b del 13 giugno 2012Soluzione esame b del 13 giugno 2012
Soluzione esame b del 13 giugno 2012STELITANO
 

What's hot (20)

Qt Concurrent
Qt ConcurrentQt Concurrent
Qt Concurrent
 
Programmazione Top Down in C++
Programmazione Top Down in C++Programmazione Top Down in C++
Programmazione Top Down in C++
 
E6 Concorre
E6 ConcorreE6 Concorre
E6 Concorre
 
Riepilogo Java C/C++
Riepilogo Java C/C++Riepilogo Java C/C++
Riepilogo Java C/C++
 
Acadevmy - TypeScript Overview
Acadevmy - TypeScript OverviewAcadevmy - TypeScript Overview
Acadevmy - TypeScript Overview
 
Acadevmy - ES6 Modern JS Today
Acadevmy - ES6 Modern JS TodayAcadevmy - ES6 Modern JS Today
Acadevmy - ES6 Modern JS Today
 
Lezione 11 (26 marzo 2012)
Lezione 11 (26 marzo 2012)Lezione 11 (26 marzo 2012)
Lezione 11 (26 marzo 2012)
 
Sistemi Operativi: Il kernel linux - Lezione 06
Sistemi Operativi: Il kernel linux - Lezione 06Sistemi Operativi: Il kernel linux - Lezione 06
Sistemi Operativi: Il kernel linux - Lezione 06
 
Informatica di base
Informatica di baseInformatica di base
Informatica di base
 
Lezione 12 (28 marzo 2012) funzioni memoria - puntatori
Lezione 12 (28 marzo 2012) funzioni   memoria - puntatoriLezione 12 (28 marzo 2012) funzioni   memoria - puntatori
Lezione 12 (28 marzo 2012) funzioni memoria - puntatori
 
Complessità e ordinamento di Ezio Sperduto
Complessità e ordinamento di Ezio SperdutoComplessità e ordinamento di Ezio Sperduto
Complessità e ordinamento di Ezio Sperduto
 
Elliptic Curve Method di Lenstra
Elliptic Curve Method di LenstraElliptic Curve Method di Lenstra
Elliptic Curve Method di Lenstra
 
Functional Programming per tutti
Functional Programming per tuttiFunctional Programming per tutti
Functional Programming per tutti
 
[Ebook ita - security] introduzione alle tecniche di exploit - mori - ifoa ...
[Ebook   ita - security] introduzione alle tecniche di exploit - mori - ifoa ...[Ebook   ita - security] introduzione alle tecniche di exploit - mori - ifoa ...
[Ebook ita - security] introduzione alle tecniche di exploit - mori - ifoa ...
 
Sottoprogrammi in Visual Basic
Sottoprogrammi in Visual BasicSottoprogrammi in Visual Basic
Sottoprogrammi in Visual Basic
 
Sottoprogrammi in Visual Basic
Sottoprogrammi in Visual BasicSottoprogrammi in Visual Basic
Sottoprogrammi in Visual Basic
 
R Vectors
R VectorsR Vectors
R Vectors
 
5 Strutture Iterative
5   Strutture Iterative5   Strutture Iterative
5 Strutture Iterative
 
Introduzione a R
Introduzione a RIntroduzione a R
Introduzione a R
 
Soluzione esame b del 13 giugno 2012
Soluzione esame b del 13 giugno 2012Soluzione esame b del 13 giugno 2012
Soluzione esame b del 13 giugno 2012
 

Viewers also liked (19)

3rd 3DDRESD: DReAMS
3rd 3DDRESD: DReAMS3rd 3DDRESD: DReAMS
3rd 3DDRESD: DReAMS
 
3rd 3DDRESD: DRESD Future Plan 0809
3rd 3DDRESD: DRESD Future Plan 08093rd 3DDRESD: DRESD Future Plan 0809
3rd 3DDRESD: DRESD Future Plan 0809
 
UIC Thesis Beretta
UIC Thesis BerettaUIC Thesis Beretta
UIC Thesis Beretta
 
RCW@DEI - ADL
RCW@DEI - ADLRCW@DEI - ADL
RCW@DEI - ADL
 
DHow2 - L4
DHow2 - L4DHow2 - L4
DHow2 - L4
 
3rd 3DDRESD: DRESD status @ July 2008
3rd 3DDRESD: DRESD status @ July 20083rd 3DDRESD: DRESD status @ July 2008
3rd 3DDRESD: DRESD status @ July 2008
 
RCIM 2008 - Allocation Relocation
RCIM 2008 - Allocation RelocationRCIM 2008 - Allocation Relocation
RCIM 2008 - Allocation Relocation
 
3rd 3DDRESD: VGA Core
3rd 3DDRESD: VGA Core3rd 3DDRESD: VGA Core
3rd 3DDRESD: VGA Core
 
3rd 3DDRESD: DB
3rd 3DDRESD: DB3rd 3DDRESD: DB
3rd 3DDRESD: DB
 
PrjRLA0708
PrjRLA0708PrjRLA0708
PrjRLA0708
 
3D-DRESD
3D-DRESD3D-DRESD
3D-DRESD
 
RCIM 2008 -- EHW
RCIM 2008 -- EHWRCIM 2008 -- EHW
RCIM 2008 -- EHW
 
UIC Thesis Candiloro
UIC Thesis CandiloroUIC Thesis Candiloro
UIC Thesis Candiloro
 
DHow2 - L6 Ant
DHow2 - L6 AntDHow2 - L6 Ant
DHow2 - L6 Ant
 
UIC Thesis Morandi
UIC Thesis MorandiUIC Thesis Morandi
UIC Thesis Morandi
 
RCIM 2008 - Intro
RCIM 2008 - IntroRCIM 2008 - Intro
RCIM 2008 - Intro
 
3rd 3DDRESD: Inpeco Overview
3rd 3DDRESD: Inpeco Overview3rd 3DDRESD: Inpeco Overview
3rd 3DDRESD: Inpeco Overview
 
HPPS 2008 - Filieri
HPPS 2008 - FilieriHPPS 2008 - Filieri
HPPS 2008 - Filieri
 
UIC Panella Thesis
UIC Panella ThesisUIC Panella Thesis
UIC Panella Thesis
 

Similar to DHow2 - L1

Presentazione understand
Presentazione understandPresentazione understand
Presentazione understandLuigi La Torre
 
Analizzatori di programmi in C
Analizzatori di programmi in CAnalizzatori di programmi in C
Analizzatori di programmi in CBoymix81
 
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...Idriss Riouak
 
Ecdl modulo 1 -Fondamenti
Ecdl modulo 1 -FondamentiEcdl modulo 1 -Fondamenti
Ecdl modulo 1 -FondamentiAngela Cristina
 
Graphs plugin 20160923-ita
Graphs plugin 20160923-itaGraphs plugin 20160923-ita
Graphs plugin 20160923-itaGiuliano Curti
 
Overload di funzioni in Rust - Come ho imparato a vivere felicemente senza
Overload di funzioni in Rust - Come ho imparato a vivere felicemente senzaOverload di funzioni in Rust - Come ho imparato a vivere felicemente senza
Overload di funzioni in Rust - Come ho imparato a vivere felicemente senzaNicola Musatti
 
Effective Code Transformations in C++
Effective Code Transformations in C++Effective Code Transformations in C++
Effective Code Transformations in C++Marco Arena
 
Corso Programmazione Java Base
Corso Programmazione Java BaseCorso Programmazione Java Base
Corso Programmazione Java BaseK-Tech Formazione
 
Penetration Testing con Python - Network Sniffer
Penetration Testing con Python - Network SnifferPenetration Testing con Python - Network Sniffer
Penetration Testing con Python - Network SnifferSimone Onofri
 
Vogliamo programmatori stupidi e pigri!
Vogliamo programmatori stupidi e pigri!Vogliamo programmatori stupidi e pigri!
Vogliamo programmatori stupidi e pigri!Marcello Missiroli
 
Relazione Modellazione e Simulazioni Numeriche: Percolazione
Relazione Modellazione e Simulazioni Numeriche: PercolazioneRelazione Modellazione e Simulazioni Numeriche: Percolazione
Relazione Modellazione e Simulazioni Numeriche: PercolazioneRiccardo Melioli
 
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...Francesco Andreuzzi
 
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...Francesco Andreuzzi
 

Similar to DHow2 - L1 (20)

Presentazione understand
Presentazione understandPresentazione understand
Presentazione understand
 
Analizzatori di programmi in C
Analizzatori di programmi in CAnalizzatori di programmi in C
Analizzatori di programmi in C
 
Topog presentation
Topog presentationTopog presentation
Topog presentation
 
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
Presentazione: uno studio sull'efficacia di checker automatici per la moderni...
 
La scomposizione in sotto programmi in C++.pptx
La scomposizione in sotto programmi in C++.pptxLa scomposizione in sotto programmi in C++.pptx
La scomposizione in sotto programmi in C++.pptx
 
Ecdl modulo 1 -Fondamenti
Ecdl modulo 1 -FondamentiEcdl modulo 1 -Fondamenti
Ecdl modulo 1 -Fondamenti
 
Rest sdk
Rest sdkRest sdk
Rest sdk
 
Modulo 1 - Lezione 1
Modulo 1 - Lezione 1Modulo 1 - Lezione 1
Modulo 1 - Lezione 1
 
Graphs plugin 20160923-ita
Graphs plugin 20160923-itaGraphs plugin 20160923-ita
Graphs plugin 20160923-ita
 
Overload di funzioni in Rust - Come ho imparato a vivere felicemente senza
Overload di funzioni in Rust - Come ho imparato a vivere felicemente senzaOverload di funzioni in Rust - Come ho imparato a vivere felicemente senza
Overload di funzioni in Rust - Come ho imparato a vivere felicemente senza
 
Effective Code Transformations in C++
Effective Code Transformations in C++Effective Code Transformations in C++
Effective Code Transformations in C++
 
Corso Programmazione Java Base
Corso Programmazione Java BaseCorso Programmazione Java Base
Corso Programmazione Java Base
 
Penetration Testing con Python - Network Sniffer
Penetration Testing con Python - Network SnifferPenetration Testing con Python - Network Sniffer
Penetration Testing con Python - Network Sniffer
 
Vogliamo programmatori stupidi e pigri!
Vogliamo programmatori stupidi e pigri!Vogliamo programmatori stupidi e pigri!
Vogliamo programmatori stupidi e pigri!
 
CleanCode
CleanCodeCleanCode
CleanCode
 
Relazione Modellazione e Simulazioni Numeriche: Percolazione
Relazione Modellazione e Simulazioni Numeriche: PercolazioneRelazione Modellazione e Simulazioni Numeriche: Percolazione
Relazione Modellazione e Simulazioni Numeriche: Percolazione
 
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
 
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
BisPy: un pacchetto Python per il calcolo della massima bisimulazione di graf...
 
La Grafica Con Java
La Grafica Con JavaLa Grafica Con Java
La Grafica Con Java
 
Reti Logic
Reti LogicReti Logic
Reti Logic
 

More from Marco Santambrogio (20)

RCIM 2008 - - hArtes Atmel
RCIM 2008 - - hArtes AtmelRCIM 2008 - - hArtes Atmel
RCIM 2008 - - hArtes Atmel
 
RCIM 2008 - - UniCal
RCIM 2008 - - UniCalRCIM 2008 - - UniCal
RCIM 2008 - - UniCal
 
RCIM 2008 - - ALTERA
RCIM 2008 - - ALTERARCIM 2008 - - ALTERA
RCIM 2008 - - ALTERA
 
DHow2 - L6 VHDL
DHow2 - L6 VHDLDHow2 - L6 VHDL
DHow2 - L6 VHDL
 
DHow2 - L5
DHow2 - L5DHow2 - L5
DHow2 - L5
 
RCIM 2008 - - ALaRI
RCIM 2008 - - ALaRIRCIM 2008 - - ALaRI
RCIM 2008 - - ALaRI
 
RCIM 2008 - Modello Scheduling
RCIM 2008 - Modello SchedulingRCIM 2008 - Modello Scheduling
RCIM 2008 - Modello Scheduling
 
RCIM 2008 - HLR
RCIM 2008 - HLRRCIM 2008 - HLR
RCIM 2008 - HLR
 
RCIM 2008 - Modello Generale
RCIM 2008 - Modello GeneraleRCIM 2008 - Modello Generale
RCIM 2008 - Modello Generale
 
RCIM 2008 - - hArtes_Ferrara
RCIM 2008 - - hArtes_FerraraRCIM 2008 - - hArtes_Ferrara
RCIM 2008 - - hArtes_Ferrara
 
RCIM 2008 - Janus
RCIM 2008 - JanusRCIM 2008 - Janus
RCIM 2008 - Janus
 
DHow2 - L2
DHow2 - L2DHow2 - L2
DHow2 - L2
 
RCW@DEI - Treasure hunt
RCW@DEI - Treasure huntRCW@DEI - Treasure hunt
RCW@DEI - Treasure hunt
 
RCW@DEI - Design Flow 4 SoPc
RCW@DEI - Design Flow 4 SoPcRCW@DEI - Design Flow 4 SoPc
RCW@DEI - Design Flow 4 SoPc
 
RCW@DEI - Real Needs And Limits
RCW@DEI - Real Needs And LimitsRCW@DEI - Real Needs And Limits
RCW@DEI - Real Needs And Limits
 
RCW@DEI - Basic Concepts
RCW@DEI - Basic ConceptsRCW@DEI - Basic Concepts
RCW@DEI - Basic Concepts
 
RCW@DEI - Reconf Comp
RCW@DEI - Reconf CompRCW@DEI - Reconf Comp
RCW@DEI - Reconf Comp
 
Blanket project presentation
Blanket project presentationBlanket project presentation
Blanket project presentation
 
3rd 3DDRESD: RC historical contextualization
3rd 3DDRESD: RC historical contextualization3rd 3DDRESD: RC historical contextualization
3rd 3DDRESD: RC historical contextualization
 
3rd 3DDRESD: ReCPU 4 NIDS
3rd 3DDRESD: ReCPU 4 NIDS3rd 3DDRESD: ReCPU 4 NIDS
3rd 3DDRESD: ReCPU 4 NIDS
 

DHow2 - L1

  • 1. VHDL: una breve introduzione DRESD H ow T o (DHow2) – L1 DRESD Team [email_address]
  • 2.
  • 3. Introduzione Il Linguaggio VHDL viene utilizzato per: Documentare, Simulare, Sintetizzare circuiti e sistemi logici. Esso è costituito da più parti alcune delle quali fanno parte integrale del linguaggio stesso, mentre altre vengono integrate da opportuni “packages” realizzati all’interno di “libraries”
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 16. Sommare due numeri interi positivi
  • 17.
  • 18. Full Adder - expression x i y i c i c i+1 s i Full Adder Full Adder x i y i c i s i x i y i c i c i+1
  • 21.
  • 22. Ripple Carry Adder Ripple-Carry Architecture Full Adder x 0 y 0 c 0 s 0 Full Adder x 1 y 1 c 1 c 2 s 1 Full Adder x n-1 y n-1 c n-1 c n s n-1 n-bit Ripple Carry Adder s n-1 s 0 x n-1 y n-1 x 0 y 0 c 0 c n Ripple-Carry Adder
  • 23. n-bit Ripple Carry Adder s n-1 s 0 x n-1 y n-1 x 0 y 0 n-bit Ripple Carry Adder s 2n-1 s n x 2n-1 y 2n-1 x n y n x kn-1 y kn-1 c 0 c n c 2n Ripple Carry Block Adder n-bit Ripple Carry Adder s kn-1 s (k-1)n c (k-1)n c kn
  • 24.
  • 25.
  • 26. Carry Look-Ahead Adder Carry Look-Ahead Logic: Internal architecture CLA Logic c 0 c n x 0 y 0 x n-1 y n-1 c n-1 c 1 Carry Look-Ahead Logic x 0 y 0 G 0 P 0 c 0 c 1 x 1 y 1 G 1 P 1 c 2 G n-1 P n-1 x n-1 y n-1
  • 27.
  • 28. Carry Look-Ahead Adder Carry Look-Ahead Logic Carry Look-Ahead Logic Full Adder c 0 s 0 Full Adder c 1 s 1 Full Adder x n-1 y n-1 s n-1 c n-1 x 1 y 1 x 0 y 0 c n x 0 y 0 x n-1 y n-1
  • 30. Complichiamo un pò il problema...
  • 31.
  • 32. Entity Half Adder ENTITY half_adder IS PORT( x, y, enable : IN BIT; carry, result : OUT BIT); END half_adder; x y enable carry result Half Adder
  • 34. HA: Descrizione comportamentale ARCHITECTURE half_adder_a OF half_adder IS BEGIN PROCESS (x, y, enable) BEGIN IF enable = ‘1’ THEN result <= x XOR y; carry <= x AND y; ELSE carry <= ‘0’; result <= ‘0’; END IF; END PROCESS; END half_adder_a;
  • 35. HA: Descrizione dataflow ARCHITECTURE half_adder_b OF half_adder IS BEGIN carry <= enable AND (x AND y); result <= enable AND (x XOR y); END half_adder_b;
  • 36.
  • 37. HA: Descrizione strutturale -- continuing half_adder_c description SIGNAL xor_res : BIT; -- internal signal -- Note that other signals are already declared in entity BEGIN A0 : and2 PORT MAP (enable, xor_res, result); A1 : and3 PORT MAP (x, y, enable, carry); X0 : xor2 PORT MAP (x, y, xor_res); END half_adder_c;
  • 38.
  • 39.
  • 40.