Advertisement
Randune1

ROM32x24

Jan 12th, 2023 (edited)
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 1.07 KB | Source Code | 0 0
  1. entity ROM32x24 is
  2.     Port ( Addr : in  STD_LOGIC_VECTOR (4 downto 0);
  3.            Data : out  STD_LOGIC_VECTOR (23 downto 0));
  4. end ROM32x24;
  5.  
  6. architecture Behavioral of ROM32x24 is
  7.     type tROM is array(0 to 31) of std_logic_vector(23 downto 0);
  8.    
  9.     constant ROM : tROM :=(
  10.                         --test
  11.                         x"000000"--0
  12.                         x"000000"--1
  13.                         x"000000"--2
  14.                         x"000000"--3
  15.                         x"000000"--4
  16.                         x"000000"--5
  17.                         x"000000"--6
  18.                         x"000000"--7
  19.                         x"000000"--8
  20.                         x"000000"--9
  21.                         x"000000"--10
  22.                         x"000000"--11
  23.                         x"000000"--12
  24.                         x"000000"--13
  25.                         x"000000"--14
  26.                         x"000000"--15
  27.                         x"000000"--16
  28.                         x"000000"--17
  29.                         x"000000"--18
  30.                         x"000000"--19
  31.                         x"000000"--20
  32.                         x"000000"--21
  33.                         x"000000"--22
  34.                         x"000000"--23
  35.                         x"000000"--24
  36.                         x"000000"--25
  37.                         x"000000"--26
  38.                         x"000000"--27
  39.                         x"000000"--28
  40.                         x"000000"--29
  41.                         x"000000"--30
  42.                         x"000000"   --31
  43.                         );
  44. begin
  45.     Data <= ROM(conv_integer(Addr));
  46. end Behavioral;
  47.  
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement