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

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [vhdl/] [sparc/] [dsu_mem.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tarookumic
 
2
 
3
 
4
 
5
----------------------------------------------------------------------------
6
--  This file is a part of the LEON VHDL model
7
--  Copyright (C) 1999  European Space Agency (ESA)
8
--
9
--  This library is free software; you can redistribute it and/or
10
--  modify it under the terms of the GNU Lesser General Public
11
--  License as published by the Free Software Foundation; either
12
--  version 2 of the License, or (at your option) any later version.
13
--
14
--  See the file COPYING.LGPL for the full details of the license.
15
 
16
 
17
-----------------------------------------------------------------------------
18
-- Entity:      dsu_mem
19
-- File:        dsu_mem.vhd
20
-- Author:      Jiri Gaisler - Gaisler Research
21
-- Description: DSU trace buffer memory
22
------------------------------------------------------------------------------
23
 
24
library IEEE;
25
use IEEE.std_logic_1164.all;
26
use work.leon_target.all;
27
use work.leon_config.all;
28
use work.leon_iface.all;
29
use work.tech_map.all;
30
 
31
entity dsu_mem is
32
  port (
33
    clk    : in  clk_type;
34
    dmi    : in  dsumem_in_type;
35
    dmo    : out dsumem_out_type
36
  );
37
end;
38
 
39
architecture rtl of dsu_mem is
40
 
41
begin
42
 
43
  nomix : if DSUTRACE and not DSUMIXED generate
44
    spram0 : if not DSUDPRAM generate
45
      mem0 : for i in 0 to 3 generate
46
        ram0 : syncram generic map ( dbits => 32, abits => TBUFABITS)
47
        port map ( dmi.pbufi.addr(TBUFABITS-1 downto 0), clk,
48
          dmi.pbufi.data(((i*32)+31) downto (i*32)),
49
          dmo.pbufo.data(((i*32)+31) downto (i*32)), dmi.pbufi.enable, dmi.pbufi.write(i));
50
      end generate;
51
    end generate;
52
    dpram0 : if DSUDPRAM generate
53
      mem0 : for i in 0 to 1 generate
54
        ram0 : dpsyncram generic map ( dbits => 32, abits => TBUFABITS+1)
55
        port map ( dmi.pbufi.addr(TBUFABITS downto 0), clk,
56
          dmi.pbufi.data(((i*32)+31) downto (i*32)),
57
          dmo.pbufo.data(((i*32)+31) downto (i*32)), dmi.pbufi.enable, dmi.pbufi.write(i),
58
          dmi.abufi.addr(TBUFABITS downto 0),
59
          dmi.pbufi.data(((i*32)+31+64) downto (i*32+64)),
60
          dmo.pbufo.data(((i*32)+31+64) downto (i*32+64)), dmi.pbufi.enable,
61
          dmi.pbufi.write(i+2));
62
      end generate;
63
    end generate;
64
  end generate;
65
 
66
  tbmix : if DSUTRACE and DSUMIXED generate
67
    spram0 : if not DSUDPRAM generate
68
      mem0 : for i in 0 to 3 generate
69
        ram0 : syncram generic map ( dbits => 32, abits => TBUFABITS-1)
70
        port map ( dmi.pbufi.addr(TBUFABITS-2 downto 0), clk,
71
          dmi.pbufi.data(((i*32)+31) downto (i*32)),
72
          dmo.pbufo.data(((i*32)+31) downto (i*32)),
73
          dmi.pbufi.enable, dmi.pbufi.write(i));
74
      end generate;
75
      mem1 : for i in 0 to 3 generate
76
        ram0 : syncram generic map ( dbits => 32, abits => TBUFABITS-1)
77
        port map ( dmi.abufi.addr(TBUFABITS-2 downto 0), clk,
78
          dmi.abufi.data(((i*32)+31) downto (i*32)),
79
          dmo.abufo.data(((i*32)+31) downto (i*32)),
80
          dmi.abufi.enable, dmi.abufi.write(i));
81
      end generate;
82
    end generate;
83
    dpram0 : if DSUDPRAM generate
84
      mem0 : for i in 0 to 3 generate
85
        ram0 : dpsyncram generic map ( dbits => 32, abits => TBUFABITS)
86
        port map ( dmi.pbufi.addr(TBUFABITS-1 downto 0), clk,
87
          dmi.pbufi.data(((i*32)+31) downto (i*32)),
88
          dmo.pbufo.data(((i*32)+31) downto (i*32)),
89
          dmi.pbufi.enable, dmi.pbufi.write(i),
90
          dmi.abufi.addr(TBUFABITS-1 downto 0),
91
          dmi.abufi.data(((i*32)+31) downto (i*32)),
92
          dmo.abufo.data(((i*32)+31) downto (i*32)),
93
          dmi.abufi.enable, dmi.abufi.write(i));
94
      end generate;
95
    end generate;
96
  end generate;
97
 
98
end;
99
 
100
 

powered by: WebSVN 2.1.0

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