miyago

Alis kod

Dec 6th, 2017
6,086
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.58 KB | None | 0 0
  1. LIBRARY ieee;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity alivhd is
  5.     port(A,B:in std_logic_vector (1 downto 0);
  6.         resultat:out std_logic_vector (7 downto 1));
  7. end alivhd;
  8.  
  9. architecture ALI of alivhd is
  10. begin
  11.    
  12.     resultat(1)<='1';
  13.     resultat(2)<='1';
  14.     resultat(3)<=(NOT(A(1))AND(NOT(A(0))))OR(NOT(A(1))AND(B(0)))OR(NOT(A(1))AND(B(1)))OR((B(1))AND(B(0)))OR(NOT(A(0))AND(B(1)));
  15.     resultat(4)<='0';
  16.     resultat(5)<=((A(1))AND(NOT(B(1))))OR((A(0))AND(NOT(B(1))))OR((NOT(B(1)))AND(NOT(B(0))))OR((A(1))AND(A(0)))OR((A(1))AND(NOT(B(0))));
  17.     resultat(6)<='1';
  18.     resultat(7)<='0';
  19.    
  20. end ALI;
Advertisement