Untitled

mail@pastecode.io avatar
unknown
vhdl
2 years ago
675 B
6
Indexable
Never
architecture a_rom of rom is
    type mem is array (0 to 65535) of unsigned(15 downto 0);
    constant conteudo_rom : mem := (
        -- caso endereco => conteudo
        0 =>    "0000000000000000",
        1 =>    "0000000000000001",
        2 =>    "0000000000000010",
        3 =>    "0000000000000011",
        4 =>    "0000100000000110",
        5 =>    "0000000000000101",
        6 =>    "0000000000000110",
        7 =>    "0000000000000111",
        8 =>    "0000000000001000",
        9 =>    "0000100000000000",
        10 =>   "0000000001000000",
        -- abaixo: casos omissos => (zero em todos os bits)
        others => (others=>'0')
    );