Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library ieee;
- use ieee.std_logic_1164.all;
- entity flygplats is
- port(r:in std_logic_vector(3 downto 0);
- y:out std_logic_vector(2 downto 0));
- end flygplats;
- architecture beteende of flygplats is
- begin
- flyg_d: process (r, y)
- begin
- if r(0) = '1' then y<= "001";
- elsif r(1) = '1' then y<= "010";
- elsif r(2) = '1' then y<= "011";
- elsif r(3) = '1' then y<= "100";
- else y<= "000";
- end if;
- end process flyg_d;
- end beteende;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement