w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
is61wv5128bll.vhd
Go to the documentation of this file.
1-- $Id: is61wv5128bll.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2017- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: is61wv5128bll - sim
7-- Description: ISSI IS61WV5128BLL SRAM model
8-- Currently a truely minimalistic functional model, without
9-- any timing checks. It assumes, that addr/data is stable at
10-- the trailing edge of we.
11--
12-- Dependencies: -
13-- Test bench: -
14-- Target Devices: generic
15-- Tool versions: viv 2016.4; ghdl 0.34
16-- Revision History:
17-- Date Rev Version Comment
18-- 2017-06-04 906 1.0 Initial version (derived from is61lv25616al)
19------------------------------------------------------------------------------
20-- Truth table accoring to data sheet:
21--
22-- Mode WE_N CE_N OE_N D
23-- Not selected X H X high-Z
24-- Output disabled H L H high-Z
25-- X L X high-Z
26-- Read H L L D_out
27-- Write L L X D_in
28
29library ieee;
30use ieee.std_logic_1164.all;
31use ieee.numeric_std.all;
32
33use work.slvtypes.all;
34
35entity is61wv5128bll is -- ISSI 61WV5128bll SRAM model
36 port (
37 CE_N : in slbit; -- chip enable (act.low)
38 OE_N : in slbit; -- output enable (act.low)
39 WE_N : in slbit; -- write enable (act.low)
40 ADDR : in slv19; -- address lines
41 DATA : inout slv8 -- data lines
42 );
44
45
46architecture sim of is61wv5128bll is
47
48 constant T_rc : Delay_length := 10 ns; -- read cycle time (min)
49 constant T_aa : Delay_length := 10 ns; -- address access time (max)
50 constant T_oha : Delay_length := 2 ns; -- output hold time (min)
51 constant T_ace : Delay_length := 10 ns; -- ce access time (max)
52 constant T_doe : Delay_length :=4.5 ns; -- oe access time (max)
53 constant T_hzoe : Delay_length := 4 ns; -- oe to high-Z output (max)
54 constant T_lzoe : Delay_length := 0 ns; -- oe to low-Z output (min)
55 constant T_hzce : Delay_length := 4 ns; -- ce to high-Z output (min=0,max=4)
56 constant T_lzce : Delay_length := 3 ns; -- ce to low-Z output (min)
57
58 constant memsize : positive := 2**(ADDR'length);
59 constant datzero : slv(DATA'range) := (others=>'0');
60 type ram_type is array (0 to memsize-1) of slv(DATA'range);
61
62 signal CE : slbit := '0';
63 signal OE : slbit := '0';
64 signal WE : slbit := '0';
65 signal WE_EFF : slbit := '0';
66
67begin
68
69 CE <= not CE_N;
70 OE <= not OE_N;
71 WE <= not WE_N;
72
73 WE_EFF <= CE and WE;
74
75 proc_sram: process (CE, OE, WE, WE_EFF, ADDR, DATA)
76 variable ram : ram_type := (others=>datzero);
77 begin
78
79 if falling_edge(WE_EFF) then -- end of write cycle
80 -- note: to_x01 used below to prevent
81 -- that 'z' a written into mem.
82 ram(to_integer(unsigned(ADDR))) := to_x01(DATA);
83 end if;
84
85 if CE='1' and OE='1' and WE='0' then -- output driver
86 DATA <= ram(to_integer(unsigned(ADDR)));
87 else
88 DATA <= (others=>'Z');
89 end if;
90
91 end process proc_sram;
92
93end sim;
94
slbit := '0' WE_EFF
Delay_length := 2 ns T_oha
Delay_length := 4 ns T_hzce
positive := 2**( ADDR'length) memsize
Delay_length := 3 ns T_lzce
Delay_length := 10 ns T_aa
Delay_length := 4.5 ns T_doe
slbit := '0' CE
( 0 to memsize- 1) slv(DATA) ram_type
slv(DATA) :=( others => '0') datzero
slbit := '0' OE
Delay_length := 10 ns T_rc
Delay_length := 0 ns T_lzoe
Delay_length := 4 ns T_hzoe
Delay_length := 10 ns T_ace
slbit := '0' WE
inout DATA slv8
in ADDR slv19
in WE_N slbit
in CE_N slbit
in OE_N slbit
std_logic_vector( 18 downto 0) slv19
Definition: slvtypes.vhd:52
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 7 downto 0) slv8
Definition: slvtypes.vhd:40
std_logic_vector slv
Definition: slvtypes.vhd:31