mt_constants.hh revision 5222:bb733a878f85
1/*
2 * Copyright .AN) 2007 MIPS Technologies, Inc.  All Rights Reserved
3 *
4 * This software is part of the M5 simulator.
5 *
6 * THIS IS A LEGAL AGREEMENT.  BY DOWNLOADING, USING, COPYING, CREATING
7 * DERIVATIVE WORKS, AND/OR DISTRIBUTING THIS SOFTWARE YOU ARE AGREEING
8 * TO THESE TERMS AND CONDITIONS.
9 *
10 * Permission is granted to use, copy, create derivative works and
11 * distribute this software and such derivative works for any purpose,
12 * so long as (1) the copyright notice above, this grant of permission,
13 * and the disclaimer below appear in all copies and derivative works
14 * made, (2) the copyright notice above is augmented as appropriate to
15 * reflect the addition of any new copyrightable work in a derivative
16 * work (e.g., Copyright .AN) <Publication Year> Copyright Owner), and (3)
17 * the name of MIPS Technologies, Inc. ($B!H(BMIPS$B!I(B) is not used in any
18 * advertising or publicity pertaining to the use or distribution of
19 * this software without specific, written prior authorization.
20 *
21 * THIS SOFTWARE IS PROVIDED $B!H(BAS IS.$B!I(B  MIPS MAKES NO WARRANTIES AND
22 * DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, STATUTORY, IMPLIED OR
23 * OTHERWISE, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
25 * NON-INFRINGEMENT OF THIRD PARTY RIGHTS, REGARDING THIS SOFTWARE.
26 * IN NO EVENT SHALL MIPS BE LIABLE FOR ANY DAMAGES, INCLUDING DIRECT,
27 * INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, OR PUNITIVE DAMAGES OF
28 * ANY KIND OR NATURE, ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT,
29 * THIS SOFTWARE AND/OR THE USE OF THIS SOFTWARE, WHETHER SUCH LIABILITY
30 * IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR
31 * STRICT LIABILITY), OR OTHERWISE, EVEN IF MIPS HAS BEEN WARNED OF THE
32 * POSSIBILITY OF ANY SUCH LOSS OR DAMAGE IN ADVANCE.
33 *
34 * Authors: Jaidev Patwardhan
35 *
36 */
37
38#ifndef __ARCH_MIPS_MT_CONSTANTS_HH__
39#define __ARCH_MIPS_MT_CONSTANTS_HH__
40
41#include "arch/mips/types.hh"
42//#include "config/full_system.hh"
43
44namespace MipsISA
45{
46// MVPControl
47const unsigned MVPC_EVP = 0;
48const unsigned MVPC_CUR_VPE_HI = 3;
49const unsigned MVPC_CUR_VPE_LO = 0;
50
51// MVPConf0
52const unsigned MVPC0_TCA = 15;
53const unsigned MVPC0_PVPE_HI = 13;
54const unsigned MVPC0_PVPE_LO = 10;
55const unsigned MVPC0_PTC_HI = 7;
56const unsigned MVPC0_PTC_LO = 0;
57
58//VPEControl
59const unsigned VPEC_YSI = 21;
60const unsigned VPEC_EXCPT_HI = 18;
61const unsigned VPEC_EXCPT_LO = 16;
62const unsigned VPEC_TE = 15;
63const unsigned VPEC_TARG_TC_HI = 7;
64const unsigned VPEC_TARG_TC_LO = 0;
65
66//VPEConf0
67const unsigned VPEC0_MVP = 1;
68
69//TCBind
70const unsigned TCB_CUR_VPE_HI = 3;
71const unsigned TCB_CUR_VPE_LO = 0;
72const unsigned TCB_CUR_TC_HI = 28;
73const unsigned TCB_CUR_TC_LO = 21;
74
75
76//TCStatus
77const unsigned TCS_TCU_HI = 31;
78const unsigned TCS_TCU_LO = 28;
79const unsigned TCS_TMX = 27;
80const unsigned TCS_DT = 20;
81const unsigned TCS_DA = 15;
82const unsigned TCS_A = 13;
83const unsigned TCS_TKSU_HI = 12;
84const unsigned TCS_TKSU_LO = 11;
85const unsigned TCS_IXMT = 7;
86const unsigned TCS_ASID_HI = 7;
87const unsigned TCS_ASID_LO = 7;
88
89const unsigned TCSTATUS_TCU_HI = 31;
90const unsigned TCSTATUS_TCU_LO = 28;
91const unsigned TCSTATUS_TMX = 27;
92const unsigned TCSTATUS_RNST_HI = 24;
93const unsigned TCSTATUS_RNST_LO = 23;
94const unsigned TCSTATUS_TDS = 21;
95const unsigned TCSTATUS_DT = 20;
96const unsigned TCSTATUS_DA = 15;
97const unsigned TCSTATUS_A = 13;
98const unsigned TCSTATUS_TKSU_HI = 12;
99const unsigned TCSTATUS_TKSU_LO = 11;
100const unsigned TCSTATUS_IXMT = 7;
101const unsigned TCSTATUS_ASID_HI = 7;
102const unsigned TCSTATUS_ASID_LO = 7;
103
104//TCHalt
105const unsigned TCH_H = 0;
106
107//Status
108const unsigned S_CU_HI = 31;
109const unsigned S_CU_LO = 28;
110const unsigned S_MX = 24;
111const unsigned S_KSU_HI = 4;
112const unsigned S_KSU_LO = 3;
113
114// Config0
115const unsigned CFG_M = 31;
116
117// Config1
118const unsigned CFG1_M = 31;
119
120// Config2
121const unsigned CFG2_M = 31;
122
123// Config3
124const unsigned CFG3_M = 31;
125const unsigned CFG3_MT = 2;
126
127} // namespace MipsISA
128
129#endif
130