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

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [vhdl/] [sparc/] [cache.vhd] - Blame information for rev 5

Go to most recent revision | 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:      cache
19
-- File:        cache.vhd
20
-- Author:      Jiri Gaisler - ESA/ESTEC
21
-- Description: Complete cache sub-system with controllers and rams
22
------------------------------------------------------------------------------
23
-- Version control:
24
-- 17-02-1999:  First implemetation
25
-- 26-09-1999:  Release 1.0
26
------------------------------------------------------------------------------
27
 
28
library IEEE;
29
use IEEE.std_logic_1164.all;
30
use work.leon_config.all;
31
use work.amba.all;
32
use work.leon_iface.all;
33
 
34
entity cache is
35
  port (
36
    rst   : in  std_logic;
37
    clk   : in  clk_type;
38
    ici   : in  icache_in_type;
39
    ico   : out icache_out_type;
40
    dci   : in  dcache_in_type;
41
    dco   : out dcache_out_type;
42
    iuo   : in  iu_out_type;
43
    apbi  : in  apb_slv_in_type;
44
    apbo  : out apb_slv_out_type;
45
    ahbi  : in  ahb_mst_in_type;
46
    ahbo  : out ahb_mst_out_type;
47
    ahbsi : in  ahb_slv_in_type;
48
    crami : out cram_in_type;
49
    cramo : in  cram_out_type;
50
    fpuholdn : in  std_logic
51
  );
52
end;
53
 
54
architecture rtl of cache is
55
 
56
component acache
57
  port (
58
    rst    : in  std_logic;
59
    clk    : in  clk_type;
60
    mcii   : in  memory_ic_in_type;
61
    mcio   : out memory_ic_out_type;
62
    mcdi   : in  memory_dc_in_type;
63
    mcdo   : out memory_dc_out_type;
64
    iuo    : in  iu_out_type;
65
    apbi   : in  apb_slv_in_type;
66
    apbo   : out apb_slv_out_type;
67
    ahbi   : in  ahb_mst_in_type;
68
    ahbo   : out ahb_mst_out_type
69
  );
70
end component;
71
 
72
component dcache
73
  port (
74
    rst    : in  std_logic;
75
    clk    : in  clk_type;
76
    dci    : in  dcache_in_type;
77
    dco    : out dcache_out_type;
78
    ico    : in  icache_out_type;
79
    mcdi   : out memory_dc_in_type;
80
    mcdo   : in  memory_dc_out_type;
81
    ahbsi : in  ahb_slv_in_type;
82
    dcrami : out dcram_in_type;
83
    dcramo : in  dcram_out_type;
84
    fpuholdn : in  std_logic
85
);
86
end component;
87
 
88
component icache
89
  port (
90
    rst    : in  std_logic;
91
    clk    : in  clk_type;
92
    ici    : in  icache_in_type;
93
    ico    : out icache_out_type;
94
    dci    : in  dcache_in_type;
95
    dco    : in  dcache_out_type;
96
    mcii   : out memory_ic_in_type;
97
    mcio   : in  memory_ic_out_type;
98
    icrami : out icram_in_type;
99
    icramo : in  icram_out_type;
100
    fpuholdn : in  std_logic
101
);
102
end component;
103
 
104
signal icol  : icache_out_type;
105
signal dcol  : dcache_out_type;
106
signal mcii : memory_ic_in_type;
107
signal mcio : memory_ic_out_type;
108
signal mcdi : memory_dc_in_type;
109
signal mcdo : memory_dc_out_type;
110
 
111
begin
112
 
113
-- instruction cache controller
114
  icache0 : icache port map ( rst, clk, ici, icol, dci, dcol, mcii, mcio,
115
                              crami.icramin, cramo.icramout, fpuholdn);
116
 
117
-- data cache controller
118
  dcache0 : dcache port map ( rst, clk, dci, dcol, icol, mcdi, mcdo, ahbsi,
119
                              crami.dcramin, cramo.dcramout, fpuholdn);
120
 
121
-- AMBA AHB interface
122
  a0 : acache port map (rst, clk, mcii, mcio, mcdi, mcdo, iuo, apbi, apbo,
123
                        ahbi, ahbo);
124
 
125
  ico <= icol;
126
  dco <= dcol;
127
 
128
end ;
129
 

powered by: WebSVN 2.1.0

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