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/] [mmuiface.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:      mmuiface
20
-- File:        mmuiface.vhd
21
-- Author:      Konrad Eisele, Jiri Gaisler - Gaisler Research
22
-- Description: MMU interface types
23
------------------------------------------------------------------------------  
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
library grlib;
28
use grlib.amba.all;
29
use grlib.stdlib.all;
30
library gaisler;
31
use gaisler.mmuconfig.all;
32
package mmuiface is
33
 
34
type mmutlbcam_in_type is record
35
  tagin    : tlbcam_tfp;
36
  tagwrite : tlbcam_reg;
37
  trans_op : std_logic;
38
  flush_op : std_logic;
39
  write_op : std_logic;
40
  wb_op    : std_logic;
41
  mmuen    : std_logic;
42
  mset     : std_logic;
43
end record;
44
type mmutlbcami_a is array (natural range <>) of mmutlbcam_in_type;
45
 
46
constant mmutlbcam_in_type_none : mmutlbcam_in_type := (tlbcam_tfp_none,
47
        tlbcam_reg_none, '0', '0', '0', '0', '0', '0');
48
type mmutlbcam_out_type is record
49
  pteout   : std_logic_vector(31 downto 0);
50
  LVL      : std_logic_vector(1 downto 0);    -- level in pth
51
  hit      : std_logic;
52
  ctx      : std_logic_vector(M_CTX_SZ-1 downto 0);    -- for diagnostic access
53
  valid    : std_logic;                                -- for diagnostic access
54
  vaddr    : std_logic_vector(31 downto 0);            -- for diagnostic access
55
  NEEDSYNC : std_logic;
56
  WBNEEDSYNC : std_logic;
57
end record;
58
type mmutlbcamo_a is array (natural range <>) of mmutlbcam_out_type;
59
 
60
constant mmutlbcam_out_none : mmutlbcam_out_type := (zero32, "00",
61
        '0', "00000000", '0', zero32, '0', '0');
62
 
63
-- mmu i/o
64
 
65
type mmuidc_data_in_type is record
66
  data             : std_logic_vector(31 downto 0);
67
  su               : std_logic;
68
  read             : std_logic;
69
  isid             : mmu_idcache;
70
  wb_data          : std_logic_vector(31 downto 0);
71
end record;
72
 
73
type mmuidc_data_out_type is record
74
  finish           : std_logic;
75
  data             : std_logic_vector(31 downto 0);
76
  cache            : std_logic;
77
  accexc           : std_logic;
78
end record;
79
 
80
type mmudc_in_type is record
81
  trans_op         : std_logic;
82
  transdata        : mmuidc_data_in_type;
83
 
84
  -- dcache extra signals
85
  flush_op         : std_logic;
86
  diag_op          : std_logic;
87
  wb_op            : std_logic;
88
 
89
  fsread           : std_logic;
90
  mmctrl1          : mmctrl_type1;
91
end record;
92
 
93
type mmudc_out_type is record
94
  grant            : std_logic;
95
  transdata        : mmuidc_data_out_type;
96
  -- dcache extra signals
97
  mmctrl2          : mmctrl_type2;
98
  -- writebuffer out
99
  wbtransdata      : mmuidc_data_out_type;
100
end record;
101
 
102
type mmuic_in_type is record
103
  trans_op         : std_logic;
104
  transdata        : mmuidc_data_in_type;
105
end record;
106
 
107
type mmuic_out_type is record
108
  grant            : std_logic;
109
  transdata        : mmuidc_data_out_type;
110
 
111
end record;
112
 
113
 
114
--#lrue i/o
115
type mmulrue_in_type is record
116
  touch        : std_logic;
117
  pos          : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
118
  clear        : std_logic;
119
  flush        : std_logic;
120
 
121
  left         : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
122
  fromleft     : std_logic;
123
  right        : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
124
  fromright    : std_logic;
125
end record;
126
type mmulruei_a is array (natural range <>) of mmulrue_in_type;
127
 
128
type mmulrue_out_type is record
129
  pos          : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
130
  movetop      : std_logic;
131
end record;
132
constant mmulrue_out_none : mmulrue_out_type := (zero32(M_ENT_MAX_LOG-1 downto 0), '0');
133
type mmulrueo_a is array (natural range <>) of mmulrue_out_type;
134
 
135
--#lru i/o
136
type mmulru_in_type is record
137
  touch     : std_logic;
138
  touchmin  : std_logic;
139
  flush     : std_logic;
140
  pos       : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
141
  mmctrl1   : mmctrl_type1;
142
end record;
143
 
144
type mmulru_out_type is record
145
  pos      : std_logic_vector(M_ENT_MAX_LOG-1 downto 0);
146
end record;
147
 
148
--#mmu: tw i/o
149
type memory_mm_in_type is record
150
  address          : std_logic_vector(31 downto 0);
151
  data             : std_logic_vector(31 downto 0);
152
  size             : std_logic_vector(1 downto 0);
153
  burst            : std_logic;
154
  read             : std_logic;
155
  req              : std_logic;
156
  lock             : std_logic;
157
end record;
158
 
159
constant mci_zero : memory_mm_in_type := (X"00000000", X"00000000",
160
        "00", '0', '0', '0', '0');
161
 
162
type memory_mm_out_type is record
163
  data             : std_logic_vector(31 downto 0); -- memory data
164
  ready            : std_logic;                     -- cycle ready
165
  grant            : std_logic;                     -- 
166
  retry            : std_logic;                     -- 
167
  mexc             : std_logic;                     -- memory exception
168
  werr             : std_logic;                     -- memory write error
169
  cache            : std_logic;                     -- cacheable data
170
end record;
171
 
172
type mmutw_in_type is record
173
  walk_op_ur       : std_logic;
174
  areq_ur          : std_logic;
175
 
176
  data             : std_logic_vector(31 downto 0);
177
  adata            : std_logic_vector(31 downto 0);
178
  aaddr            : std_logic_vector(31 downto 0);
179
end record;
180
type mmutwi_a is array (natural range <>) of mmutw_in_type;
181
 
182
type mmutw_out_type is record
183
  finish           : std_logic;
184
  data             : std_logic_vector(31 downto 0);
185
  addr             : std_logic_vector(31 downto 0);
186
  lvl              : std_logic_vector(1 downto 0);
187
  fault_mexc       : std_logic;
188
  fault_trans      : std_logic;
189
  fault_inv        : std_logic;
190
  fault_lvl        : std_logic_vector(1 downto 0);
191
end record;
192
type mmutwo_a is array (natural range <>) of mmutw_out_type;
193
 
194
-- mmu tlb i/o
195
 
196
type mmutlb_in_type is record
197
  flush_op    : std_logic;
198
  diag_op_ur  : std_logic;
199
  wb_op       : std_logic;
200
 
201
  trans_op    : std_logic;
202
  transdata   : mmuidc_data_in_type;
203
  s2valid     : std_logic;
204
 
205
  annul       : std_logic;
206
  mmctrl1     : mmctrl_type1;
207
 
208
  -- fast writebuffer signals
209
  tlbcami          : mmutlbcami_a (M_ENT_MAX-1 downto 0);
210
 
211
end record;
212
type mmutlbi_a is array (natural range <>) of mmutlb_in_type;
213
 
214
type mmutlbfault_out_type is record
215
  fault_pro   : std_logic;
216
  fault_pri   : std_logic;
217
  fault_access     : std_logic;
218
  fault_mexc       : std_logic;
219
  fault_trans      : std_logic;
220
  fault_inv        : std_logic;
221
  fault_lvl        : std_logic_vector(1 downto 0);
222
  fault_su         : std_logic;
223
  fault_read       : std_logic;
224
  fault_isid       : mmu_idcache;
225
  fault_addr       : std_logic_vector(31 downto 0);
226
end record;
227
 
228
type mmutlb_out_type is record
229
  transdata   : mmuidc_data_out_type;
230
  fault       : mmutlbfault_out_type;
231
  nexttrans   : std_logic;
232
  s1finished  : std_logic;
233
 
234
  -- fast writebuffer signals
235
  tlbcamo          : mmutlbcamo_a (M_ENT_MAX-1 downto 0);
236
 
237
  -- writebuffer out
238
  wbtransdata      : mmuidc_data_out_type;
239
end record;
240
type mmutlbo_a is array (natural range <>) of mmutlb_out_type;
241
 
242
end;
243
 
244
 

powered by: WebSVN 2.1.0

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