12345678910111213141516171819202122232425262728293031323334353637383940 |
- ----------------------------------------------------------------------------------
- -- Company: INSA-Toulouse
- -- Engineer: Paul Faure
- --
- -- Create Date: 16.04.2021 14:35:04
- -- Module Name: MemoireInstructions - Behavioral
- -- Project Name: Processeur sécurisé
- -- Target Devices: Basys 3 ARTIX7
- -- Tool Versions: Vivado 2016.4
- --
- -- Description: Memoire d'instruction
- -- - Accessible en lecture uniquement
- --
- -- Dependencies: None
- --
- -- Comments : Memoire circulaire, si l'adresse est utilisée modulo la taille de la mémoire
- ----------------------------------------------------------------------------------
-
-
- library IEEE;
- use IEEE.STD_LOGIC_1164.ALL;
- use IEEE.NUMERIC_STD.ALL;
-
- entity MemoireInstructions is
- Generic (Nb_bits : Natural; -- Taille d'une instruction en mémoire (Taille d'un code instruction + 3*Taille d'un mot binaire)
- Addr_size : Natural; -- Nombre de bits pour adresser la mémoire
- Mem_size : Natural); -- Taille de la mémoire (nombre d'instructions stockées)
- Port ( Addr : in STD_LOGIC_VECTOR (Addr_size-1 downto 0); -- Une adresse
- D_OUT : out STD_LOGIC_VECTOR (Nb_bits-1 downto 0) := (others => '0')); -- L'instruction presente a cette adresse
- end MemoireInstructions;
-
- architecture Behavioral of MemoireInstructions is
- -- Do not touch until (-- Skadoosh)
- -- Do not add any Skadoosh
- signal MEMORY : STD_LOGIC_VECTOR ((Mem_Size * Nb_bits)-1 downto 0) := "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010000000000000000000000001000100000000000000000000000001010000000000000101100000000100110011001100001011000000000101100001100000000000000000001001000000000000101000000000011100000101100000000000000000100100000000000000000000000010011000000010000101100000000010110000110000000001000000000101100001011000000000000000001011000010100000001000000000011110110000000000000000000000100000000010000000000000000000001000000000000000000000001010010000000100000001000000000100000000000000000100000000001010000000100000101000000000011010000000000000001000000000101000000001000011000000000001010000000000000101100000000100110010101100001100000000000101100001101000000110000000001011000011000000001000000000010110000101100000100000000000101100001010000000000000000000001000001000000010000000010010100000010000001011000000000001000000010000000110000001001001000000110000000100000000010000000001000000000000000000111000001011000000110000000001001000000110000000000000000100000111101100000000000000000001100000011000000110000000101001000000110000000000000000001010000000100000001000000100100100000010000010100000000001000000000010000000000000000010010000000000000000000000001010000000000000000000000000001011000001110000011100000000010110000011000000110000000000101100000101000001000000000001011000001000000001000000000010110000001100000001000000000101100000010000000000000000001011000000000000010100000000010000000010100000010000000000100000000010000000010000000001111001101010000000000000000010000000000000000010000000000000100000010000000100000010001001000001000000000100000000010000000001000000000000000000111101010000000000000000000001000000000010000010000000000011000000010000000100000000000000100000100000001100000010000010000001000000011100000100010010000011100000001000000000100000000110000001010000000001000000001000000000000000000100000101000000000000000000000001100000111000001110000001001001000001110000000000000000001100000001000000010000001000100000000100000000010000000001100000000100000001000000000000010000001000000100000000100001000000010000001100000001001001000001100000000100000000010000000010000000101000000000101000000101000000000000000001000000000100000000000000000100000101010100000000000000000001100000101000001010000001001001000001010000000000000000001010000001000000010000001000100000000100000000110000000001010000000110000000100000000010000000001000000000000000000100100000001000000000000000001001000000000000000000000000101000000000000000000000000000101100000001000000010000000001011000000000000000000000000010000000000000000001000000000100000000001000000000000000010010000000000000000000000000101010000101000000000000000001001100010110000000000000000010100000000000000000000000000010110000001000000010000000000101100000001000000010000000001011000000000000000000000000011110001011100000000000000000100000000000000000010000000000001000000010000000100000010010010000001000000001000000000100000000001000000000000000010001000000010000000000000000010010000000101010101000000001010100000010000000000000000010001000000010000000000000000010010000000110101010000000001000000100111000000000000000000011000000110000001100000001010010000001100000000000000000010100000001000000010000001001001000000100000010100000000010000000000100000000000000000100100000000000000000000000010100000000000000000000000000010110000001000000010000000000101100000001000000010000000001011000000000000000000000000011110000001000000000000000000100000000000000000010000000000001000000010000000100000010010010000001000000001000000000100000000001000000000000000010001000000010000000000000000010010000000100000000000000001010100000010000000000000000010001000000010000000000000000010010000000111111111000000001000000010010000000000000000000011000000110000001100000001010010000001100000000000000000010100000001000000010000001001001000000100000010100000000010000000000100000000000000000100100000000000000000000000001111010111110000000000000000";
- -- Skadoosh
- begin
- D_OUT <= MEMORY (((to_integer(unsigned(Addr)) + 1) * Nb_bits) - 1 downto Nb_bits * to_integer(unsigned(Addr)));
- end Behavioral;
|