Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 1.19 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity komitte is
  5.  
  6.         port(ja, nej:out std_logic;
  7.                  v:in std_logic_vector(3 downto 0));
  8.  
  9. end komitte;
  10.  
  11. architecture beteende of komitte is
  12. begin
  13.  
  14.         votering: process (v, ja, nej)
  15.         begin
  16.  
  17.         nej<= '0';
  18.         ja<= '0';
  19.  
  20.                 if v = "0000" then nej<= '1';
  21.                 elsif v = "0001" then nej<= '1';
  22.                 elsif v = "0010" then nej<= '1';
  23.                 elsif v = "0011" then nej<= '1';
  24.                 elsif v = "0100" then nej<= '1';
  25.                 elsif v = "0101" then nej<= '1';
  26.                 elsif v = "0110" then nej<= '1';
  27.                 elsif v = "0111" then ja<= '1';
  28.                 elsif v = "1000" then nej<= '1';
  29.                 elsif v = "1001" then ja<= '1';
  30.                 elsif v = "1010" then ja<= '1';
  31.                 elsif v = "1011" then ja<= '1';
  32.                 elsif v = "1100" then ja<= '1';
  33.                 elsif v = "1101" then ja<= '1';
  34.                 elsif v = "1110" then ja<= '1';
  35.                 elsif v = "1111" then ja<= '1';
  36.                 else nej<= '1';
  37.  
  38.                 end if;
  39.         end process votering;
  40. end beteende;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement