gem5 v24.0.0.0
Loading...
Searching...
No Matches
asi.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2006 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#include "arch/sparc/asi.hh"
30
31namespace gem5
32{
33
34namespace SparcISA
35{
36
37bool
39{
40 return asi == ASI_BLK_AIUP ||
41 asi == ASI_BLK_AIUS ||
42 asi == ASI_BLK_AIUP_L ||
43 asi == ASI_BLK_AIUS_L ||
44 asi == ASI_BLK_P ||
45 asi == ASI_BLK_S ||
46 asi == ASI_BLK_PL ||
47 asi == ASI_BLK_SL;
48}
49
50bool
52{
53 return asi == ASI_AIUP ||
54 asi == ASI_BLK_AIUP ||
55 asi == ASI_AIUP_L ||
56 asi == ASI_BLK_AIUP_L ||
57 asi == ASI_LDTX_AIUP ||
58 asi == ASI_LDTX_AIUP_L ||
59 asi == ASI_P ||
60 asi == ASI_PNF ||
61 asi == ASI_PL ||
62 asi == ASI_PNFL ||
63 asi == ASI_PST8_P ||
64 asi == ASI_PST16_P ||
65 asi == ASI_PST32_P ||
66 asi == ASI_PST8_PL ||
67 asi == ASI_PST16_PL ||
68 asi == ASI_PST32_PL ||
69 asi == ASI_FL8_P ||
70 asi == ASI_FL16_P ||
71 asi == ASI_FL8_PL ||
72 asi == ASI_FL16_PL ||
73 asi == ASI_LDTX_P ||
74 asi == ASI_LDTX_PL ||
75 asi == ASI_BLK_P ||
76 asi == ASI_BLK_PL;
77}
78
79bool
81{
82 return asi == ASI_AIUS ||
83 asi == ASI_BLK_AIUS ||
84 asi == ASI_AIUS_L ||
85 asi == ASI_BLK_AIUS_L ||
86 asi == ASI_LDTX_AIUS ||
87 asi == ASI_LDTX_AIUS_L ||
88 asi == ASI_S ||
89 asi == ASI_SNF ||
90 asi == ASI_SL ||
91 asi == ASI_SNFL ||
92 asi == ASI_PST8_S ||
93 asi == ASI_PST16_S ||
94 asi == ASI_PST32_S ||
95 asi == ASI_PST8_SL ||
96 asi == ASI_PST16_SL ||
97 asi == ASI_PST32_SL ||
98 asi == ASI_FL8_S ||
99 asi == ASI_FL16_S ||
100 asi == ASI_FL8_SL ||
101 asi == ASI_FL16_SL ||
102 asi == ASI_LDTX_S ||
103 asi == ASI_LDTX_SL ||
104 asi == ASI_BLK_S ||
105 asi == ASI_BLK_SL;
106}
107
108bool
110{
111 return asi == ASI_N ||
112 asi == ASI_NL ||
113 asi == ASI_LDTX_N ||
114 asi == ASI_LDTX_NL;
115}
116
117bool
119{
120 return asi == ASI_AIUP ||
121 asi == ASI_AIUS ||
122 asi == ASI_BLK_AIUP ||
123 asi == ASI_BLK_AIUS ||
124 asi == ASI_AIUP_L ||
125 asi == ASI_AIUS_L ||
126 asi == ASI_BLK_AIUP_L ||
127 asi == ASI_BLK_AIUS_L ||
128 asi == ASI_LDTX_AIUP ||
129 asi == ASI_LDTX_AIUS ||
130 asi == ASI_LDTX_AIUP_L ||
131 asi == ASI_LDTX_AIUS_L;
132}
133
134bool
136{
137 return asi == ASI_REAL_IO ||
138 asi == ASI_REAL_IO_L;
139}
140
141bool
143{
144 return asi == ASI_REAL ||
145 asi == ASI_REAL_IO ||
146 asi == ASI_REAL_L ||
147 asi == ASI_REAL_IO_L ||
148 asi == ASI_LDTX_REAL ||
149 asi == ASI_LDTX_REAL_L;
150}
151
152bool
154{
155 return asi == ASI_NL ||
156 asi == ASI_AIUP_L ||
157 asi == ASI_AIUS_L ||
158 asi == ASI_REAL_L ||
159 asi == ASI_REAL_IO_L ||
160 asi == ASI_BLK_AIUP_L ||
161 asi == ASI_BLK_AIUS_L ||
162 asi == ASI_LDTX_AIUP_L ||
163 asi == ASI_LDTX_AIUS_L ||
164 asi == ASI_LDTX_REAL_L ||
165 asi == ASI_LDTX_NL ||
166 asi == ASI_PL ||
167 asi == ASI_SL ||
168 asi == ASI_PNFL ||
169 asi == ASI_SNFL ||
170 asi == ASI_PST8_PL ||
171 asi == ASI_PST8_SL ||
172 asi == ASI_PST16_PL ||
173 asi == ASI_PST16_SL ||
174 asi == ASI_PST32_PL ||
175 asi == ASI_PST32_SL ||
176 asi == ASI_FL8_PL ||
177 asi == ASI_FL8_SL ||
178 asi == ASI_FL16_PL ||
179 asi == ASI_FL16_SL ||
180 asi == ASI_LDTX_PL ||
181 asi == ASI_LDTX_SL ||
182 asi == ASI_BLK_PL ||
183 asi == ASI_BLK_SL ||
184 asi == ASI_LTX_L;
185}
186
187bool
189{
190 return (asi >= ASI_LDTX_AIUP &&
191 asi <= ASI_LDTX_N &&
192 asi != ASI_QUEUE) ||
193 (asi >= ASI_LDTX_AIUP_L &&
194 asi <= ASI_LDTX_NL &&
195 asi != 0x2D) ||
196 asi == ASI_LDTX_P ||
197 asi == ASI_LDTX_S ||
198 asi == ASI_LDTX_PL ||
199 asi == ASI_LDTX_SL;
200}
201
202bool
204{
205 return asi == ASI_PST8_P ||
206 asi == ASI_PST8_S ||
207 asi == ASI_PST16_P ||
208 asi == ASI_PST16_S ||
209 asi == ASI_PST32_P ||
210 asi == ASI_PST32_S ||
211 asi == ASI_PST8_PL ||
212 asi == ASI_PST8_SL ||
213 asi == ASI_PST16_PL ||
214 asi == ASI_PST16_SL ||
215 asi == ASI_PST32_PL ||
216 asi == ASI_PST32_SL;
217}
218
219bool
221{
222 return asi == ASI_FL8_P ||
223 asi == ASI_FL8_S ||
224 asi == ASI_FL16_P ||
225 asi == ASI_FL16_S ||
226 asi == ASI_FL8_PL ||
227 asi == ASI_FL8_SL ||
228 asi == ASI_FL16_PL ||
229 asi == ASI_FL16_SL;
230}
231
232bool
234{
235 return asi == ASI_PNF ||
236 asi == ASI_SNF ||
237 asi == ASI_PNFL ||
238 asi == ASI_SNFL;
239}
240
241bool
243{
244 return asi == ASI_SCRATCHPAD ||
245 asi == ASI_HYP_SCRATCHPAD;
246}
247
248bool
250{
251 return asi == ASI_CMT_PER_STRAND ||
252 asi == ASI_CMT_SHARED;
253}
254
255bool
257{
258 return asi == ASI_QUEUE;
259}
260
261bool
263{
264 return asi == ASI_SWVR_INTR_RECEIVE ||
265 asi == ASI_SWVR_UDB_INTR_W ||
266 asi == ASI_SWVR_UDB_INTR_R ;
267}
268
269bool
271{
272 return asi == ASI_MMU ||
273 asi == ASI_LSU_CONTROL_REG ||
278 (asi >= ASI_IMMU &&
279 asi <= ASI_IMMU_TSB_PS1_PTR_REG) ||
280 (asi >= ASI_ITLB_DATA_IN_REG &&
282}
283
284bool
286{
287 return asi >= 0x80;
288}
289
290bool
292{
293 return asi <= 0x2f;
294}
295
296
297bool
299{
300 return asi >= 0x30 && asi <= 0x7f;
301}
302
303bool
305{
306 return asiIsMmu(asi) || asiIsScratchPad(asi) ||
308 || asiIsCmt(asi);
309}
310
311bool
313{
314 return asi == ASI_SPARC_ERROR_EN_REG ||
316}
317
318} // namespace SparcISA
319} // namespace gem5
bool asiIsTwin(ASI asi)
Definition asi.cc:188
bool asiIsPriv(ASI asi)
Definition asi.cc:291
bool asiIsNucleus(ASI asi)
Definition asi.cc:109
bool asiIsReal(ASI asi)
Definition asi.cc:142
bool asiIsAsIfUser(ASI asi)
Definition asi.cc:118
bool asiIsCmt(ASI asi)
Definition asi.cc:249
bool asiIsIO(ASI asi)
Definition asi.cc:135
bool asiIsUnPriv(ASI asi)
Definition asi.cc:285
bool asiIsPrimary(ASI asi)
Definition asi.cc:51
bool asiIsPartialStore(ASI asi)
Definition asi.cc:203
bool asiIsLittle(ASI asi)
Definition asi.cc:153
bool asiIsInterrupt(ASI asi)
Definition asi.cc:262
@ ASI_IMMU_CTXT_ZERO_CONFIG
Definition asi.hh:110
@ ASI_SWVR_UDB_INTR_W
Definition asi.hh:162
@ ASI_LDTX_REAL
Definition asi.hh:82
@ ASI_LDTX_AIUS_L
Definition asi.hh:92
@ ASI_LDTX_AIUP
Definition asi.hh:75
@ ASI_IMMU_CTXT_NONZERO_CONFIG
Definition asi.hh:118
@ ASI_ITLB_DATA_IN_REG
Definition asi.hh:142
@ ASI_SPARC_ERROR_EN_REG
Definition asi.hh:133
@ ASI_HYP_SCRATCHPAD
Definition asi.hh:137
@ ASI_SPARC_ERROR_STATUS_REG
Definition asi.hh:134
@ ASI_BLK_AIUP
Definition asi.hh:56
@ ASI_DMMU_CTXT_NONZERO_TSB_BASE_PS0
Definition asi.hh:112
@ ASI_LSU_CONTROL_REG
Definition asi.hh:127
@ ASI_DMMU_CTXT_ZERO_TSB_BASE_PS0
Definition asi.hh:104
@ ASI_LDTX_REAL_L
Definition asi.hh:99
@ ASI_SCRATCHPAD
Definition asi.hh:73
@ ASI_IMMU_TSB_PS1_PTR_REG
Definition asi.hh:140
@ ASI_CMT_PER_STRAND
Definition asi.hh:156
@ ASI_REAL_IO_L
Definition asi.hh:67
@ ASI_LDTX_AIUP_L
Definition asi.hh:88
@ ASI_SWVR_INTR_RECEIVE
Definition asi.hh:161
@ ASI_CMT_SHARED
Definition asi.hh:120
@ ASI_LDTX_AIUS
Definition asi.hh:77
@ ASI_BLK_AIUP_L
Definition asi.hh:69
@ ASI_SWVR_UDB_INTR_R
Definition asi.hh:163
@ ASI_TLB_INVALIDATE_ALL
Definition asi.hh:154
@ ASI_REAL_IO
Definition asi.hh:55
@ ASI_BLK_AIUS
Definition asi.hh:58
@ ASI_BLK_AIUS_L
Definition asi.hh:71
bool asiIsNoFault(ASI asi)
Definition asi.cc:233
bool asiIsQueue(ASI asi)
Definition asi.cc:256
bool asiIsFloatingLoad(ASI asi)
Definition asi.cc:220
bool asiIsScratchPad(ASI asi)
Definition asi.cc:242
bool asiIsSparcError(ASI asi)
Definition asi.cc:312
bool asiIsReg(ASI asi)
Definition asi.cc:304
bool asiIsHPriv(ASI asi)
Definition asi.cc:298
bool asiIsMmu(ASI asi)
Definition asi.cc:270
bool asiIsBlock(ASI asi)
Definition asi.cc:38
bool asiIsSecondary(ASI asi)
Definition asi.cc:80
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36

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