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

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [vhdl/] [arm/] [armcache.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tarookumic
-- $(lic)
2
-- $(help_generic)
3
-- $(help_local)
4
 
5
library ieee;
6
use ieee.std_logic_1164.all;
7
use work.amba.all;
8
use work.bus_comp.all;
9
use work.corelib.all;
10
use work.cache_comp.all;
11
use work.genic_lib.all;
12
use work.gendc_lib.all;
13
use work.cache_comp.all;
14
use work.bus_comp.all;
15
 
16
entity armcache is
17
  port (
18
    rst    : in  std_logic;
19
    clk    : in  std_logic;
20
    hold   : in cli_hold;
21
    ici    : in genic_type_in;
22
    ico    : out genic_type_out;
23
    dci    : in gendc_type_in;
24
    dco    : out gendc_type_out;
25
    ahbi   : in  ahb_mst_in_type;
26
    ahbo   : out ahb_mst_out_type;
27
    apbi   : in  apb_slv_in_type;
28
    apbo   : out apb_slv_out_type
29
    );
30
end armcache;
31
 
32
architecture rtl of armcache is
33
 
34
  type armcache_tmp_type is record
35
    dummy      : std_logic;
36
  end record;
37
  type armcache_reg_type is record
38
    genic_ctrl : gicl_ctrl;
39
    gendc_ctrl : gdcl_ctrl;
40
  end record;
41
  type armcache_dbg_type is record
42
     dummy : std_logic;
43
     -- pragma translate_off
44
     dbg : armcache_tmp_type;
45
     -- pragma translate_on
46
  end record;
47
  signal r, c       : armcache_reg_type;
48
  signal rdbg, cdbg : armcache_dbg_type;
49
 
50
  signal mi : ahbmst_mp_in_a(1 downto 0);
51
  signal mo : ahbmst_mp_out_a(1 downto 0);
52
 
53
  signal genic_i    : genic_type_in;
54
  signal genic_o    : genic_type_out;
55
  signal genic_ctrl : gicl_ctrl;
56
  signal genic_icmo : gencmem_type_ic_out;
57
  signal genic_icmi : gencmem_type_ic_in;
58
  signal genic_mcio : ahbmst_mp_out;
59
  signal genic_mcii : ahbmst_mp_in;
60
 
61
  signal gendc_i    : gendc_type_in;
62
  signal gendc_o    : gendc_type_out;
63
  signal gendc_ctrl : gdcl_ctrl;
64
  signal gendc_dcmo : gencmem_type_dc_out;
65
  signal gendc_dcmi : gencmem_type_dc_in;
66
  signal gendc_wbi  : genwb_type_in;
67
  signal gendc_wbo  : genwb_type_out;
68
 
69
  signal genwb_i     : genwb_type_in;
70
  signal genwb_o     : genwb_type_out;
71
  signal genwb_mcwbo : ahbmst_mp_out;
72
  signal genwb_mcwbi : ahbmst_mp_in;
73
 
74
  signal gencmem_i  : gencmem_type_in;
75
  signal gencmem_o  : gencmem_type_out;
76
 
77
begin
78
 
79
  p0: process (clk, rst, r, apbi )
80
    variable v    : armcache_reg_type;
81
    variable t    : armcache_tmp_type;
82
    variable vdbg : armcache_dbg_type;
83
  begin
84
 
85
    -- $(init(t:armcache_tmp_type))
86
 
87
    v := r;
88
 
89
    -- reset
90
    if ( rst = '0' ) then
91
      v.genic_ctrl.burst := '0';
92
      v.gendc_ctrl.writeback := '0';
93
      v.gendc_ctrl.allocateonstore := '0';
94
    end if;
95
 
96
    c <= v;
97
 
98
    genic_ctrl <= r.genic_ctrl;
99
    gendc_ctrl <= r.gendc_ctrl;
100
 
101
    -- pragma translate_off
102
    vdbg := rdbg;
103
    vdbg.dbg := t;
104
    cdbg <= vdbg;
105
    -- pragma translate_on  
106
 
107
  end process p0;
108
 
109
  pregs : process (clk, c)
110
  begin
111
    if rising_edge(clk) then
112
      r <= c;
113
      -- pragma translate_off
114
      rdbg <= cdbg;
115
      -- pragma translate_on
116
    end if;
117
  end process;
118
 
119
 
120
  ic0: genic port map ( rst, clk, hold, genic_i, genic_o, genic_ctrl, genic_icmo, genic_icmi,
121
                        genic_mcio, genic_mcii );
122
  genic_i <= ici;
123
  ico <= genic_o;
124
  genic_mcio <= mo(0);
125
  mi(0) <= genic_mcii;
126
 
127
  dc0: gendc port map ( rst, clk, hold, gendc_i, gendc_o, gendc_ctrl, gendc_dcmo, gendc_dcmi,
128
                        gendc_wbi, gendc_wbo );
129
  gendc_i <= dci;
130
  dco <= gendc_o;
131
 
132
  wb0: genwb port map ( rst, clk, genwb_i, genwb_o, genwb_mcwbo, genwb_mcwbi );
133
  genwb_i <= gendc_wbi;
134
  gendc_wbo <= genwb_o;
135
  genwb_mcwbo <= mo(1);
136
  mi(1) <= genwb_mcwbi;
137
 
138
  cm0: gencmem port map ( rst, clk, gencmem_i, gencmem_o);
139
  gencmem_i.ic <= genic_icmi;
140
  genic_icmo <= gencmem_o.ic;
141
  gencmem_i.dc <= gendc_dcmi;
142
  gendc_dcmo <= gencmem_o.dc;
143
 
144
  ahbmast0: ahbmst_mp generic map ( AHBMST_PORTS => 2)
145
                      port map ( rst, clk, mi, mo, ahbi, ahbo );
146
 
147
end rtl;

powered by: WebSVN 2.1.0

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