Advertisement
Guest User

sel2

a guest
Aug 25th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.51 KB | None | 0 0
  1. use work.p_wires.all;
  2.  
  3. entity sel2 is
  4.   port(s   : in  bit;
  5.        z,w : out bit);
  6. end sel2;
  7.  
  8.   component inv is
  9.     port(A : in bit; S : out bit);
  10.   end component inv;
  11.  
  12.   component nand2 is
  13.     port(A,B : in bit; S : out bit);
  14.   end component nand2
  15.  
  16.   signal a, c, r, p: bit;
  17.  
  18. architecture estrut of sel2 is
  19. begin
  20.   -- implemente com portas logicas
  21.   Ui1: inv port map (s,a);
  22.   Un1: nand2 port map (s,a,c);
  23.   Udm1: demux2 port map (c,s,z);
  24.   Udm2: demux2 port map (c,a,w);
  25.  
  26. end architecture estrut;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement