Carregar apresentação
A apresentação está carregando. Por favor, espere
PublicouMariane Napoles Alterado mais de 10 anos atrás
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 / 11 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 / 11 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 / 11 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;
Apresentações semelhantes
© 2024 SlidePlayer.com.br Inc.
All rights reserved.