Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.
Transcript of Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.
![Page 1: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/1.jpg)
Hardware Description Language
Aula 3 – AHDL (continuação)
Prof. Afonso Ferreira Miguel, MSc
![Page 2: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/2.jpg)
AHDL
• Implementado Lógica Condicional– If Then Statement
![Page 3: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/3.jpg)
AHDL
• Implementado Lógica Condicional– CASE Statement
![Page 4: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/4.jpg)
AHDL
• Cuidado com IF / ELSIFCodificado Como é interpretado
![Page 5: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/5.jpg)
AHDL
• Parametrização
![Page 6: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/6.jpg)
AHDL
• Exercício 4– Implementar em AHDL uma ULA (utilizando CASE)
que realize as operações de soma e subtração, parametrizando o número de bits de dados:
![Page 7: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/7.jpg)
AHDL
• Problemas com tempos de propagação
![Page 8: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/8.jpg)
AHDL
• Flip-FlopsDFF, TFF, JKFF, SRFF
![Page 9: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/9.jpg)
AHDL
• Contadores binários síncronos (crescente/decrescente)
![Page 10: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/10.jpg)
AHDL
• Contadores binários (MOD N)
![Page 11: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/11.jpg)
AHDL
• Exercício 5– Implementar em AHDL um contador MOD5
decrescente que realize a contagem (6, 5, 4, 3, 2, 6, 5, ...).
![Page 12: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/12.jpg)
AHDL
• FOR GENERATE
![Page 13: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/13.jpg)
AHDL
• FOR GENERATE
![Page 14: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/14.jpg)
AHDL
• Buffers - Tristate
outoein
![Page 15: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/15.jpg)
AHDL
• Buffers - Tristate mode
![Page 16: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/16.jpg)
AHDL
• Simulando Barramentos TRISTATE
![Page 17: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/17.jpg)
AHDL
• Exercício 6– Implementar com BUFFERS TRISTATE um
multiplexador 4 canais (selecionados por dois bits S0 e S1) com 4 bits cada um.
![Page 18: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/18.jpg)
AHDL
• MegaFunções RAM
![Page 19: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/19.jpg)
AHDL
• MegaFunções ROM
![Page 20: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/20.jpg)
AHDL
• Exercício 7 – Gerador de funções– Implementar um gerador de funções digital que gere as
formas de onda quadrada, dente de serra e senoidal. As formas de onda devem estar em uma ROM. Cada forma de onda deve ser tabelada em 16 bytes (posições) por 4 bits.
Obs.: a freqüência de clock define a freqüência do sinal gerado. A saída deste circuito poderia ser aplicado a um DA para geração do sinal analógico.
![Page 21: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/21.jpg)
AHDL
• MegaFunções FIFO
![Page 22: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/22.jpg)
AHDL
• MegaFunções SHIFT
![Page 23: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/23.jpg)
AHDL
• Exercício 8 – Câmara de eco– Implementar o circuito digital de uma câmara de eco
para um sinal de entrada com 8 bits. Supor que a velocidade de amostras (clock) é igual a 8000 sps, e o retardo desejado é de 2ms.
Obs.: o sinal de saída deve ser a média do sinal de entrada(no mesmo instante) e do atrasado (t-2ms).
![Page 24: Hardware Description Language Aula 3 – AHDL (continuação) Prof. Afonso Ferreira Miguel, MSc.](https://reader036.fdocuments.us/reader036/viewer/2022062512/552fc160497959413d8e8988/html5/thumbnails/24.jpg)
AHDL
• Exercício 9 – Reverberação– Modificar o exercício 8 para realizar a função
de um reverberador.
Obs.: o sinal de saída deve ser a média do sinal de entrada (no mesmo instante) e de saída atrasado (t+2ms) dividido por 2.