Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library IEEE;
- use IEEE.STD_LOGIC_1164.ALL;
- use ieee.numeric_std.all;
- entity sel_m is
- Port ( addr : in STD_LOGIC_VECTOR (15 downto 0);
- sel : out STD_LOGIC_VECTOR (1 downto 0));
- end sel_m;
- architecture Behavioral of sel_m is
- begin
- sel<=std_logic_vector(to_unsigned(to_integer(unsigned(addr)-to_unsigned(to_integer(shift_left(to_unsigned(to_integer(shift_right(unsigned(addr),2)),16),2)),16)),2) );
- end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment