1 / 5

Exercícios Circuitos Descritos em VHDL

Exercícios Circuitos Descritos em VHDL. 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 ).

hani
Download Presentation

Exercícios Circuitos Descritos em VHDL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ExercíciosCircuitos Descritos em VHDL

  2. 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. 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 <= s1xors2; S <= s4 and s3; end exer1;

  4. Solução do Exercício 1 pb: process begin input_b<= notinput_bafter 40 ns; waitfor 40 ns; endprocess; pc: process begin input_c<= notinput_cafter 20 ns; waitfor 20 ns; endprocess; pd: process begin input_d<= notinput_dafter 10 ns; waitfor 10 ns; endprocess; endtb; library IEEE; use IEEE.std_logic_1164.all; entity tbis end tb; architecture tb of tbis 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;

  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; a b f g c e d

More Related