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/] [mmu.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:      MMU
20
-- File:        mmu.vhd
21
-- Author:      Konrad Eisele, Jiri Gaisler, Gaisler Research
22
-- Description: Leon3 MMU top level entity
23
------------------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
library grlib;
28
use grlib.stdlib.all;
29
library techmap;
30
use techmap.gencomp.all;
31
library gaisler;
32
use gaisler.mmuconfig.all;
33
use gaisler.mmuiface.all;
34
use gaisler.libmmu.all;
35
 
36
entity mmu is
37
  generic (
38
    tech      : integer range 0 to NTECH := 0;
39
    itlbnum   : integer range 2 to 64 := 8;
40
    dtlbnum   : integer range 2 to 64 := 8;
41
    tlb_type  : integer range 0 to 3 := 1;
42
    tlb_rep   : integer range 0 to 1 := 0
43
    );
44
  port (
45
    rst  : in std_logic;
46
    clk  : in std_logic;
47
 
48
    mmudci : in  mmudc_in_type;
49
    mmudco : out mmudc_out_type;
50
 
51
    mmuici : in  mmuic_in_type;
52
    mmuico : out mmuic_out_type;
53
 
54
    mcmmo  : in  memory_mm_out_type;
55
    mcmmi  : out memory_mm_in_type
56
    );
57
end mmu;
58
 
59
architecture rtl of mmu is
60
 
61
constant MMUCTX_BITS    : integer := M_CTX_SZ;
62
 
63
constant M_TLB_TYPE     : integer range 0 to 1 := conv_integer(conv_std_logic_vector(tlb_type,2) and conv_std_logic_vector(1,2));  -- eather split or combined
64
constant M_TLB_FASTWRITE : integer range 0 to 3 := conv_integer(conv_std_logic_vector(tlb_type,2) and conv_std_logic_vector(2,2));   -- fast writebuffer
65
constant M_ENT_I        : integer range 2 to 64 := itlbnum;   -- icache tlb entries: number
66
constant M_ENT_ILOG     : integer := log2(M_ENT_I);     -- icache tlb entries: address bits
67
constant M_ENT_D        : integer range 2 to 64 := dtlbnum;   -- dcache tlb entries: number
68
constant M_ENT_DLOG     : integer := log2(M_ENT_D);     -- dcache tlb entries: address bits
69
constant M_ENT_C        : integer range 2 to 64 := M_ENT_I;   -- i/dcache tlb entries: number
70
constant M_ENT_CLOG     : integer := M_ENT_ILOG;     -- i/dcache tlb entries: address bits
71
 
72
  type mmu_op is record
73
    trans_op  : std_logic;
74
    flush_op  : std_logic;
75
    diag_op   : std_logic;
76
  end record;
77
 
78
  type mmu_cmbpctrl is record
79
    tlbowner     : mmu_idcache;
80
    tlbactive    : std_logic;
81
    op           : mmu_op;
82
  end record;
83
 
84
  type mmu_rtype is record
85
    cmb_s1          : mmu_cmbpctrl;
86
    cmb_s2          : mmu_cmbpctrl;
87
 
88
    splt_is1          : mmu_cmbpctrl;
89
    splt_is2          : mmu_cmbpctrl;
90
    splt_ds1          : mmu_cmbpctrl;
91
    splt_ds2          : mmu_cmbpctrl;
92
 
93
    twactive     : std_logic;        -- split tlb
94
    twowner      : mmu_idcache;        -- split tlb
95
 
96
    flush         : std_logic;
97
    mmctrl2       : mmctrl_type2;
98
  end record;
99
 
100
  signal r, c   : mmu_rtype;
101
 
102
  -- tlb
103
  component mmutlb
104
    generic (
105
      tech     : integer range 0 to NTECH := 0;
106
      entries  : integer range 2 to 32 := 8;
107
      tlb_type  : integer range 0 to 3 := 1;
108
      tlb_rep   : integer range 0 to 1 := 0
109
      );
110
    port (
111
      rst   : in std_logic;
112
      clk   : in std_logic;
113
      tlbi  : in mmutlb_in_type;
114
      tlbo  : out mmutlb_out_type;
115
      two  : in mmutw_out_type;
116
      twi  : out mmutw_in_type
117
      );
118
  end component;
119
  signal tlbi_a0 : mmutlb_in_type;
120
  signal tlbi_a1 : mmutlb_in_type;
121
  signal tlbo_a0 : mmutlb_out_type;
122
  signal tlbo_a1 : mmutlb_out_type;
123
  signal twi_a : mmutwi_a(1 downto 0);
124
  signal two_a : mmutwo_a(1 downto 0);
125
 
126
  -- table walk
127
  component mmutw
128
  port (
129
    rst     : in  std_logic;
130
    clk     : in  std_logic;
131
    mmctrl1 : in  mmctrl_type1;
132
    twi     : in  mmutw_in_type;
133
    two     : out mmutw_out_type;
134
    mcmmo   : in  memory_mm_out_type;
135
    mcmmi   : out memory_mm_in_type
136
    );
137
  end component;
138
  signal twi     : mmutw_in_type;
139
  signal two     : mmutw_out_type;
140
  signal mmctrl1 : mmctrl_type1;
141
 
142
begin
143
 
144
  p1: process (clk)
145
  begin if rising_edge(clk) then r <= c; end if;
146
  end process p1;
147
 
148
 
149
  p0: process (rst, r, c, mmudci, mmuici, mcmmo, tlbo_a0, tlbo_a1, tlbi_a0, tlbi_a1, two_a, twi_a, two)
150
    variable cmbtlbin     : mmuidc_data_in_type;
151
    variable cmbtlbout    : mmutlb_out_type;
152
 
153
    variable spltitlbin     : mmuidc_data_in_type;
154
    variable spltdtlbin     : mmuidc_data_in_type;
155
    variable spltitlbout    : mmutlb_out_type;
156
    variable spltdtlbout    : mmutlb_out_type;
157
 
158
 
159
 
160
    variable mmuico_transdata : mmuidc_data_out_type;
161
    variable mmudco_transdata : mmuidc_data_out_type;
162
    variable mmuico_grant : std_logic;
163
    variable mmudco_grant : std_logic;
164
    variable v            : mmu_rtype;
165
    variable twiv         : mmutw_in_type;
166
    variable twod, twoi   : mmutw_out_type;
167
    variable fault       : mmutlbfault_out_type;
168
 
169
    variable wbtransdata : mmuidc_data_out_type;
170
 
171
    variable fs : mmctrl_fs_type;
172
    variable fa : std_logic_vector(VA_I_SZ-1 downto 0);
173
  begin
174
 
175
    v := r;
176
 
177
    wbtransdata.finish := '0';
178
    wbtransdata.data   := (others => '0');
179
    wbtransdata.cache  := '0';
180
    wbtransdata.accexc := '0';
181
    if (M_TLB_TYPE = 0) and (M_TLB_FASTWRITE /= 0) then
182
      wbtransdata := tlbo_a1.wbtransdata;
183
    end if;
184
 
185
    cmbtlbin.data := (others => '0');
186
    cmbtlbin.su := '0';
187
    cmbtlbin.read := '0';
188
    cmbtlbin.isid := id_dcache;
189
 
190
    cmbtlbout.transdata.finish := '0';
191
    cmbtlbout.transdata.data := (others => '0');
192
    cmbtlbout.transdata.cache := '0';
193
    cmbtlbout.transdata.accexc := '0';
194
 
195
    cmbtlbout.fault.fault_pro := '0';
196
    cmbtlbout.fault.fault_pri := '0';
197
    cmbtlbout.fault.fault_access := '0';
198
    cmbtlbout.fault.fault_mexc := '0';
199
    cmbtlbout.fault.fault_trans := '0';
200
    cmbtlbout.fault.fault_inv := '0';
201
    cmbtlbout.fault.fault_lvl := (others => '0');
202
    cmbtlbout.fault.fault_su  := '0';
203
    cmbtlbout.fault.fault_read := '0';
204
    cmbtlbout.fault.fault_isid  := id_dcache;
205
    cmbtlbout.fault.fault_addr := (others => '0');
206
 
207
    cmbtlbout.nexttrans := '0';
208
    cmbtlbout.s1finished := '0';
209
 
210
    mmuico_transdata.finish := '0';
211
    mmuico_transdata.data := (others => '0');
212
    mmuico_transdata.cache := '0';
213
    mmuico_transdata.accexc := '0';
214
 
215
    mmudco_transdata.finish := '0';
216
    mmudco_transdata.data := (others => '0');
217
    mmudco_transdata.cache := '0';
218
    mmudco_transdata.accexc := '0';
219
 
220
    mmuico_grant := '0';
221
    mmudco_grant := '0';
222
 
223
    twiv.walk_op_ur := '0';
224
    twiv.areq_ur := '0';
225
 
226
    twiv.data := (others => '0');
227
    twiv.adata := (others => '0');
228
    twiv.aaddr := (others => '0');
229
 
230
    twod.finish := '0';
231
    twod.data := (others => '0');
232
    twod.addr := (others => '0');
233
    twod.lvl := (others => '0');
234
    twod.fault_mexc := '0';
235
    twod.fault_trans := '0';
236
    twod.fault_inv := '0';
237
    twod.fault_lvl := (others => '0');
238
 
239
    twoi.finish := '0';
240
    twoi.data := (others => '0');
241
    twoi.addr := (others => '0');
242
    twoi.lvl := (others => '0');
243
    twoi.fault_mexc := '0';
244
    twoi.fault_trans := '0';
245
    twoi.fault_inv := '0';
246
    twoi.fault_lvl := (others => '0');
247
 
248
    fault.fault_pro := '0';
249
    fault.fault_pri := '0';
250
    fault.fault_access := '0';
251
    fault.fault_mexc := '0';
252
    fault.fault_trans := '0';
253
    fault.fault_inv := '0';
254
    fault.fault_lvl := (others => '0');
255
    fault.fault_su := '0';
256
    fault.fault_read := '0';
257
    fault.fault_isid := id_dcache;
258
    fault.fault_addr := (others => '0');
259
 
260
    fs.ow := '0';
261
    fs.fav := '0';
262
    fs.ft := (others => '0');
263
    fs.at_ls := '0';
264
    fs.at_id := '0';
265
    fs.at_su := '0';
266
    fs.l := (others => '0');
267
    fs.ebe := (others => '0');
268
 
269
    fa := (others => '0');
270
 
271
    if M_TLB_TYPE = 0 then
272
 
273
      spltitlbout := tlbo_a0;
274
      spltdtlbout := tlbo_a1;
275
      twod := two; twoi := two;
276
      twod.finish := '0'; twoi.finish := '0';
277
      spltdtlbin := mmudci.transdata;
278
      spltitlbin := mmuici.transdata;
279
      mmudco_transdata := spltdtlbout.transdata;
280
      mmuico_transdata := spltitlbout.transdata;
281
 
282
      -- d-tlb
283
      if ((not r.splt_ds1.tlbactive) or spltdtlbout.s1finished) = '1'  then
284
        v.splt_ds1.tlbactive := '0';
285
        v.splt_ds1.op.trans_op := '0';
286
        v.splt_ds1.op.flush_op := '0';
287
        if mmudci.trans_op = '1' then
288
          mmudco_grant := '1';
289
          v.splt_ds1.tlbactive := '1';
290
          v.splt_ds1.op.trans_op := '1';
291
        elsif mmudci.flush_op = '1' then
292
          v.flush := '1';
293
          mmudco_grant := '1';
294
          v.splt_ds1.tlbactive := '1';
295
          v.splt_ds1.op.flush_op := '1';
296
        end if;
297
      end if;
298
 
299
      -- i-tlb
300
      if ((not r.splt_is1.tlbactive) or spltitlbout.s1finished) = '1'  then
301
        v.splt_is1.tlbactive := '0';
302
        v.splt_is1.op.trans_op := '0';
303
        v.splt_is1.op.flush_op := '0';
304
        if v.flush = '1' then
305
          v.flush := '0';
306
          v.splt_is1.tlbactive := '1';
307
          v.splt_is1.op.flush_op := '1';
308
        elsif mmuici.trans_op = '1' then
309
          mmuico_grant := '1';
310
          v.splt_is1.tlbactive := '1';
311
          v.splt_is1.op.trans_op := '1';
312
        end if;
313
      end if;
314
 
315
      if spltitlbout.transdata.finish = '1' and (r.splt_is2.op.flush_op = '0') then
316
        fault := spltitlbout.fault;
317
      end if;
318
      if spltdtlbout.transdata.finish = '1' and (r.splt_is2.op.flush_op = '0') then
319
        if (spltdtlbout.fault.fault_mexc or
320
            spltdtlbout.fault.fault_trans or
321
            spltdtlbout.fault.fault_inv or
322
            spltdtlbout.fault.fault_pro or
323
            spltdtlbout.fault.fault_pri or
324
            spltdtlbout.fault.fault_access) = '1' then
325
          fault := spltdtlbout.fault;     -- overwrite icache fault
326
        end if;
327
      end if;
328
 
329
      if spltitlbout.s1finished = '1' then
330
        v.splt_is2 := r.splt_is1;
331
      end if;
332
      if spltdtlbout.s1finished = '1' then
333
        v.splt_ds2 := r.splt_ds1;
334
      end if;
335
 
336
      if ( r.splt_is2.op.flush_op ) = '1' then
337
        mmuico_transdata.finish := '0';
338
      end if;
339
 
340
      -- share tw
341
      if two.finish = '1' then
342
        v.twactive := '0';
343
      end if;
344
 
345
      if r.twowner = id_icache then
346
        twiv := twi_a(0);
347
        twoi.finish := two.finish;
348
      else
349
        twiv := twi_a(1);
350
        twod.finish := two.finish;
351
      end if;
352
 
353
      if (v.twactive) = '0'  then
354
        if (twi_a(1).areq_ur or twi_a(1).walk_op_ur) = '1' then
355
          v.twactive := '1';
356
          v.twowner := id_dcache;
357
        elsif (twi_a(0).areq_ur or twi_a(0).walk_op_ur) = '1' then
358
          v.twactive := '1';
359
          v.twowner := id_icache;
360
        end if;
361
      end if;
362
 
363
    else
364
 
365
      --# combined i/d cache: 1 tlb, 1 tw
366
      -- share one tlb among i and d cache
367
      cmbtlbout := tlbo_a0;
368
      mmuico_grant := '0'; mmudco_grant := '0';
369
      mmuico_transdata.finish := '0'; mmudco_transdata.finish := '0';
370
      twiv := twi_a(0);
371
      twod := two; twoi := two;
372
      twod.finish := '0'; twoi.finish := '0';
373
      -- twod.finish := two.finish;
374
      twoi.finish := two.finish;
375
 
376
      if ((not v.cmb_s1.tlbactive) or cmbtlbout.s1finished) = '1'  then
377
        v.cmb_s1.tlbactive := '0';
378
        v.cmb_s1.op.trans_op := '0';
379
        v.cmb_s1.op.flush_op := '0';
380
        if (mmudci.trans_op or mmudci.flush_op or mmuici.trans_op) = '1' then
381
          v.cmb_s1.tlbactive := '1';
382
        end if;
383
        if mmudci.trans_op = '1' then
384
          mmudco_grant := '1';
385
          v.cmb_s1.tlbowner := id_dcache;
386
          v.cmb_s1.op.trans_op := '1';
387
        elsif mmudci.flush_op = '1' then
388
          mmudco_grant := '1';
389
          v.cmb_s1.tlbowner := id_dcache;
390
          v.cmb_s1.op.flush_op := '1';
391
        elsif mmuici.trans_op = '1' then
392
          mmuico_grant := '1';
393
          v.cmb_s1.tlbowner := id_icache;
394
          v.cmb_s1.op.trans_op := '1';
395
        end if;
396
      end if;
397
 
398
      if (r.cmb_s1.tlbactive and not r.cmb_s2.tlbactive)  = '1'  then
399
 
400
      end if;
401
 
402
      if cmbtlbout.s1finished = '1' then
403
        v.cmb_s2 := r.cmb_s1;
404
      end if;
405
 
406
      if r.cmb_s1.tlbowner = id_dcache then
407
        cmbtlbin := mmudci.transdata;
408
      else
409
        cmbtlbin := mmuici.transdata;
410
      end if;
411
 
412
      if r.cmb_s2.tlbowner = id_dcache then
413
        mmudco_transdata := cmbtlbout.transdata;
414
      else
415
        mmuico_transdata := cmbtlbout.transdata;
416
      end if;
417
 
418
      if cmbtlbout.transdata.finish = '1' and (r.cmb_s2.op.flush_op = '0')  then
419
        fault := cmbtlbout.fault;
420
      end if;
421
 
422
    end if;
423
 
424
 
425
 
426
 
427
    -- # fault status register
428
    if (mmudci.fsread) = '1' then
429
      v.mmctrl2.valid := '0'; v.mmctrl2.fs.fav := '0';
430
    end if;
431
 
432
    if (fault.fault_mexc) = '1' then
433
      fs.ft := FS_FT_TRANS;
434
    elsif (fault.fault_trans) = '1' then
435
      fs.ft := FS_FT_INV;
436
    elsif (fault.fault_inv) = '1' then
437
      fs.ft := FS_FT_INV;
438
    elsif (fault.fault_pri) = '1' then
439
      fs.ft := FS_FT_PRI;
440
    elsif (fault.fault_pro) = '1' then
441
      fs.ft := FS_FT_PRO;
442
    elsif (fault.fault_access) = '1' then
443
      fs.ft := FS_FT_BUS;
444
    else
445
      fs.ft := FS_FT_NONE;
446
    end if;
447
 
448
    fs.ow := '0';
449
    fs.l := fault.fault_lvl;
450
    if fault.fault_isid = id_dcache then
451
      fs.at_id := '0';
452
    else
453
      fs.at_id := '1';
454
    end if;
455
    fs.at_su := fault.fault_su;
456
    fs.at_ls := not fault.fault_read;
457
    fs.fav := '1';
458
    fs.ebe := (others => '0');
459
 
460
    fa := fault.fault_addr(VA_I_U downto VA_I_D);
461
 
462
    if (fault.fault_mexc or
463
        fault.fault_trans or
464
        fault.fault_inv or
465
        fault.fault_pro or
466
        fault.fault_pri or
467
        fault.fault_access) = '1' then
468
 
469
      --# priority
470
      if v.mmctrl2.valid = '1'then
471
        if (fault.fault_mexc) = '1' then
472
          v.mmctrl2.fs := fs;
473
          v.mmctrl2.fa := fa;
474
        else
475
          if (r.mmctrl2.fs.ft /= FS_FT_INV) then
476
            if fault.fault_isid = id_dcache then
477
            -- dcache
478
              v.mmctrl2.fs := fs;
479
              v.mmctrl2.fa := fa;
480
            else
481
            -- icache
482
              if (not r.mmctrl2.fs.at_id) = '0' then
483
                fs.ow := '1';
484
                v.mmctrl2.fs := fs;
485
                v.mmctrl2.fa := fa;
486
              end if;
487
            end if;
488
          end if;
489
 
490
        end if;
491
      else
492
        v.mmctrl2.fs := fs;
493
        v.mmctrl2.fa := fa;
494
        v.mmctrl2.valid := '1';
495
      end if;
496
 
497
      if (fault.fault_isid) = id_dcache then
498
        mmudco_transdata.accexc := '1';
499
      else
500
        mmuico_transdata.accexc := '1';
501
      end if;
502
 
503
    end if;
504
 
505
    -- # reset
506
    if ( rst = '0' ) then
507
      if M_TLB_TYPE = 0 then
508
        v.splt_is1.tlbactive := '0';
509
        v.splt_is2.tlbactive := '0';
510
        v.splt_ds1.tlbactive := '0';
511
        v.splt_ds2.tlbactive := '0';
512
        v.splt_is1.op.trans_op := '0';
513
        v.splt_is2.op.trans_op := '0';
514
        v.splt_ds1.op.trans_op := '0';
515
        v.splt_ds2.op.trans_op := '0';
516
        v.splt_is1.op.flush_op := '0';
517
        v.splt_is2.op.flush_op := '0';
518
        v.splt_ds1.op.flush_op := '0';
519
        v.splt_ds2.op.flush_op := '0';
520
      else
521
        v.cmb_s1.tlbactive := '0';
522
        v.cmb_s2.tlbactive := '0';
523
        v.cmb_s1.op.trans_op := '0';
524
        v.cmb_s2.op.trans_op := '0';
525
        v.cmb_s1.op.flush_op := '0';
526
        v.cmb_s2.op.flush_op := '0';
527
      end if;
528
      v.flush := '0';
529
      v.mmctrl2.valid := '0';
530
      v.twactive := '0';
531
      v.twowner := id_icache;
532
    end if;
533
 
534
    -- drive signals
535
    if M_TLB_TYPE = 0 then
536
      tlbi_a0.trans_op  <= r.splt_is1.op.trans_op;
537
      tlbi_a0.flush_op  <= r.splt_is1.op.flush_op;
538
      tlbi_a0.transdata <= spltitlbin;
539
      tlbi_a0.s2valid   <= r.splt_is2.tlbactive;
540
      tlbi_a0.mmctrl1   <= mmudci.mmctrl1;
541
      tlbi_a0.wb_op     <= '0';
542
      tlbi_a1.trans_op  <= r.splt_ds1.op.trans_op;
543
      tlbi_a1.flush_op  <= r.splt_ds1.op.flush_op;
544
      tlbi_a1.transdata <= spltdtlbin;
545
      tlbi_a1.s2valid   <= r.splt_ds2.tlbactive;
546
      tlbi_a1.mmctrl1   <= mmudci.mmctrl1;
547
      tlbi_a1.wb_op     <= mmudci.wb_op;
548
    else
549
      tlbi_a0.trans_op  <= r.cmb_s1.op.trans_op;
550
      tlbi_a0.flush_op  <= r.cmb_s1.op.flush_op;
551
      tlbi_a0.transdata <= cmbtlbin;
552
      tlbi_a0.s2valid   <= r.cmb_s2.tlbactive;
553
      tlbi_a0.mmctrl1   <= mmudci.mmctrl1;
554
      tlbi_a0.wb_op     <= '0';
555
    end if;
556
    tlbi_a0.tlbcami     <= (others => mmutlbcam_in_type_none);
557
    tlbi_a1.tlbcami     <= (others => mmutlbcam_in_type_none);
558
 
559
    mmudco.transdata <= mmudco_transdata;
560
    mmuico.transdata <= mmuico_transdata;
561
    mmudco.grant     <= mmudco_grant;
562
    mmuico.grant     <= mmuico_grant;
563
    mmudco.mmctrl2   <= r.mmctrl2;
564
    mmudco.wbtransdata <= wbtransdata;
565
 
566
    twi      <= twiv;
567
    two_a(0) <= twoi;
568
    two_a(1) <= twod;
569
    mmctrl1 <= mmudci.mmctrl1;
570
 
571
    c <= v;
572
 
573
  end process p0;
574
 
575
  tlbcomb0: if M_TLB_TYPE = 1 generate
576
    -- i/d tlb
577
    ctlb0 : mmutlb
578
      generic map ( tech, M_ENT_C, 0, tlb_rep )
579
      port map (rst, clk, tlbi_a0, tlbo_a0, two_a(0), twi_a(0));
580
  end generate tlbcomb0;
581
 
582
  tlbsplit0: if M_TLB_TYPE = 0 generate
583
    -- i tlb
584
    itlb0 : mmutlb
585
      generic map ( tech, M_ENT_I, 0, tlb_rep )
586
      port map (rst, clk, tlbi_a0, tlbo_a0, two_a(0), twi_a(0));
587
    -- d tlb
588
    dtlb0 : mmutlb
589
      generic map ( tech, M_ENT_D, tlb_type, tlb_rep )
590
      port map (rst, clk, tlbi_a1, tlbo_a1, two_a(1), twi_a(1));
591
  end generate tlbsplit0;
592
 
593
  -- table walk component
594
  tw0 : mmutw
595
    port map (rst, clk, mmctrl1, twi, two, mcmmo, mcmmi);
596
 
597
-- pragma translate_off
598
  chk : process
599
  begin
600
    assert not ((M_TLB_TYPE = 1) and (M_TLB_FASTWRITE /= 0)) report
601
        "Fast writebuffer only supported for combined cache"
602
    severity failure;
603
    wait;
604
  end process;
605
-- pragma translate_on
606
 
607
 
608
end rtl;

powered by: WebSVN 2.1.0

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