Download - Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc
![Page 1: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/1.jpg)
Hardware Description Language
Aula 4 –VHDL (introdução)
Prof. Afonso Ferreira Miguel, MSc
![Page 2: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/2.jpg)
VHDL - Introdução
• USA DoD VHSIC Program– VHSIC = Very Hight Speed Integrated Circuit
• VHDL = VHSIC Hardware Description Language
– 1ª Versão 1985;– Padronizado pelo IEEE– ASICS
![Page 3: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/3.jpg)
VHDL – Design Tools
• Algumas ferramentas para HDL (síntese e simulação)– MAXPLUS II
– QUARTUS
– Verilog Mode
– Cypress Warp
– Silos Verilog HDL
– Active-HDL
– Model-Sim
– Synopsys
– Fusion/ViewSim
![Page 4: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/4.jpg)
Entity x Architecture
Descreve os pinos de entrada e saída
Descreve o comportamento do circuito
![Page 5: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/5.jpg)
Tipos básicos
bit ‘0’ ou ‘1’
std_logic ‘0’, ‘1’, ‘U’, ‘X’, ‘Z’, ‘-’
bit_vector “00..00”, “00..01”, “00..10”, ...
std_logic_vector “00..00”, “00..01”, “00..10”, ...
![Page 6: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/6.jpg)
Entity - Exemplos
![Page 7: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/7.jpg)
Entity - Exemplos
![Page 8: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/8.jpg)
Bibliotecas padrões
![Page 9: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/9.jpg)
Architecture
![Page 10: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/10.jpg)
Atribuição CSAConcurrent Signal Assign
Opcional em algumasferramentas
![Page 11: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/11.jpg)
Exemplo de código VHDLBiblioteca
Entity
Architecture
![Page 12: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/12.jpg)
• Exercício 1Implementar e simular um Semi-Somador e um Somador-
Completo em VHDL.– Criar o símbolo deste módulo;– Criar um Block Diagram (chamado de SOMA) e incluir
um Semi-Somador e dois Somadores-Completos para implementar a função de soma de 3 bits:
– entradas: A2,A1,A0 e B2,B1,B0;– saídas: Cout, S2,S1,S0.
– Compilar e simular o circuito final
Lembrando...•Semi somador:
S = A XOR BC = A AND B
•Somador CompletoS = (A XOR B) XOR CinCout = ((A XOR B) AND Cin) OR (A AND B)
![Page 13: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/13.jpg)
Eventos
![Page 14: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/14.jpg)
Eventos
![Page 15: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/15.jpg)
Nós
![Page 16: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/16.jpg)
Nós
![Page 17: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/17.jpg)
• Exercício 2Modificar o exercício 1 para utilizar signal no
somador completo.
![Page 18: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/18.jpg)
Atribuição Condicional
![Page 19: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/19.jpg)
Atribuição por seleção
![Page 20: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/20.jpg)
• Exercício 3Implementar em VHDL um multiplexador de 4
canais por 4 bits com controle de habilitação. Se não estiver habilitado, a saída deve ficar com o valor “F”.
![Page 21: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/21.jpg)
Concatenando
![Page 22: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/22.jpg)
Concatenando
![Page 23: Hardware Description Language Aula 4 –VHDL (introdução) Prof. Afonso Ferreira Miguel, MSc](https://reader036.vdocuments.net/reader036/viewer/2022062512/552fc182497959413d8f46bc/html5/thumbnails/23.jpg)
Resolução
Não funciona no Quartus!