mmuconfig.vhd

来自「The GRLIB IP Library is an integrated se」· VHDL 代码 · 共 78 行

VHD
78
字号
------------------------------------------------------------------------------  This file is a part of the GRLIB VHDL IP LIBRARY--  Copyright (C) 2004 GAISLER RESEARCH----  This program is free software; you can redistribute it and/or modify--  it under the terms of the GNU General Public License as published by--  the Free Software Foundation; either version 2 of the License, or--  (at your option) any later version.----  See the file COPYING for the full details of the license.--------------------------------------------------------------------------------- Package: 	mmuconfig-- File:	mmuconfig.vhd-- Author:	Konrad Eisele, Jiri Gaisler, Gaisler Research-- Description:	MMU types and constants------------------------------------------------------------------------------library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.stdlib.all;library gaisler;package mmuconfig isconstant M_CTX_SZ       : integer := 8;constant M_ENT_MAX      : integer := 64;constant XM_ENT_MAX_LOG : integer := log2(M_ENT_MAX);constant M_ENT_MAX_LOG  : integer := XM_ENT_MAX_LOG;type mmu_idcache is (id_icache, id_dcache);-- ##############################################################--     1.0 virtual address [sparc V8: p.243,Appx.H,Figure H-4]               --     +--------+--------+--------+---------------+--  a) | INDEX1 | INDEX2 | INDEX3 |    OFFSET     |  --     +--------+--------+--------+---------------+--      31    24 23    18 17    12 11            0constant VA_I1_SZ : integer := 8;constant VA_I2_SZ : integer := 6;constant VA_I3_SZ : integer := 6;constant VA_I_SZ  : integer := VA_I1_SZ+VA_I2_SZ+VA_I3_SZ;constant VA_I_MAX : integer := 8;constant VA_I1_U  : integer := 31;constant VA_I1_D  : integer := 32-VA_I1_SZ;constant VA_I2_U  : integer := 31-VA_I1_SZ;constant VA_I2_D  : integer := 32-VA_I1_SZ-VA_I2_SZ;constant VA_I3_U  : integer := 31-VA_I1_SZ-VA_I2_SZ;constant VA_I3_D  : integer := 32-VA_I_SZ;constant VA_I_U   : integer := 31;constant VA_I_D   : integer := 32-VA_I_SZ;constant VA_OFF_U : integer := 31-VA_I_SZ;constant VA_OFF_D : integer := 0;constant VA_OFFCTX_U : integer := 31;constant VA_OFFCTX_D : integer := 0;constant VA_OFFREG_U : integer := 31-VA_I1_SZ;constant VA_OFFREG_D : integer := 0;constant VA_OFFSEG_U : integer := 31-VA_I1_SZ-VA_I2_SZ;constant VA_OFFSEG_D : integer := 0;constant VA_OFFPAG_U : integer := 31-VA_I_SZ;constant VA_OFFPAG_D : integer := 0;-- ##############################################################--     2.0 PAGE TABE DESCRIPTOR (PTD) [sparc V8: p.247,Appx.H,Figure H-7]                             --                                                                  --     +-------------------------------------------------+---+---+      --     |    Page Table Pointer (PTP)                     | 0 | 0 |      --     +-------------------------------------------------+---+---+      --      31                                              2  1   0        ----     2.1 PAGE TABE ENTRY (PTE) [sparc V8: p.247,Appx.H,Figure H-8]--                                                                                       --     +-----------------------------+---+---+---+-----------+---+--     |Physical Page Number (PPN)   | C | M | R |     ACC   | ET

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?