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/] [leon3/] [tbufmem.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:      tbufmem
20
-- File:        tbufmem.vhd
21
-- Author:      Jiri Gaisler - Gaisler Research
22
-- Description: 128-bit trace buffer memory (CPU/AHB)
23
------------------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
library gaisler;
28
use gaisler.libiu.all;
29
library techmap;
30
use techmap.gencomp.all;
31
library grlib;
32
use grlib.stdlib.all;
33
 
34
entity tbufmem is
35
  generic (
36
    tech   : integer := 0;
37
    tbuf   : integer := 0 -- trace buf size in kB (0 - no trace buffer)
38
    );
39
  port (
40
    clk : in std_ulogic;
41
    di  : in tracebuf_in_type;
42
    do  : out tracebuf_out_type);
43
end;
44
 
45
architecture rtl of tbufmem is
46
 
47
constant ADDRBITS : integer := 10 + log2(tbuf) - 4;
48
signal enable : std_logic_vector(1 downto 0);
49
 
50
begin
51
 
52
  enable <= di.enable & di.enable;
53
  mem0 : for i in 0 to 1 generate
54
    ram0 : syncram64 generic map (tech => tech, abits => addrbits)
55
      port map ( clk, di.addr(addrbits-1 downto 0), di.data(((i*64)+63) downto (i*64)),
56
                 do.data(((i*64)+63) downto (i*64)), enable ,di.write(i*2+1 downto i*2),
57
                 di.diag);
58
  end generate;
59
end;
60
 

powered by: WebSVN 2.1.0

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