No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MemoireInstructions.vhd 8.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date: 16.04.2021 14:35:04
  6. -- Design Name:
  7. -- Module Name: MemoireInstructions - 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. library IEEE;
  21. use IEEE.STD_LOGIC_1164.ALL;
  22. -- Uncomment the following library declaration if using
  23. -- arithmetic functions with Signed or Unsigned values
  24. use IEEE.NUMERIC_STD.ALL;
  25. -- Uncomment the following library declaration if instantiating
  26. -- any Xilinx leaf cells in this code.
  27. --library UNISIM;
  28. --use UNISIM.VComponents.all;
  29. entity MemoireInstructions is
  30. Generic (Nb_bits : Natural;
  31. Addr_size : Natural;
  32. Mem_size : Natural);
  33. Port ( Addr : in STD_LOGIC_VECTOR (Addr_size-1 downto 0);
  34. D_OUT : out STD_LOGIC_VECTOR (Nb_bits-1 downto 0) := (others => '0'));
  35. end MemoireInstructions;
  36. architecture Behavioral of MemoireInstructions is
  37. signal MEMORY : STD_LOGIC_VECTOR ((Mem_Size * Nb_bits)-1 downto 0) := "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010100000000000000000000000010001000000000000000000000000010100000000000010100000000001001100011011000101000000000001011000010100000000100000000010010000000000001010000000000111000010100000000100000000001001000000100000000000000000101010000001100000000000000000111101101101000000000000000001000000000010000000000000000000010000000000000000000000000100100000000000000010000000001000000000000000000100000000101010000000100000000000000001000100000000000000000000000001001000000000101010100000000101010000000100000000000000001000100000000000000000000000001001000000001010101000000000100000111101000000000000000000001100000010000000100000000000101000000000000000000000000010010000000000000101000000000100000000000000000010000000001000000000010000000000000000010010000000000000000000000000111101010011000000000000000001000000000010000000000000000000010000000000000000000000000100100000000000000010000000001000000000000000000100000000010100000000100001010000000000110100000000000000000000000001010000000000000101100000000100110000000100010101000000000101100001100000000110000000001011000010110000000100000000010110000101000000000000000000000100000001000000110000000101010000000110000110000000000000100000000100000000000000010100100000000000000010000000001110000011000000001100000000010010000001100000000000000000100000000001000000000000000010000011010000000000000000000000110000001100000011000000010010100000001000000010000001001001000000100000101000000000010000000000100000000000000000100100000000000000000000000010100000000000000000000000000010110000010000000010000000000101100000011000000110000000001011000000100000000000000000010110000000000000001000000000100000000001000000100000000001011000001010000000100000000010000000001000000011000000000111100100010000000000000000001000000000000000001000000000000010000001000000010000000010100100000001000000010000000001000000000100000000000000000010100000000000000010000000000101100000111000000000000000001111010000000000000000000000010000000001100000001000000000110000000001000000010000000000001000000010000001000000001010100000001000000110000000000101100000100000000100000000000010000000010000000000000001010010000000000000001000000000111000000110000000000000000001001000000000000000000000000010000000000100000011000000000101000000011000000100000000010000010000000000000000000000000110000001100000011000000100101100000110000000110000000000110000000100000001000000001010000000000100000000000000000101000000000000000110000000001100000000100000001000000000000010000001000000001000000100101000000001000001010000000000010000000100000001100000010010010000001100000001000000000111000000101000000110000000001001000000110000000000000000010000000001000000000000000000101000000000000000100000000010000010001110000000000000000000110000000000000000000000100101100000010000000000000000000101000000100000001000000001010000000000100000011000000000101100000011000000010000000001010000000110000000100000000010000000001000000000000000000100100000001000000000000000001001000000000000000000000000101000000000000000000000000000101100000010000000100000000001011000000010000000100000000010110000000000000000000000000100000000000000000010000000001000000000010000000000000000010000000000000000001000000001001000000001000000000000000010101000011110000000000000000011110000010100000000000000000100000000000000000010000000000001000000010000000100000010010010000001000000001000000000100000000001000000000000000010101000000010000000000000000100010000000100000000000000000100100000001111111110000000010101000000010000000000000000100010000000100000000000000000100100000001000000000000000010000000100100000000000000000000110000001100000011000000010010100000001000000010000001001001000000100000010100000000010000000000100000000000000000100100000000000000000000000001111010011110000000000000000";
  38. begin
  39. D_OUT <= MEMORY (((to_integer(unsigned(Addr)) + 1) * Nb_bits) - 1 downto Nb_bits * to_integer(unsigned(Addr)));
  40. end Behavioral;