gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
37namespace gem5
38{
39
40namespace SparcISA
41{
43{
45// MISCREG_Y,
46// MISCREG_CCR,
59
71// MISCREG_CANSAVE,
72// MISCREG_CANRESTORE,
73// MISCREG_CLEANWIN,
74// MISCREG_OTHERWIN,
75// MISCREG_WSTATE,
77
86
89
95
105
106 /* CPU Queue Registers */
115
116 /* All the data for the TLB packed up in one register. */
120
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
128
129BitUnion16(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;
140
141BitUnion8(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;
154EndBitUnion(CCR)
155
156struct 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 BitUnion16(name)
Definition bitunion.hh:496
#define BitUnion64(name)
Use this to define conveniently sized values overlayed with bitfields.
Definition bitunion.hh:494
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Definition bitunion.hh:428
#define SubBitUnion(name, first, last)
Regular bitfields These define macros for read/write regular bitfield based subbitfields.
Definition bitunion.hh:470
#define EndSubBitUnion(name)
This closes off the union created above and gives it a name.
Definition bitunion.hh:455
constexpr RegClass miscRegClass
Definition misc.hh:2937
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_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_PSTATE
Definition misc.hh:67
@ MISCREG_MMU_P_CONTEXT
MMU Internal Registers.
Definition misc.hh:91
@ MISCREG_QUEUE_DEV_MONDO_TAIL
Definition misc.hh:110
@ 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_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_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_QUEUE_DEV_MONDO_HEAD
Definition misc.hh:109
@ MISCREG_STRAND_STS_REG
Definition misc.hh:84
@ MISCREG_NUMMISCREGS
Definition misc.hh:118
@ MISCREG_FSR
Floating Point Status Register.
Definition misc.hh:88
@ MISCREG_SOFTINT
Definition misc.hh:55
@ MISCREG_SCRATCHPAD_R2
Definition misc.hh:99
@ 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
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
const int NumMiscRegs
Definition misc.hh:175
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
constexpr char MiscRegClassName[]
Definition reg_class.hh:82
@ MiscRegClass
Control (misc) register.
Definition reg_class.hh:70

Generated on Tue Jun 18 2024 16:24:04 for gem5 by doxygen 1.11.0