Professional Documents
Culture Documents
Combinacionais
Aula 4 - Simulao de Circuito Lgico
Combinacional
Prof. Lzaro Camargo
Exemplo
ENTRADAS
SAIDA
Exemplo
(continuao)
Tabela Verdade
ENTRADAS
SAIDA
Exemplo 2
Resolver a expresso abaixo:
X = ( A + B + C + D).( A + B + C + D).( A + B + C + D).( A + B + C + D)
library IEEE;
use IEEE.std_logic_1164.all;
entity nome_1 is
port (a,b,c,d: in bit;
X: out bit);
end nome_1;
architecture lgica of nome_1 is
begin
X<= (not a or not b or c or d) and (a or b or not c or d)
and (a or not b or not c or d) and (a or b or c or not d);
end lgica;
Exerccio
Expresso lgica no formato de Soma-de-Produtos e
tambem no formato de Produto-de-Somas para a
seguinte tabela verdade. Simular e verificar se os
resultados so os mesmos.
A
Programaes de
multiplexadores em VHDL
Exemplo 1a Na figura abaixo se tem um
multiplexador (Mux_4_1) com 4 entradas de dados
(P0, P1, P2 e P3), 2 entradas de seleo (S0 e S1) e
uma sada de dado (F).
library IEEE;
use IEEE.std_logic_1164.all;
entity Mux_4_1 is
port (P0,P1,P2,P3: in bit;
S: in bit_vector (1 downto 0);
F: out bit);
end Mux_4_1;
-- A arquitetura pode ser feita com comandos concorrentes
architecture fluxo_dados of Mux_4_1 is
begin
F<=P0 when (S="00") else
P1 when (S="01") else
P2 when (S="10") else
P3 when (S="11");
End fluxo_dados;
Exerccio
Estender para circuito multiplicador de 8
entradas.