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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [gaisler/] [sim/] [sram16.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------
19
-- Entity:      sram16
20
-- File:        sram16.vhd
21
-- Author:      Jiri Gaisler Gaisler Research
22
-- Description: Simulation model of generic 16-bit async SRAM
23
------------------------------------------------------------------------------
24
 
25
-- pragma translate_off
26
 
27
library ieee;
28
use ieee.std_logic_1164.all;
29
use std.textio.all;
30
 
31
library gaisler;
32
use gaisler.sim.all;
33
library grlib;
34
use grlib.stdlib.all;
35
 
36
entity sram16 is
37
  generic (
38
    index : integer := 0;                -- Byte lane (0 - 3)
39
    abits: Positive := 10;              -- Default 10 address bits (1 Kbyte)
40
    echk : integer := 0;         -- Generate EDAC checksum
41
    tacc : integer := 10;               -- access time (ns)
42
    fname : string := "ram.dat");       -- File to read from
43
  port (
44
    a : in std_logic_vector(abits-1 downto 0);
45
    d : inout std_logic_vector(15 downto 0);
46
    lb : in std_logic;
47
    ub : in std_logic;
48
    ce : in std_logic;
49
    we : in std_ulogic;
50
    oe : in std_ulogic);
51
end;
52
 
53
 
54
architecture sim of sram16 is
55
 
56
signal cex : std_logic_vector(0 to 1);
57
 
58
begin
59
 
60
  cex(0) <= ce or lb; cex(1) <= ce or ub;
61
 
62
  sr0 : sram generic map (index+1, abits, tacc, fname)
63
        port map (a, d(7 downto 0), cex(0), we, oe);
64
 
65
  sr1 : sram generic map (index, abits, tacc, fname)
66
        port map (a, d(15 downto 8), cex(1), we, oe);
67
 
68
end sim;
69
-- pragma translate_on

powered by: WebSVN 2.1.0

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