Advertisement
voik3

Untitled

Jun 26th, 2019
402
0
Never
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 mux4 is
  5.     Port ( wej : in  STD_LOGIC_VECTOR(1 downto 0);
  6.            wyj : out  STD_LOGIC_VECTOR(3 downto 0);
  7.            cyfra_1 : in  STD_LOGIC_VECTOR(3 downto 0);
  8.            cyfra_2 : in  STD_LOGIC_VECTOR(3 downto 0);
  9.            cyfra_3 : in  STD_LOGIC_VECTOR(3 downto 0);
  10.            cyfra_4 : in  STD_LOGIC_VECTOR(3 downto 0));
  11. end mux4;
  12.  
  13. architecture Behavioral of mux4 is
  14.  
  15. begin
  16. with wej select
  17. wyj <= cyfra_1 when "00",
  18.          cyfra_2 when "01",
  19.          cyfra_3 when "10",
  20.          cyfra_4 when others;
  21.  
  22.  
  23.  
  24. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement