OpenCores
URL https://opencores.org/ocsvn/mblite/mblite/trunk

Subversion Repositories mblite

[/] [mblite/] [trunk/] [hw/] [std/] [sram_4en.vhd] - Diff between revs 5 and 6

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 5 Rev 6
Line 26... Line 26...
    WIDTH : positive := 32;
    WIDTH : positive := 32;
    SIZE  : positive := 16
    SIZE  : positive := 16
);
);
PORT
PORT
(
(
    dat_o : OUT std_ulogic_vector(WIDTH - 1 DOWNTO 0);
    dat_o : OUT std_logic_vector(WIDTH - 1 DOWNTO 0);
    dat_i : IN std_ulogic_vector(WIDTH - 1 DOWNTO 0);
    dat_i : IN std_logic_vector(WIDTH - 1 DOWNTO 0);
    adr_i : IN std_ulogic_vector(SIZE - 1 DOWNTO 0);
    adr_i : IN std_logic_vector(SIZE - 1 DOWNTO 0);
    wre_i : IN std_ulogic_vector(WIDTH/8 - 1 DOWNTO 0);
    wre_i : IN std_logic_vector(WIDTH/8 - 1 DOWNTO 0);
    ena_i : IN std_ulogic;
    ena_i : IN std_logic;
    clk_i : IN std_ulogic
    clk_i : IN std_logic
);
);
END sram_4en;
END sram_4en;
 
 
-- Although this memory is very easy to use in conjunction with Modelsims mem load, it is not
-- Although this memory is very easy to use in conjunction with Modelsims mem load, it is not
-- supported by many devices (although it comes straight from the library. Many devices give
-- supported by many devices (although it comes straight from the library. Many devices give
-- cryptic synthesization errors on this implementation, so it is not the default.
-- cryptic synthesization errors on this implementation, so it is not the default.
ARCHITECTURE arch2 OF sram_4en IS
ARCHITECTURE arch2 OF sram_4en IS
 
 
    TYPE ram_type IS array(2 ** SIZE - 1 DOWNTO 0) OF std_ulogic_vector(WIDTH - 1 DOWNTO 0);
    TYPE ram_type IS array(2 ** SIZE - 1 DOWNTO 0) OF std_logic_vector(WIDTH - 1 DOWNTO 0);
    TYPE sel_type IS array(WIDTH/8 - 1 DOWNTO 0) OF std_ulogic_vector(7 DOWNTO 0);
    TYPE sel_type IS array(WIDTH/8 - 1 DOWNTO 0) OF std_logic_vector(7 DOWNTO 0);
 
 
    SIGNAL ram: ram_type;
    SIGNAL ram: ram_type;
    SIGNAL di: sel_type;
    SIGNAL di: sel_type;
BEGIN
BEGIN
    PROCESS(wre_i, dat_i, adr_i)
    PROCESS(wre_i, dat_i, adr_i)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.