A apresentação está carregando. Por favor, espere

A apresentação está carregando. Por favor, espere

ORGANIZAÇÃO E ARQUITETURA DE COMPUTADORES I prof. Dr. César Augusto M. Marcon prof. Dr. Edson Ifarraguirre Moreno Exercícios Circuitos Descritos em VHDL.

Apresentações semelhantes


Apresentação em tema: "ORGANIZAÇÃO E ARQUITETURA DE COMPUTADORES I prof. Dr. César Augusto M. Marcon prof. Dr. Edson Ifarraguirre Moreno Exercícios Circuitos Descritos em VHDL."— Transcrição da apresentação:

1 ORGANIZAÇÃO E ARQUITETURA DE COMPUTADORES I prof. Dr. César Augusto M. Marcon prof. Dr. Edson Ifarraguirre Moreno Exercícios Circuitos Descritos em VHDL

2 2 / 5 Exercício 1 Descreva o circuito ao lado em VHDL e faça um test-bench que gere as formas de onda abaixo. Note que estas formas de onda são do tipo periódicas (i.e. devem ser implementadas dentro de um process com comando wait)

3 3 / 5 Solução do Exercício 1 Circuito library IEEE; use IEEE.std_logic_1164.all; entity exer1 is port ( A, B, C, D: in std_logic; S: out std_logic ); end exer1; architecture exer1 of exer1 is signal s1, s2, s3, s4: std_logic; begin s1 <= A and B; s2 <= B or C; s3 <= C or D; s4 <= s1 xor s2; S <= s4 and s3; end exer1;

4 4 / 5 Solução do Exercício 1 library IEEE; use IEEE.std_logic_1164.all; entity tb is end tb; architecture tb of tb is signal input_a, input_b, input_c, input_d: std_logic := '0'; signal output: std_logic ; begin instanciacao: entity work.exer1 port map( A => input_a, B => input_b, C => input_c, D => input_d, S => output ); pa: process begin input_a <= not input_a after 80 ns; wait for 80 ns; end process; pb: process begin input_b <= not input_b after 40 ns; wait for 40 ns; end process; pc: process begin input_c <= not input_c after 20 ns; wait for 20 ns; end process; pd: process begin input_d <= not input_d after 10 ns; wait for 10 ns; end process; end tb;

5 5 / 5 Exercício 2 Faça a entidade e a arquitetura de um circuito codificador para um display de 7 segmentos com codificação para formato hexadecimal (utilize a construção VHDL parcial abaixo). A entidade deve ter como entrada um vetor de 4 bits chamado ENT e como saída as portas {a, b,..., g}. Posteriormente, faça um testbench que gere o seguintes padrão de valores de entrada: {0, 1, A, F, 7, 8, 2} e verifique os resultados. with Ent select S <="0000001" when "0000", "1001111" when "0001", "0010010" when "0010", "0000110" when "0011", "1001100" when "0100", "0100100" when "0101", "0100000" when "0110", "0001111" when "0111", "0000000" when "1000", "0001100" when "1001", "1111110" when others; b g a c e f d


Carregar ppt "ORGANIZAÇÃO E ARQUITETURA DE COMPUTADORES I prof. Dr. César Augusto M. Marcon prof. Dr. Edson Ifarraguirre Moreno Exercícios Circuitos Descritos em VHDL."

Apresentações semelhantes


Anúncios Google