Line 1... |
Line 1... |
-- $Id: is61lv25616al.vhd 314 2010-07-09 17:38:41Z mueller $
|
-- $Id: is61lv25616al.vhd 427 2011-11-19 21:04:11Z mueller $
|
--
|
--
|
-- Copyright 2007-2008 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
-- Copyright 2007-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
--
|
--
|
-- This program is free software; you may redistribute and/or modify it under
|
-- This program is free software; you may redistribute and/or modify it under
|
-- the terms of the GNU General Public License as published by the Free
|
-- the terms of the GNU General Public License as published by the Free
|
-- Software Foundation, either version 2, or at your option any later version.
|
-- Software Foundation, either version 2, or at your option any later version.
|
--
|
--
|
Line 19... |
Line 19... |
-- the trailing edge of we.
|
-- the trailing edge of we.
|
--
|
--
|
-- Dependencies: -
|
-- Dependencies: -
|
-- Test bench: -
|
-- Test bench: -
|
-- Target Devices: generic
|
-- Target Devices: generic
|
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
|
-- Tool versions: xst 8.2, 9.1, 9.2, 13.1; ghdl 0.18-0.29
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2011-11-19 427 1.0.2 now numeric_std clean
|
-- 2008-05-12 145 1.0.1 BUGFIX: Output now 'Z' if byte enables deasserted
|
-- 2008-05-12 145 1.0.1 BUGFIX: Output now 'Z' if byte enables deasserted
|
-- 2007-12-14 101 1.0 Initial version (written on warsaw airport)
|
-- 2007-12-14 101 1.0 Initial version (written on warsaw airport)
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
-- Truth table accoring to data sheet:
|
-- Truth table accoring to data sheet:
|
--
|
--
|
Line 40... |
Line 41... |
-- L L X H L high-Z D_in
|
-- L L X H L high-Z D_in
|
-- L L X L L D_in D_in
|
-- L L X L L D_in D_in
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_arith.all;
|
use ieee.numeric_std.all;
|
|
|
use work.slvtypes.all;
|
use work.slvtypes.all;
|
|
|
entity is61lv25616al is -- ISSI 61LV25612AL SRAM model
|
entity is61lv25616al is -- ISSI 61LV25612AL SRAM model
|
port (
|
port (
|
Line 106... |
Line 107... |
|
|
-- ----------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_arith.all;
|
use ieee.numeric_std.all;
|
|
|
use work.slvtypes.all;
|
use work.slvtypes.all;
|
|
|
entity is61lv25616al_bank is -- ISSI 61LV25612AL bank
|
entity is61lv25616al_bank is -- ISSI 61LV25612AL bank
|
port (
|
port (
|
Line 150... |
Line 151... |
|
|
proc_sram: process (CE, OE, WE, BE, WE_EFF, ADDR, DATA)
|
proc_sram: process (CE, OE, WE, BE, WE_EFF, ADDR, DATA)
|
variable ram : ram_type := (others=>datzero);
|
variable ram : ram_type := (others=>datzero);
|
begin
|
begin
|
|
|
if WE_EFF'event and WE_EFF='0' then -- end of write cycle
|
if falling_edge(WE_EFF) then -- end of write cycle
|
-- note: to_x01 used below to prevent
|
-- note: to_x01 used below to prevent
|
-- that 'z' a written into mem.
|
-- that 'z' a written into mem.
|
ram(conv_integer(unsigned(ADDR))) := to_x01(DATA);
|
ram(to_integer(unsigned(ADDR))) := to_x01(DATA);
|
end if;
|
end if;
|
|
|
if CE='1' and OE='1' and BE='1' and WE='0' then -- output driver
|
if CE='1' and OE='1' and BE='1' and WE='0' then -- output driver
|
DATA <= ram(conv_integer(unsigned(ADDR)));
|
DATA <= ram(to_integer(unsigned(ADDR)));
|
else
|
else
|
DATA <= (others=>'Z');
|
DATA <= (others=>'Z');
|
end if;
|
end if;
|
|
|
end process proc_sram;
|
end process proc_sram;
|