gem5 v24.0.0.0
Loading...
Searching...
No Matches
packet.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2019, 2021 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2006 The Regents of The University of Michigan
15 * Copyright (c) 2010,2015 Advanced Micro Devices, Inc.
16 * All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions are
20 * met: redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer;
22 * redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution;
25 * neither the name of the copyright holders nor the names of its
26 * contributors may be used to endorse or promote products derived from
27 * this software without specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 */
41
48#include "mem/packet.hh"
49
50#include <algorithm>
51#include <cstring>
52#include <iostream>
53#include <sstream>
54#include <string>
55
56#include "base/cprintf.hh"
57#include "base/logging.hh"
58#include "base/trace.hh"
59#include "mem/packet_access.hh"
60#include "sim/bufval.hh"
61
62namespace gem5
63{
64
65const MemCmd::CommandInfo
67{
68 /* InvalidCmd */
69 { {}, InvalidCmd, "InvalidCmd" },
70 /* ReadReq - Read issued by a non-caching agent such as a CPU or
71 * device, with no restrictions on alignment. */
72 { {IsRead, IsRequest, NeedsResponse}, ReadResp, "ReadReq" },
73 /* ReadResp */
74 { {IsRead, IsResponse, HasData}, InvalidCmd, "ReadResp" },
75 /* ReadRespWithInvalidate */
76 { {IsRead, IsResponse, HasData, IsInvalidate},
77 InvalidCmd, "ReadRespWithInvalidate" },
78 /* WriteReq */
79 { {IsWrite, NeedsWritable, IsRequest, NeedsResponse, HasData},
80 WriteResp, "WriteReq" },
81 /* WriteResp */
82 { {IsWrite, IsResponse}, InvalidCmd, "WriteResp" },
83 /* WriteCompleteResp - The WriteCompleteResp command is needed
84 * because in the GPU memory model we use a WriteResp to indicate
85 * that a write has reached the cache controller so we can free
86 * resources at the coalescer. Later, when the write succesfully
87 * completes we send a WriteCompleteResp to the CU so its wait
88 * counters can be updated. Wait counters in the CU is how memory
89 * dependences are handled in the GPU ISA. */
90 { {IsWrite, IsResponse}, InvalidCmd, "WriteCompleteResp" },
91 /* WritebackDirty */
92 { {IsWrite, IsRequest, IsEviction, HasData, FromCache},
93 InvalidCmd, "WritebackDirty" },
94 /* WritebackClean - This allows the upstream cache to writeback a
95 * line to the downstream cache without it being considered
96 * dirty. */
97 { {IsWrite, IsRequest, IsEviction, HasData, FromCache},
98 InvalidCmd, "WritebackClean" },
99 /* WriteClean - This allows a cache to write a dirty block to a memory
100 below without evicting its copy. */
101 { {IsWrite, IsRequest, HasData, FromCache}, InvalidCmd, "WriteClean" },
102 /* CleanEvict */
103 { {IsRequest, IsEviction, FromCache}, InvalidCmd, "CleanEvict" },
104 /* SoftPFReq */
105 { {IsRead, IsRequest, IsSWPrefetch, NeedsResponse},
106 SoftPFResp, "SoftPFReq" },
107 /* SoftPFExReq */
108 { {IsRead, NeedsWritable, IsInvalidate, IsRequest,
109 IsSWPrefetch, NeedsResponse}, SoftPFResp, "SoftPFExReq" },
110 /* HardPFReq */
111 { {IsRead, IsRequest, IsHWPrefetch, NeedsResponse, FromCache},
112 HardPFResp, "HardPFReq" },
113 /* SoftPFResp */
114 { {IsRead, IsResponse, IsSWPrefetch, HasData}, InvalidCmd, "SoftPFResp" },
115 /* HardPFResp */
116 { {IsRead, IsResponse, IsHWPrefetch, HasData}, InvalidCmd, "HardPFResp" },
117 /* WriteLineReq */
118 { {IsWrite, NeedsWritable, IsRequest, NeedsResponse, HasData},
119 WriteResp, "WriteLineReq" },
120 /* UpgradeReq */
121 { {IsInvalidate, NeedsWritable, IsUpgrade, IsRequest, NeedsResponse,
122 FromCache}, UpgradeResp, "UpgradeReq" },
123 /* SCUpgradeReq: response could be UpgradeResp or UpgradeFailResp */
124 { {IsInvalidate, NeedsWritable, IsUpgrade, IsLlsc,
125 IsRequest, NeedsResponse, FromCache},
126 UpgradeResp, "SCUpgradeReq" },
127 /* UpgradeResp */
128 { {IsUpgrade, IsResponse}, InvalidCmd, "UpgradeResp" },
129 /* SCUpgradeFailReq: generates UpgradeFailResp but still gets the data */
130 { {IsRead, NeedsWritable, IsInvalidate,
131 IsLlsc, IsRequest, NeedsResponse, FromCache},
132 UpgradeFailResp, "SCUpgradeFailReq" },
133 /* UpgradeFailResp - Behaves like a ReadExReq, but notifies an SC
134 * that it has failed, acquires line as Dirty*/
135 { {IsRead, IsResponse, HasData}, InvalidCmd, "UpgradeFailResp" },
136 /* ReadExReq - Read issues by a cache, always cache-line aligned,
137 * and the response is guaranteed to be writeable (exclusive or
138 * even modified} */
139 { {IsRead, NeedsWritable, IsInvalidate, IsRequest, NeedsResponse,
140 FromCache}, ReadExResp, "ReadExReq" },
141 /* ReadExResp - Response matching a read exclusive, as we check
142 * the need for exclusive also on responses */
143 { {IsRead, IsResponse, HasData}, InvalidCmd, "ReadExResp" },
144 /* ReadCleanReq - Read issued by a cache, always cache-line
145 * aligned, and the response is guaranteed to not contain dirty data
146 * (exclusive or shared}.*/
147 { {IsRead, IsRequest, NeedsResponse, FromCache},
148 ReadResp, "ReadCleanReq" },
149 /* ReadSharedReq - Read issued by a cache, always cache-line
150 * aligned, response is shared, possibly exclusive, owned or even
151 * modified. */
152 { {IsRead, IsRequest, NeedsResponse, FromCache},
153 ReadResp, "ReadSharedReq" },
154 /* LoadLockedReq: note that we use plain ReadResp as response, so that
155 * we can also use ReadRespWithInvalidate when needed */
156 { {IsRead, IsLlsc, IsRequest, NeedsResponse},
157 ReadResp, "LoadLockedReq" },
158 /* StoreCondReq */
159 { {IsWrite, NeedsWritable, IsLlsc,
160 IsRequest, NeedsResponse, HasData},
161 StoreCondResp, "StoreCondReq" },
162 /* StoreCondFailReq: generates failing StoreCondResp */
163 { {IsWrite, NeedsWritable, IsLlsc, IsRequest, NeedsResponse, HasData},
164 StoreCondResp, "StoreCondFailReq" },
165 /* StoreCondResp */
166 { {IsWrite, IsLlsc, IsResponse},
167 InvalidCmd, "StoreCondResp" },
168 /* LockedRMWReadReq */
169 { {IsRead, IsLockedRMW, NeedsWritable, IsRequest, NeedsResponse},
170 LockedRMWReadResp, "LockedRMWReadReq" },
171 /* LockedRMWReadResp */
172 { {IsRead, IsLockedRMW, NeedsWritable, IsResponse, HasData},
173 InvalidCmd, "LockedRMWReadResp" },
174 /* LockedRMWWriteReq */
175 { {IsWrite, IsLockedRMW, NeedsWritable, IsRequest, NeedsResponse,
176 HasData}, LockedRMWWriteResp, "LockedRMWWriteReq" },
177 /* LockedRMWWriteResp */
178 { {IsWrite, IsLockedRMW, NeedsWritable, IsResponse},
179 InvalidCmd, "LockedRMWWriteResp" },
180 /* SwapReq -- for Swap ldstub type operations */
181 { {IsRead, IsWrite, NeedsWritable, IsRequest, HasData, NeedsResponse},
182 SwapResp, "SwapReq" },
183 /* SwapResp -- for Swap ldstub type operations */
184 { {IsRead, IsWrite, IsResponse, HasData}, InvalidCmd, "SwapResp" },
185 { {}, InvalidCmd, "Deprecated_MessageReq" },
186 { {}, InvalidCmd, "Deprecated_MessageResp" },
187 /* MemFenceReq -- for synchronization requests */
188 {{IsRequest, NeedsResponse}, MemFenceResp, "MemFenceReq"},
189 /* MemSyncReq */
190 {{IsRequest, NeedsResponse}, MemSyncResp, "MemSyncReq"},
191 /* MemSyncResp */
192 {{IsResponse}, InvalidCmd, "MemSyncResp"},
193 /* MemFenceResp -- for synchronization responses */
194 {{IsResponse}, InvalidCmd, "MemFenceResp"},
195 /* Cache Clean Request -- Update with the latest data all existing
196 copies of the block down to the point indicated by the
197 request */
198 { {IsRequest, IsClean, NeedsResponse, FromCache},
199 CleanSharedResp, "CleanSharedReq" },
200 /* Cache Clean Response - Indicates that all caches up to the
201 specified point of reference have a up-to-date copy of the
202 cache block or no copy at all */
203 { {IsResponse, IsClean}, InvalidCmd, "CleanSharedResp" },
204 /* Cache Clean and Invalidate Request -- Invalidate all existing
205 copies down to the point indicated by the request */
206 { {IsRequest, IsInvalidate, IsClean, NeedsResponse, FromCache},
207 CleanInvalidResp, "CleanInvalidReq" },
208 /* Cache Clean and Invalidate Respose -- Indicates that no cache
209 above the specified point holds the block and that the block
210 was written to a memory below the specified point. */
211 { {IsResponse, IsInvalidate, IsClean},
212 InvalidCmd, "CleanInvalidResp" },
213 /* InvalidDestError -- packet dest field invalid */
214 { {IsResponse, IsError}, InvalidCmd, "InvalidDestError" },
215 /* BadAddressError -- memory address invalid */
216 { {IsResponse, IsError}, InvalidCmd, "BadAddressError" },
217 /* ReadError -- packet dest unable to fulfill read command */
218 { {IsRead, IsResponse, IsError}, InvalidCmd, "ReadError" },
219 /* WriteError -- packet dest unable to fulfill write command */
220 { {IsWrite, IsResponse, IsError}, InvalidCmd, "WriteError" },
221 /* FunctionalReadError */
222 { {IsRead, IsResponse, IsError}, InvalidCmd, "FunctionalReadError" },
223 /* FunctionalWriteError */
224 { {IsWrite, IsResponse, IsError}, InvalidCmd, "FunctionalWriteError" },
225 /* PrintReq */
226 { {IsRequest, IsPrint}, InvalidCmd, "PrintReq" },
227 /* Flush Request */
228 { {IsRequest, IsFlush, NeedsWritable}, InvalidCmd, "FlushReq" },
229 /* Invalidation Request */
230 { {IsInvalidate, IsRequest, NeedsWritable, NeedsResponse, FromCache},
231 InvalidateResp, "InvalidateReq" },
232 /* Invalidation Response */
233 { {IsInvalidate, IsResponse},
234 InvalidCmd, "InvalidateResp" },
235 // hardware transactional memory
236 { {IsRead, IsRequest, NeedsResponse}, HTMReqResp, "HTMReq" },
237 { {IsRead, IsResponse}, InvalidCmd, "HTMReqResp" },
238 { {IsRead, IsRequest}, InvalidCmd, "HTMAbort" },
239 { {IsRequest}, InvalidCmd, "TlbiExtSync" },
240};
241
242AddrRange
244{
245 return RangeSize(getAddr(), getSize());
246}
247
248bool
249Packet::trySatisfyFunctional(Printable *obj, Addr addr, bool is_secure, int size,
250 uint8_t *_data)
251{
252 const Addr func_start = getAddr();
253 const Addr func_end = getAddr() + getSize() - 1;
254 const Addr val_start = addr;
255 const Addr val_end = val_start + size - 1;
256
257 if (is_secure != _isSecure || func_start > val_end ||
258 val_start > func_end) {
259 // no intersection
260 return false;
261 }
262
263 // check print first since it doesn't require data
264 if (isPrint()) {
265 assert(!_data);
267 return false;
268 }
269
270 // we allow the caller to pass NULL to signify the other packet
271 // has no data
272 if (!_data) {
273 return false;
274 }
275
276 const Addr val_offset = func_start > val_start ?
277 func_start - val_start : 0;
278 const Addr func_offset = func_start < val_start ?
279 val_start - func_start : 0;
280 const Addr overlap_size = std::min(val_end, func_end)+1 -
281 std::max(val_start, func_start);
282
283 if (isRead()) {
284 std::memcpy(getPtr<uint8_t>() + func_offset,
285 _data + val_offset,
286 overlap_size);
287
288 // initialise the tracking of valid bytes if we have not
289 // used it already
290 if (bytesValid.empty())
291 bytesValid.resize(getSize(), false);
292
293 // track if we are done filling the functional access
294 bool all_bytes_valid = true;
295
296 int i = 0;
297
298 // check up to func_offset
299 for (; all_bytes_valid && i < func_offset; ++i)
300 all_bytes_valid &= bytesValid[i];
301
302 // update the valid bytes
303 for (i = func_offset; i < func_offset + overlap_size; ++i)
304 bytesValid[i] = true;
305
306 // check the bit after the update we just made
307 for (; all_bytes_valid && i < getSize(); ++i)
308 all_bytes_valid &= bytesValid[i];
309
310 return all_bytes_valid;
311 } else if (isWrite()) {
312 std::memcpy(_data + val_offset,
313 getConstPtr<uint8_t>() + func_offset,
314 overlap_size);
315 } else {
316 panic("Don't know how to handle command %s\n", cmdString());
317 }
318
319 // keep going with request by default
320 return false;
321}
322
323void
325{
326 assert(isRequest());
327 // If we have already found a responder, no other cache should
328 // commit to responding
329 assert(!pkt->cacheResponding() || !cacheResponding());
331}
332
333void
335{
336 assert(sender_state != NULL);
337 sender_state->predecessor = senderState;
338 senderState = sender_state;
339}
340
343{
344 assert(senderState != NULL);
345 SenderState *sender_state = senderState;
346 senderState = sender_state->predecessor;
347 sender_state->predecessor = NULL;
348 return sender_state;
349}
350
351uint64_t
352Packet::getUintX(ByteOrder endian) const
353{
354 auto [val, success] =
356 panic_if(!success, "%i isn't a supported word size.\n", getSize());
357 return val;
358}
359
360void
361Packet::setUintX(uint64_t w, ByteOrder endian)
362{
363 bool success = gem5::setUintX(w, getPtr<void>(), getSize(), endian);
364 panic_if(!success, "%i isn't a supported word size.\n", getSize());
365}
366
367void
368Packet::print(std::ostream &o, const int verbosity,
369 const std::string &prefix) const
370{
371 ccprintf(o, "%s%s [%x:%x]%s%s%s%s%s%s", prefix, cmdString(),
372 getAddr(), getAddr() + getSize() - 1,
373 req->isSecure() ? " (s)" : "",
374 req->isInstFetch() ? " IF" : "",
375 req->isUncacheable() ? " UC" : "",
376 isExpressSnoop() ? " ES" : "",
377 req->isToPOC() ? " PoC" : "",
378 req->isToPOU() ? " PoU" : "");
379}
380
381std::string
383 std::ostringstream str;
384 print(str);
385 return str.str();
386}
387
388bool
389Packet::matchBlockAddr(const Addr addr, const bool is_secure,
390 const int blk_size) const
391{
392 return (getBlockAddr(blk_size) == addr) && (isSecure() == is_secure);
393}
394
395bool
396Packet::matchBlockAddr(const PacketPtr pkt, const int blk_size) const
397{
398 return matchBlockAddr(pkt->getBlockAddr(blk_size), pkt->isSecure(),
399 blk_size);
400}
401
402bool
403Packet::matchAddr(const Addr addr, const bool is_secure) const
404{
405 return (getAddr() == addr) && (isSecure() == is_secure);
406}
407
408bool
410{
411 return matchAddr(pkt->getAddr(), pkt->isSecure());
412}
413
414Packet::PrintReqState::PrintReqState(std::ostream &_os, int _verbosity)
415 : curPrefixPtr(new std::string("")), os(_os), verbosity(_verbosity)
416{
418}
419
421{
422 labelStack.pop_back();
423 assert(labelStack.empty());
424 delete curPrefixPtr;
425}
426
428LabelStackEntry::LabelStackEntry(const std::string &_label,
429 std::string *_prefix)
430 : label(_label), prefix(_prefix), labelPrinted(false)
431{
432}
433
434void
435Packet::PrintReqState::pushLabel(const std::string &lbl,
436 const std::string &prefix)
437{
438 labelStack.push_back(LabelStackEntry(lbl, curPrefixPtr));
439 curPrefixPtr = new std::string(*curPrefixPtr);
440 *curPrefixPtr += prefix;
441}
442
443void
445{
446 delete curPrefixPtr;
447 curPrefixPtr = labelStack.back().prefix;
448 labelStack.pop_back();
449 assert(!labelStack.empty());
450}
451
452void
454{
455 if (!labelStack.back().labelPrinted) {
456 LabelStack::iterator i = labelStack.begin();
457 LabelStack::iterator end = labelStack.end();
458 while (i != end) {
459 if (!i->labelPrinted) {
460 ccprintf(os, "%s%s\n", *(i->prefix), i->label);
461 i->labelPrinted = true;
462 }
463 i++;
464 }
465 }
466}
467
468
469void
475
476void
478 const HtmCacheFailure htm_return_code)
479{
480 assert(needsResponse());
481 assert(isRequest());
482
484
485 setHtmTransactionFailedInCache(htm_return_code);
486
487 // responses are never express, even if the snoop that
488 // triggered them was
490}
491
492void
494 const HtmCacheFailure htm_return_code)
495{
496 if (htm_return_code != HtmCacheFailure::NO_FAIL)
498
499 htmReturnReason = htm_return_code;
500}
501
502bool
507
514
515void
517{
519 htmTransactionUid = htm_uid;
520}
521
522bool
527
528uint64_t
534
535} // namespace gem5
static const CommandInfo commandInfo[]
Array to map Command enum to associated info.
Definition packet.hh:213
Command responseCommand() const
Definition packet.hh:270
void popLabel()
Pop a label off the label stack.
Definition packet.cc:444
void printObj(Printable *obj)
Print a Printable object to os, because it matched the address on a PrintReq.
Definition packet.cc:470
PrintReqState(std::ostream &os, int verbosity=0)
Definition packet.cc:414
void pushLabel(const std::string &lbl, const std::string &prefix=" ")
Push a label onto the label stack, and prepend the given prefix string onto the current prefix.
Definition packet.cc:435
std::string * curPrefixPtr
Definition packet.hh:496
const std::string & curPrefix()
Returns the current line prefix.
Definition packet.hh:508
void printLabels()
Print all of the pending unprinted labels on the stack.
Definition packet.cc:453
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
bool isRead() const
Definition packet.hh:593
bool isSecure() const
Definition packet.hh:836
Addr addr
The address of the request.
Definition packet.hh:391
Addr getAddr() const
Definition packet.hh:807
@ FAILS_TRANSACTION
Definition packet.hh:339
@ RESPONDER_FLAGS
Definition packet.hh:307
@ EXPRESS_SNOOP
Special timing-mode atomic snoop for multi-level coherence.
Definition packet.hh:315
@ FROM_TRANSACTION
Definition packet.hh:343
void setUintX(uint64_t w, ByteOrder endian)
Set the value in the word w after truncating it to the length of the packet and then byteswapping it ...
Definition packet.cc:361
std::vector< bool > bytesValid
Track the bytes found that satisfy a functional read.
Definition packet.hh:402
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).
Definition packet.hh:588
Flags flags
Definition packet.hh:366
void setHtmTransactionFailedInCache(const HtmCacheFailure ret_code)
Stipulates that this packet/request has returned from the cache hierarchy in a failed transaction.
Definition packet.cc:493
AddrRange getAddrRange() const
Get address range to which this packet belongs.
Definition packet.cc:243
bool needsResponse() const
Definition packet.hh:608
SenderState * senderState
This packet's sender state.
Definition packet.hh:545
bool matchAddr(const Addr addr, const bool is_secure) const
Check if packet corresponds to a given address and address space.
Definition packet.cc:403
void pushSenderState(SenderState *sender_state)
Push a new sender state to the packet and make the current sender state the predecessor of the new on...
Definition packet.cc:334
void copyResponderFlags(const PacketPtr pkt)
Copy the reponse flags from an input packet to this packet.
Definition packet.cc:324
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Definition packet.cc:342
HtmCacheFailure getHtmTransactionFailedInCacheRC() const
If a packet/request has returned from the cache hierarchy in a failed transaction,...
Definition packet.cc:509
bool isHtmTransactional() const
Returns whether or not this packet/request originates in the CPU executing in transactional mode,...
Definition packet.cc:523
std::string print() const
A no-args wrapper of print(std::ostream...) meant to be invoked from DPRINTFs avoiding string overhea...
Definition packet.cc:382
T * getPtr()
get a pointer to the data ptr.
Definition packet.hh:1225
bool isWrite() const
Definition packet.hh:594
bool trySatisfyFunctional(PacketPtr other)
Check a functional request against a memory value stored in another packet (i.e.
Definition packet.hh:1399
uint64_t getHtmTransactionUid() const
If a packet/request originates in a CPU executing in transactional mode, i.e.
Definition packet.cc:529
Addr getBlockAddr(unsigned int blk_size) const
Definition packet.hh:831
RequestPtr req
A pointer to the original request.
Definition packet.hh:377
bool isPrint() const
Definition packet.hh:623
unsigned getSize() const
Definition packet.hh:817
unsigned size
The size of the request or transfer.
Definition packet.hh:397
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
Definition packet.cc:352
bool isExpressSnoop() const
Definition packet.hh:702
bool _isSecure
True if the request targets the secure memory space.
Definition packet.hh:394
const T * getConstPtr() const
Definition packet.hh:1234
bool matchBlockAddr(const Addr addr, const bool is_secure, const int blk_size) const
Check if packet corresponds to a given block-aligned address and address space.
Definition packet.cc:389
HtmCacheFailure htmReturnReason
Holds the return status of the transaction.
Definition packet.hh:414
void setHtmTransactional(uint64_t val)
Stipulates that this packet/request originates in the CPU executing in transactional mode,...
Definition packet.cc:516
void makeHtmTransactionalReqResponse(const HtmCacheFailure ret_code)
Communicates to the core that a packet was processed by the memory subsystem while running in transac...
Definition packet.cc:477
bool cacheResponding() const
Definition packet.hh:659
MemCmd cmd
The command field of the packet.
Definition packet.hh:372
bool htmTransactionFailedInCache() const
Returns whether or not this packet/request has returned from the cache hierarchy in a failed transact...
Definition packet.cc:503
uint64_t htmTransactionUid
A global unique identifier of the transaction.
Definition packet.hh:420
bool isRequest() const
Definition packet.hh:597
Abstract base class for objects which support being printed to a stream for debugging.
Definition printable.hh:48
virtual void print(std::ostream &os, int verbosity=0, const std::string &prefix="") const =0
AddrRange RangeSize(Addr start, Addr size)
void set(Type mask)
Set all flag's bits matching the given mask.
Definition flags.hh:116
bool isSet(Type mask) const
Verifies whether any bit matching the given mask is set.
Definition flags.hh:83
void clear()
Clear all flag's bits.
Definition flags.hh:102
#define panic(...)
This implements a cprintf based panic() function.
Definition logging.hh:188
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition logging.hh:214
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 0 > w
Bitfield< 17 > os
Definition misc.hh:838
Bitfield< 63 > val
Definition misc.hh:804
Bitfield< 3 > addr
Definition types.hh:84
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
T safe_cast(U &&ref_or_ptr)
Definition cast.hh:74
std::pair< std::uint64_t, bool > getUintX(const void *buf, std::size_t bytes, ByteOrder endian)
Definition bufval.cc:41
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
bool setUintX(std::uint64_t val, void *buf, std::size_t bytes, ByteOrder endian)
Definition bufval.cc:59
HtmCacheFailure
Definition htm.hh:60
void ccprintf(cp::Print &print)
Definition cprintf.hh:130
Overload hash function for BasicBlockRange type.
Definition binary32.hh:81
Declaration of the Packet class.
An entry in the label stack.
Definition packet.hh:486
LabelStackEntry(const std::string &_label, std::string *_prefix)
Definition packet.cc:428
A virtual base opaque structure used to hold state associated with the packet (e.g....
Definition packet.hh:469
SenderState * predecessor
Definition packet.hh:470

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