stankovic96

arps_sel

Jun 23rd, 2020
2,215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.44 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3. use ieee.numeric_std.all;
  4. entity sel_m is
  5.     Port ( addr : in STD_LOGIC_VECTOR (15 downto 0);
  6.            sel : out STD_LOGIC_VECTOR (1 downto 0));
  7. end sel_m;
  8.  
  9. architecture Behavioral of sel_m is
  10.  
  11. begin
  12.     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)  );
  13. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment