Advertisement
fellpz

CL porta OR

Mar 10th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.74 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.std_logic_1164.all; -- biblioteca do IEEE
  3.  
  4.  
  5.     entity Antonio_1 is port -- a entidade deve ter o mesmo nome do projeto criado
  6.         (
  7.             A : in std_logic; -- entrada digital A
  8.             B : in std_logic; -- entrada digital B
  9.             C : in std_logic; -- entrada digital C
  10.             O : out std_logic -- saida digital O
  11.         );
  12.     end Antonio_1;
  13.  
  14.  
  15.         architecture hardware of Antonio_1 is -- eh descricao do circuito que nesse caso eh a porta 1
  16.  
  17.         signal OR1 : std_logic;
  18.         signal OR2 : std_logic;
  19.         signal OR3 : std_logic;
  20.  
  21.         begin -- inicia a descricao do programa
  22.                
  23.             O <= (OR1 or OR2 or OR3);
  24.            
  25.             OR1 <= (not A) and (not B);
  26.             OR2 <= (not B) and (not C);
  27.             OR3 <= A and (not C);
  28.                  
  29.         end hardware; -- final da implementacao
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement