gem5  v22.1.0.0
misc.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_REGS_MISC_HH__
30 #define __ARCH_SPARC_REGS_MISC_HH__
31 
32 #include "base/bitunion.hh"
33 #include "base/types.hh"
34 #include "cpu/reg_class.hh"
35 #include "debug/MiscRegs.hh"
36 
37 namespace gem5
38 {
39 
40 namespace SparcISA
41 {
43 {
45 // MISCREG_Y,
46 // MISCREG_CCR,
55  MISCREG_SOFTINT, /* 10 */
59 
67  MISCREG_PSTATE, /* 20 */
71 // MISCREG_CANSAVE,
72 // MISCREG_CANRESTORE,
73 // MISCREG_CLEANWIN,
74 // MISCREG_OTHERWIN,
75 // MISCREG_WSTATE,
77 
79  MISCREG_HPSTATE, /* 30 */
86 
89 
95 
105 
106  /* CPU Queue Registers */
115 
116  /* All the data for the TLB packed up in one register. */
119 };
120 
121 BitUnion64(HPSTATE)
122  Bitfield<0> tlz;
123  Bitfield<2> hpriv;
124  Bitfield<5> red;
125  Bitfield<10> ibe;
126  Bitfield<11> id; // this impl. dependent (id) field m
127 EndBitUnion(HPSTATE)
128 
129 BitUnion16(PSTATE)
130  Bitfield<1> ie;
131  Bitfield<2> priv;
132  Bitfield<3> am;
133  Bitfield<4> pef;
134  Bitfield<7, 6> mm;
135  Bitfield<8> tle;
136  Bitfield<9> cle;
137  Bitfield<10> pid0;
138  Bitfield<11> pid1;
139 EndBitUnion(PSTATE)
140 
141 BitUnion8(CCR)
142  SubBitUnion(xcc, 7, 4)
143  Bitfield<7> n;
144  Bitfield<6> z;
145  Bitfield<5> v;
146  Bitfield<4> c;
148  SubBitUnion(icc, 3, 0)
149  Bitfield<3> n;
150  Bitfield<2> z;
151  Bitfield<1> v;
152  Bitfield<0> c;
154 EndBitUnion(CCR)
155 
156 struct STS
157 {
158  const static int st_idle = 0x00;
159  const static int st_wait = 0x01;
160  const static int st_halt = 0x02;
161  const static int st_run = 0x05;
162  const static int st_spec_run = 0x07;
163  const static int st_spec_rdy = 0x13;
164  const static int st_ready = 0x19;
165  const static int active = 0x01;
166  const static int speculative = 0x04;
167  const static int shft_id = 8;
168  const static int shft_fsm0 = 31;
169  const static int shft_fsm1 = 26;
170  const static int shft_fsm2 = 21;
171  const static int shft_fsm3 = 16;
172 };
173 
174 
176 
178  NumMiscRegs, debug::MiscRegs);
179 
180 } // namespace SparcISA
181 } // namespace gem5
182 
183 #endif
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
#define BitUnion8(name)
Definition: bitunion.hh:497
#define SubBitUnion(name, first, last)
Regular bitfields These define macros for read/write regular bitfield based subbitfields.
Definition: bitunion.hh:470
Bitfield< 0 > ie
Bitfield< 6 > z
Definition: misc.hh:144
@ MISCREG_MMU_PART_ID
Definition: misc.hh:93
@ MISCREG_SOFTINT_CLR
Definition: misc.hh:54
@ MISCREG_HTBA
Definition: misc.hh:82
@ MISCREG_CWP
Definition: misc.hh:70
@ MISCREG_SCRATCHPAD_R1
Definition: misc.hh:98
@ MISCREG_QUEUE_RES_ERROR_HEAD
Definition: misc.hh:111
@ MISCREG_SCRATCHPAD_R5
Definition: misc.hh:102
@ MISCREG_HPSTATE
Hyper privileged registers.
Definition: misc.hh:79
@ MISCREG_SCRATCHPAD_R3
Definition: misc.hh:100
@ MISCREG_SCRATCHPAD_R0
Scratchpad regiscers.
Definition: misc.hh:97
@ MISCREG_PIC
Definition: misc.hh:51
@ MISCREG_PSTATE
Definition: misc.hh:67
@ MISCREG_MMU_P_CONTEXT
MMU Internal Registers.
Definition: misc.hh:91
@ MISCREG_FPRS
Definition: misc.hh:49
@ MISCREG_QUEUE_DEV_MONDO_TAIL
Definition: misc.hh:110
@ MISCREG_PCR
Definition: misc.hh:50
@ MISCREG_TT
Definition: misc.hh:64
@ MISCREG_TICK
Definition: misc.hh:48
@ MISCREG_QUEUE_CPU_MONDO_HEAD
Definition: misc.hh:107
@ MISCREG_STICK_CMPR
Definition: misc.hh:58
@ MISCREG_TLB_DATA
Definition: misc.hh:117
@ MISCREG_QUEUE_NRES_ERROR_TAIL
Definition: misc.hh:114
@ MISCREG_TICK_CMPR
Definition: misc.hh:56
@ MISCREG_PIL
Definition: misc.hh:69
@ MISCREG_HTSTATE
Definition: misc.hh:80
@ MISCREG_TSTATE
Definition: misc.hh:63
@ MISCREG_MMU_LSU_CTRL
Definition: misc.hh:94
@ MISCREG_ASI
Ancillary State Registers.
Definition: misc.hh:47
@ MISCREG_HINTP
Definition: misc.hh:81
@ MISCREG_SCRATCHPAD_R6
Definition: misc.hh:103
@ MISCREG_SCRATCHPAD_R4
Definition: misc.hh:101
@ MISCREG_TL
Definition: misc.hh:68
@ MISCREG_HSTICK_CMPR
Definition: misc.hh:85
@ MISCREG_PRIVTICK
Definition: misc.hh:65
@ MISCREG_QUEUE_CPU_MONDO_TAIL
Definition: misc.hh:108
@ MISCREG_SOFTINT_SET
Definition: misc.hh:53
@ MISCREG_GL
Definition: misc.hh:76
@ MISCREG_TNPC
Definition: misc.hh:62
@ MISCREG_QUEUE_DEV_MONDO_HEAD
Definition: misc.hh:109
@ MISCREG_STRAND_STS_REG
Definition: misc.hh:84
@ MISCREG_NUMMISCREGS
Definition: misc.hh:118
@ MISCREG_TBA
Definition: misc.hh:66
@ MISCREG_FSR
Floating Point Status Register.
Definition: misc.hh:88
@ MISCREG_SOFTINT
Definition: misc.hh:55
@ MISCREG_SCRATCHPAD_R2
Definition: misc.hh:99
@ MISCREG_GSR
Definition: misc.hh:52
@ MISCREG_HVER
Definition: misc.hh:83
@ MISCREG_STICK
Definition: misc.hh:57
@ MISCREG_TPC
Privilged Registers.
Definition: misc.hh:61
@ MISCREG_QUEUE_RES_ERROR_TAIL
Definition: misc.hh:112
@ MISCREG_MMU_S_CONTEXT
Definition: misc.hh:92
@ MISCREG_SCRATCHPAD_R7
Definition: misc.hh:104
@ MISCREG_QUEUE_NRES_ERROR_HEAD
Definition: misc.hh:113
Bitfield< 11 > id
Definition: misc.hh:126
Bitfield< 8 > tle
Definition: misc.hh:135
Bitfield< 4 > c
Definition: misc.hh:146
Bitfield< 7, 6 > mm
Definition: misc.hh:134
Bitfield< 5 > red
Definition: misc.hh:124
Bitfield< 2 > hpriv
Definition: misc.hh:123
Bitfield< 11 > pid1
Definition: misc.hh:138
Bitfield< 7 > n
Definition: misc.hh:142
Bitfield< 4 > pef
Definition: misc.hh:133
Bitfield< 2 > priv
Definition: misc.hh:131
EndSubBitUnion(xcc) SubBitUnion(icc
Bitfield< 5 > v
Definition: misc.hh:145
Bitfield< 9 > cle
Definition: misc.hh:136
Bitfield< 10 > pid0
Definition: misc.hh:137
Bitfield< 3 > am
Definition: misc.hh:132
Bitfield< 10 > ibe
Definition: misc.hh:125
BitUnion64(HPSTATE) Bitfield< 0 > tlz
EndBitUnion(HPSTATE) BitUnion16(PSTATE) Bitfield< 1 > ie
constexpr RegClass miscRegClass(MiscRegClass, MiscRegClassName, NumMiscRegs, debug::MiscRegs)
const int NumMiscRegs
Definition: misc.hh:175
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
constexpr char MiscRegClassName[]
Definition: reg_class.hh:79
@ MiscRegClass
Control (misc) register.
Definition: reg_class.hh:68
BitUnion16(PciCommandRegister) Bitfield< 15

Generated on Wed Dec 21 2022 10:22:26 for gem5 by doxygen 1.9.1