daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date: 02/22/2019 08:53:00 AM
  6. -- Design Name:
  7. -- Module Name: Addr_3x3 - Behavioral
  8. -- Project Name:
  9. -- Target Devices:
  10. -- Tool Versions:
  11. -- Description:
  12. --
  13. -- Dependencies:
  14. --
  15. -- Revision:
  16. -- Revision 0.01 - File Created
  17. -- Additional Comments:
  18. --
  19. ----------------------------------------------------------------------------------
  20.  
  21.  
  22. library IEEE;
  23. use IEEE.STD_LOGIC_1164.ALL;
  24. use IEEE.NUMERIC_STD.ALL;
  25. use ieee.std_logic_unsigned.all;
  26. -- Uncomment the following library declaration if using
  27. -- arithmetic functions with Signed or Unsigned values
  28. -- Uncomment the following library declaration if instantiating
  29. -- any Xilinx leaf cells in this code.
  30.  
  31.  
  32. package bus_multiplexer_pkg is
  33.         type bus_array is array(natural range <>) of std_logic_vector(15 downto 0);
  34. end package;
  35.  
  36. library IEEE;
  37. use IEEE.STD_LOGIC_1164.ALL;
  38. use IEEE.NUMERIC_STD.ALL;
  39. use ieee.std_logic_unsigned.all;
  40. use work.bus_multiplexer_pkg.all;
  41.  
  42. entity Addr_flex is
  43.  
  44. -- FORCED VALUES
  45. -- input_width_max = 64
  46. -- filter size  = 3 x 3
  47.  
  48.  Port (output : out bus_array(120 downto 0);
  49.         q: in std_logic_vector(15 downto 0)
  50.          );
  51.  
  52. end Addr_flex;
  53.  
  54. architecture Behavioral of Addr_flex is
  55.  
  56. type tmp_array is array(natural range <>) of std_logic_vector(15 downto 0);
  57.     signal t : tmp_array(11 downto 0);
  58.     signal t2 : tmp_array(11 downto 0);
  59.  
  60.  
  61.    
  62. begin
  63. --(q+n*j)%(j*bh)+m
  64.  
  65.      Tall : FOR m IN 10 DOWNTO 0 GENERATE
  66.         t2(m) <= q+m*64;
  67.     t(m)(9 downto 0) <= t2(m) (9 downto 0);
  68.     t(m)(15 downto 10) <= (others => '0');
  69.         G1 : FOR n IN 10 DOWNTO 0 GENERATE
  70.             output(n+m*11) <= t(m)+n;
  71.         END GENERATE G1;
  72.      END GENERATE Tall;
  73.  
  74.  
  75. end Behavioral;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top