⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmuconfig.vhd

📁 leon3 source code 虽然gaisler网站上有下载
💻 VHD
字号:
--------------------------------------------------------------------------------  This file is a part of the GRLIB VHDL IP LIBRARY--  Copyright (C) 2003, 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.----  This program is distributed in the hope that it will be useful,--  but WITHOUT ANY WARRANTY; without even the implied warranty of--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the--  GNU General Public License for more details.----  You should have received a copy of the GNU General Public License--  along with this program; if not, write to the Free Software--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA ------------------------------------------------------------------------------- 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -