Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library ieee;
- use ieee.std_logic_1164.all;
- entity komitte is
- port(ja, nej:out std_logic;
- v:in std_logic_vector(3 downto 0));
- end komitte;
- architecture beteende of komitte is
- begin
- votering: process (v, ja, nej)
- begin
- nej<= '0';
- ja<= '0';
- if v = "0000" then nej<= '1';
- elsif v = "0001" then nej<= '1';
- elsif v = "0010" then nej<= '1';
- elsif v = "0011" then nej<= '1';
- elsif v = "0100" then nej<= '1';
- elsif v = "0101" then nej<= '1';
- elsif v = "0110" then nej<= '1';
- elsif v = "0111" then ja<= '1';
- elsif v = "1000" then nej<= '1';
- elsif v = "1001" then ja<= '1';
- elsif v = "1010" then ja<= '1';
- elsif v = "1011" then ja<= '1';
- elsif v = "1100" then ja<= '1';
- elsif v = "1101" then ja<= '1';
- elsif v = "1110" then ja<= '1';
- elsif v = "1111" then ja<= '1';
- else nej<= '1';
- end if;
- end process votering;
- end beteende;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement