Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library IEEE;
- use IEEE.STD_LOGIC_1164.ALL;
- -- Uncomment the following library declaration if using
- -- arithmetic functions with Signed or Unsigned values
- --use IEEE.NUMERIC_STD.ALL;
- -- Uncomment the following library declaration if instantiating
- -- any Xilinx primitives in this code.
- --library UNISIM;
- --use UNISIM.VComponents.all;
- entity liczbaWith is
- port(
- X : in STD_LOGIC_VECTOR( 3 downto 0 );
- Y : out STD_LOGIC_VECTOR ( 9 downto 0 ));
- end liczbaWith;
- architecture Behavioral of liczbaWith is
- begin
- with X Select
- Y(0) <= '1' when "0001",
- '0' when others;
- with X Select
- Y(1) <= '1' when "0010",
- '0' when others;
- with X Select
- Y(2) <= '1' when "0011",
- '0' when others;
- with X Select
- Y(3) <= '1' when "0100",
- '0' when others;
- with X Select
- Y(4) <= '1' when "0101",
- '0' when others;
- with X Select
- Y(5) <= '1' when "0110",
- '0' when others;
- with X Select
- Y(6) <= '1' when "0111",
- '0' when others;
- with X Select
- Y(7) <= '1' when "1000",
- '0' when others;
- with X Select
- Y(8) <= '1' when "1001",
- '0' when others;
- with X Select
- Y(9) <= '1' when "1010",
- '0' when others;
- end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement