gem5  v20.1.0.0
miscregs.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2005 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef __ARCH_SPARC_MISCREGS_HH__
30 #define __ARCH_SPARC_MISCREGS_HH__
31 
32 #include "base/bitunion.hh"
33 #include "base/types.hh"
34 
35 namespace SparcISA
36 {
38 {
40 // MISCREG_Y,
41 // MISCREG_CCR,
50  MISCREG_SOFTINT, /* 10 */
54 
62  MISCREG_PSTATE, /* 20 */
66 // MISCREG_CANSAVE,
67 // MISCREG_CANRESTORE,
68 // MISCREG_CLEANWIN,
69 // MISCREG_OTHERWIN,
70 // MISCREG_WSTATE,
72 
74  MISCREG_HPSTATE, /* 30 */
81 
84 
90 
100 
101  /* CPU Queue Registers */
110 
111  /* All the data for the TLB packed up in one register. */
114 };
115 
116 BitUnion64(HPSTATE)
117  Bitfield<0> tlz;
118  Bitfield<2> hpriv;
119  Bitfield<5> red;
120  Bitfield<10> ibe;
121  Bitfield<11> id; // this impl. dependent (id) field m
122 EndBitUnion(HPSTATE)
123 
124 BitUnion16(PSTATE)
125  Bitfield<1> ie;
126  Bitfield<2> priv;
127  Bitfield<3> am;
128  Bitfield<4> pef;
129  Bitfield<7, 6> mm;
130  Bitfield<8> tle;
131  Bitfield<9> cle;
132  Bitfield<10> pid0;
133  Bitfield<11> pid1;
134 EndBitUnion(PSTATE)
135 
136 BitUnion8(CCR)
137  SubBitUnion(xcc, 7, 4)
138  Bitfield<7> n;
139  Bitfield<6> z;
140  Bitfield<5> v;
141  Bitfield<4> c;
142  EndSubBitUnion(xcc)
143  SubBitUnion(icc, 3, 0)
144  Bitfield<3> n;
145  Bitfield<2> z;
146  Bitfield<1> v;
147  Bitfield<0> c;
149 EndBitUnion(CCR)
150 
151 struct STS
152 {
153  const static int st_idle = 0x00;
154  const static int st_wait = 0x01;
155  const static int st_halt = 0x02;
156  const static int st_run = 0x05;
157  const static int st_spec_run = 0x07;
158  const static int st_spec_rdy = 0x13;
159  const static int st_ready = 0x19;
160  const static int active = 0x01;
161  const static int speculative = 0x04;
162  const static int shft_id = 8;
163  const static int shft_fsm0 = 31;
164  const static int shft_fsm1 = 26;
165  const static int shft_fsm2 = 21;
166  const static int shft_fsm3 = 16;
167 };
168 
169 
171 
172 }
173 
174 #endif
BitUnion16
#define BitUnion16(name)
Definition: bitunion.hh:401
SparcISA::MISCREG_PSTATE
@ MISCREG_PSTATE
Definition: miscregs.hh:62
SparcISA::MISCREG_TSTATE
@ MISCREG_TSTATE
Definition: miscregs.hh:58
SparcISA::MISCREG_PIC
@ MISCREG_PIC
Definition: miscregs.hh:46
SparcISA::MISCREG_QUEUE_CPU_MONDO_TAIL
@ MISCREG_QUEUE_CPU_MONDO_TAIL
Definition: miscregs.hh:103
SparcISA::n
Bitfield< 7 > n
Definition: miscregs.hh:137
SparcISA::MISCREG_TICK_CMPR
@ MISCREG_TICK_CMPR
Definition: miscregs.hh:51
SparcISA::cle
Bitfield< 9 > cle
Definition: miscregs.hh:131
SparcISA::MISCREG_PIL
@ MISCREG_PIL
Definition: miscregs.hh:64
MipsISA::ie
Bitfield< 0 > ie
Definition: pra_constants.hh:139
SparcISA::MISCREG_SCRATCHPAD_R3
@ MISCREG_SCRATCHPAD_R3
Definition: miscregs.hh:95
SparcISA::MISCREG_HINTP
@ MISCREG_HINTP
Definition: miscregs.hh:76
SparcISA::MISCREG_SCRATCHPAD_R5
@ MISCREG_SCRATCHPAD_R5
Definition: miscregs.hh:97
SparcISA::MISCREG_HTSTATE
@ MISCREG_HTSTATE
Definition: miscregs.hh:75
SparcISA::MISCREG_SCRATCHPAD_R1
@ MISCREG_SCRATCHPAD_R1
Definition: miscregs.hh:93
SparcISA::MISCREG_TLB_DATA
@ MISCREG_TLB_DATA
Definition: miscregs.hh:112
SparcISA::tle
Bitfield< 8 > tle
Definition: miscregs.hh:130
SparcISA::MiscRegIndex
MiscRegIndex
Definition: miscregs.hh:37
SparcISA::MISCREG_SOFTINT
@ MISCREG_SOFTINT
Definition: miscregs.hh:50
SparcISA::MISCREG_FSR
@ MISCREG_FSR
Floating Point Status Register.
Definition: miscregs.hh:83
SparcISA::MISCREG_PCR
@ MISCREG_PCR
Definition: miscregs.hh:45
SparcISA::MISCREG_QUEUE_DEV_MONDO_HEAD
@ MISCREG_QUEUE_DEV_MONDO_HEAD
Definition: miscregs.hh:104
SparcISA::MISCREG_TPC
@ MISCREG_TPC
Privilged Registers.
Definition: miscregs.hh:56
SparcISA::MISCREG_GSR
@ MISCREG_GSR
Definition: miscregs.hh:47
SparcISA::MISCREG_SCRATCHPAD_R6
@ MISCREG_SCRATCHPAD_R6
Definition: miscregs.hh:98
SparcISA::MISCREG_QUEUE_DEV_MONDO_TAIL
@ MISCREG_QUEUE_DEV_MONDO_TAIL
Definition: miscregs.hh:105
SparcISA::BitUnion64
BitUnion64(HPSTATE) Bitfield< 0 > tlz
SparcISA::MISCREG_PRIVTICK
@ MISCREG_PRIVTICK
Definition: miscregs.hh:60
SparcISA::MISCREG_SOFTINT_CLR
@ MISCREG_SOFTINT_CLR
Definition: miscregs.hh:49
SparcISA
Definition: asi.cc:31
SparcISA::MISCREG_GL
@ MISCREG_GL
Definition: miscregs.hh:71
SparcISA::priv
Bitfield< 2 > priv
Definition: miscregs.hh:126
SparcISA::MISCREG_TT
@ MISCREG_TT
Definition: miscregs.hh:59
SparcISA::MISCREG_TICK
@ MISCREG_TICK
Definition: miscregs.hh:43
SparcISA::mm
Bitfield< 7, 6 > mm
Definition: miscregs.hh:129
SparcISA::MISCREG_QUEUE_NRES_ERROR_TAIL
@ MISCREG_QUEUE_NRES_ERROR_TAIL
Definition: miscregs.hh:109
SparcISA::MISCREG_TL
@ MISCREG_TL
Definition: miscregs.hh:63
SparcISA::pef
Bitfield< 4 > pef
Definition: miscregs.hh:128
SparcISA::am
Bitfield< 3 > am
Definition: miscregs.hh:127
SubBitUnion
#define SubBitUnion(name, first, last)
Regular bitfields These define macros for read/write regular bitfield based subbitfields.
Definition: bitunion.hh:375
SparcISA::MISCREG_SOFTINT_SET
@ MISCREG_SOFTINT_SET
Definition: miscregs.hh:48
SparcISA::pid0
Bitfield< 10 > pid0
Definition: miscregs.hh:132
bitunion.hh
BitUnion8
#define BitUnion8(name)
Definition: bitunion.hh:402
SparcISA::NumMiscRegs
const int NumMiscRegs
Definition: miscregs.hh:170
SparcISA::EndBitUnion
EndBitUnion(HPSTATE) BitUnion16(PSTATE) Bitfield< 1 > ie
SparcISA::MISCREG_QUEUE_CPU_MONDO_HEAD
@ MISCREG_QUEUE_CPU_MONDO_HEAD
Definition: miscregs.hh:102
SparcISA::pid1
Bitfield< 11 > pid1
Definition: miscregs.hh:133
SparcISA::MISCREG_QUEUE_RES_ERROR_HEAD
@ MISCREG_QUEUE_RES_ERROR_HEAD
Definition: miscregs.hh:106
SparcISA::MISCREG_MMU_LSU_CTRL
@ MISCREG_MMU_LSU_CTRL
Definition: miscregs.hh:89
SparcISA::MISCREG_STRAND_STS_REG
@ MISCREG_STRAND_STS_REG
Definition: miscregs.hh:79
SparcISA::z
Bitfield< 6 > z
Definition: miscregs.hh:139
SparcISA::MISCREG_STICK_CMPR
@ MISCREG_STICK_CMPR
Definition: miscregs.hh:53
SparcISA::MISCREG_HSTICK_CMPR
@ MISCREG_HSTICK_CMPR
Definition: miscregs.hh:80
SparcISA::EndSubBitUnion
EndSubBitUnion(xcc) SubBitUnion(icc
SparcISA::MISCREG_MMU_PART_ID
@ MISCREG_MMU_PART_ID
Definition: miscregs.hh:88
SparcISA::ibe
Bitfield< 10 > ibe
Definition: miscregs.hh:120
SparcISA::MISCREG_SCRATCHPAD_R0
@ MISCREG_SCRATCHPAD_R0
Scratchpad regiscers.
Definition: miscregs.hh:92
SparcISA::c
Bitfield< 4 > c
Definition: miscregs.hh:141
SparcISA::MISCREG_HPSTATE
@ MISCREG_HPSTATE
Hyper privileged registers.
Definition: miscregs.hh:74
SparcISA::MISCREG_STICK
@ MISCREG_STICK
Definition: miscregs.hh:52
SparcISA::MISCREG_ASI
@ MISCREG_ASI
Ancillary State Registers.
Definition: miscregs.hh:42
SparcISA::id
Bitfield< 11 > id
Definition: miscregs.hh:121
SparcISA::red
Bitfield< 5 > red
Definition: miscregs.hh:119
types.hh
SparcISA::MISCREG_SCRATCHPAD_R7
@ MISCREG_SCRATCHPAD_R7
Definition: miscregs.hh:99
SparcISA::MISCREG_QUEUE_NRES_ERROR_HEAD
@ MISCREG_QUEUE_NRES_ERROR_HEAD
Definition: miscregs.hh:108
SparcISA::MISCREG_HTBA
@ MISCREG_HTBA
Definition: miscregs.hh:77
SparcISA::hpriv
Bitfield< 2 > hpriv
Definition: miscregs.hh:118
SparcISA::MISCREG_QUEUE_RES_ERROR_TAIL
@ MISCREG_QUEUE_RES_ERROR_TAIL
Definition: miscregs.hh:107
SparcISA::v
Bitfield< 5 > v
Definition: miscregs.hh:140
SparcISA::MISCREG_NUMMISCREGS
@ MISCREG_NUMMISCREGS
Definition: miscregs.hh:113
SparcISA::MISCREG_SCRATCHPAD_R4
@ MISCREG_SCRATCHPAD_R4
Definition: miscregs.hh:96
SparcISA::MISCREG_MMU_P_CONTEXT
@ MISCREG_MMU_P_CONTEXT
MMU Internal Registers.
Definition: miscregs.hh:86
SparcISA::MISCREG_TNPC
@ MISCREG_TNPC
Definition: miscregs.hh:57
SparcISA::MISCREG_SCRATCHPAD_R2
@ MISCREG_SCRATCHPAD_R2
Definition: miscregs.hh:94
SparcISA::MISCREG_HVER
@ MISCREG_HVER
Definition: miscregs.hh:78
SparcISA::MISCREG_MMU_S_CONTEXT
@ MISCREG_MMU_S_CONTEXT
Definition: miscregs.hh:87
SparcISA::MISCREG_FPRS
@ MISCREG_FPRS
Definition: miscregs.hh:44
SparcISA::MISCREG_CWP
@ MISCREG_CWP
Definition: miscregs.hh:65
SparcISA::MISCREG_TBA
@ MISCREG_TBA
Definition: miscregs.hh:61

Generated on Wed Sep 30 2020 14:02:00 for gem5 by doxygen 1.8.17