gem5
v19.0.0.0
|
#include <packet.hh>
Classes | |
struct | CommandInfo |
Structure that defines attributes and other data associated with a Command. More... | |
Public Types | |
enum | Command { InvalidCmd, ReadReq, ReadResp, ReadRespWithInvalidate, WriteReq, WriteResp, WritebackDirty, WritebackClean, WriteClean, CleanEvict, SoftPFReq, SoftPFExReq, HardPFReq, SoftPFResp, HardPFResp, WriteLineReq, UpgradeReq, SCUpgradeReq, UpgradeResp, SCUpgradeFailReq, UpgradeFailResp, ReadExReq, ReadExResp, ReadCleanReq, ReadSharedReq, LoadLockedReq, StoreCondReq, StoreCondFailReq, StoreCondResp, SwapReq, SwapResp, MemFenceReq = SwapResp + 3, MemFenceResp, CleanSharedReq, CleanSharedResp, CleanInvalidReq, CleanInvalidResp, InvalidDestError, BadAddressError, FunctionalReadError, FunctionalWriteError, PrintReq, FlushReq, InvalidateReq, InvalidateResp, NUM_MEM_CMDS } |
List of all commands associated with a packet. More... | |
Public Member Functions | |
bool | isRead () const |
bool | isWrite () const |
bool | isUpgrade () const |
bool | isRequest () const |
bool | isResponse () const |
bool | needsWritable () const |
bool | needsResponse () const |
bool | isInvalidate () const |
bool | isEviction () const |
bool | isClean () const |
bool | fromCache () const |
bool | isWriteback () const |
A writeback is an eviction that carries data. More... | |
bool | hasData () const |
Check if this particular packet type carries payload data. More... | |
bool | isLLSC () const |
bool | isSWPrefetch () const |
bool | isHWPrefetch () const |
bool | isPrefetch () const |
bool | isError () const |
bool | isPrint () const |
bool | isFlush () const |
Command | responseCommand () const |
const std::string & | toString () const |
Return the string to a cmd given by idx. More... | |
int | toInt () const |
MemCmd (Command _cmd) | |
MemCmd (int _cmd) | |
MemCmd () | |
bool | operator== (MemCmd c2) const |
bool | operator!= (MemCmd c2) const |
Private Types | |
enum | Attribute { IsRead, IsWrite, IsUpgrade, IsInvalidate, IsClean, NeedsWritable, IsRequest, IsResponse, NeedsResponse, IsEviction, IsSWPrefetch, IsHWPrefetch, IsLlsc, HasData, IsError, IsPrint, IsFlush, FromCache, NUM_COMMAND_ATTRIBUTES } |
List of command attributes. More... | |
Private Member Functions | |
bool | testCmdAttrib (MemCmd::Attribute attrib) const |
Private Attributes | |
Command | cmd |
Static Private Attributes | |
static const CommandInfo | commandInfo [] |
Array to map Command enum to associated info. More... | |
Friends | |
class | Packet |
Packet probe point. More... | |
|
private |
List of command attributes.
Enumerator | |
---|---|
IsRead | Data flows from responder to requester. |
IsWrite | Data flows from requester to responder. |
IsUpgrade | |
IsInvalidate | |
IsClean | Cleans any existing dirty blocks. |
NeedsWritable | Requires writable copy to complete in-cache. |
IsRequest | Issued by requester. |
IsResponse | Issue by responder. |
NeedsResponse | Requester needs response from target. |
IsEviction | |
IsSWPrefetch | |
IsHWPrefetch | |
IsLlsc | Alpha/MIPS LL or SC access. |
HasData | There is an associated payload. |
IsError | Error response. |
IsPrint | Print state matching address (for debugging) |
IsFlush | Flush the address from caches. |
FromCache | Request originated from a caching agent. |
NUM_COMMAND_ATTRIBUTES |
enum MemCmd::Command |
List of all commands associated with a packet.
|
inline |
Definition at line 207 of file packet.hh.
References FromCache, and testCmdAttrib().
Referenced by Packet::fromCache().
|
inline |
Check if this particular packet type carries payload data.
Note that this does not reflect if the data pointer of the packet is valid or not.
Definition at line 220 of file packet.hh.
References HasData, and testCmdAttrib().
Referenced by Packet::allocate(), Packet::hasData(), and Packet::hasRespData().
|
inline |
Definition at line 206 of file packet.hh.
References IsClean, and testCmdAttrib().
Referenced by Packet::isClean(), and Packet::setSatisfied().
|
inline |
Definition at line 226 of file packet.hh.
References IsError, and testCmdAttrib().
Referenced by Packet::isError().
|
inline |
Definition at line 205 of file packet.hh.
References IsEviction, and testCmdAttrib().
Referenced by Packet::isEviction(), Packet::mustCheckAbove(), and Packet::setWriteThrough().
|
inline |
Definition at line 228 of file packet.hh.
References IsFlush, and testCmdAttrib().
Referenced by Packet::isFlush().
|
inline |
Definition at line 223 of file packet.hh.
References IsHWPrefetch, and testCmdAttrib().
Referenced by BOPPrefetcher::notifyFill().
|
inline |
Definition at line 204 of file packet.hh.
References IsInvalidate, and testCmdAttrib().
Referenced by Packet::isInvalidate().
|
inline |
Definition at line 221 of file packet.hh.
References IsLlsc, and testCmdAttrib().
Referenced by BaseCache::allocOnFill(), Packet::convertLlToRead(), Packet::convertScToWrite(), and Packet::isLLSC().
|
inline |
Definition at line 224 of file packet.hh.
References IsHWPrefetch, IsSWPrefetch, and testCmdAttrib().
Referenced by BaseCache::allocOnFill().
|
inline |
Definition at line 227 of file packet.hh.
References IsPrint, and testCmdAttrib().
Referenced by Packet::isPrint(), Packet::popLabel(), and Packet::pushLabel().
|
inline |
Definition at line 197 of file packet.hh.
References IsRead, and testCmdAttrib().
Referenced by Packet::convertLlToRead(), TraceGen::getNextPacket(), StackDistProbe::handleRequest(), Packet::isRead(), CommMonitor::MonitorStats::updateReqStats(), and CommMonitor::MonitorStats::updateRespStats().
|
inline |
Definition at line 200 of file packet.hh.
References IsRequest, and testCmdAttrib().
Referenced by MemFootprintProbe::handleRequest(), Packet::isRequest(), Packet::makeResponse(), Packet::needsWritable(), and Packet::setCacheResponding().
|
inline |
Definition at line 201 of file packet.hh.
References IsResponse, and testCmdAttrib().
Referenced by Packet::isResponse(), and Packet::setBadAddress().
|
inline |
Definition at line 222 of file packet.hh.
References IsSWPrefetch, and testCmdAttrib().
Referenced by Cache::handleTimingReqMiss(), BasePrefetcher::probeNotify(), and Cache::serviceMSHRTargets().
|
inline |
Definition at line 199 of file packet.hh.
References IsUpgrade, and testCmdAttrib().
Referenced by Packet::isUpgrade().
|
inline |
Definition at line 198 of file packet.hh.
References IsWrite, and testCmdAttrib().
Referenced by Packet::convertScToWrite(), BaseGen::getPacket(), StackDistProbe::handleRequest(), Packet::isWrite(), TraceCPU::FixedRetryGen::send(), Packet::setFunctionalResponseStatus(), Packet::setWriteThrough(), CommMonitor::MonitorStats::updateReqStats(), and CommMonitor::MonitorStats::updateRespStats().
|
inline |
A writeback is an eviction that carries data.
Definition at line 212 of file packet.hh.
References HasData, IsEviction, and testCmdAttrib().
Referenced by Packet::isWriteback().
|
inline |
Definition at line 203 of file packet.hh.
References NeedsResponse, and testCmdAttrib().
Referenced by Packet::makeResponse(), and Packet::needsResponse().
|
inline |
Definition at line 202 of file packet.hh.
References NeedsWritable, and testCmdAttrib().
Referenced by Packet::needsWritable().
|
inline |
|
inline |
|
inline |
Definition at line 231 of file packet.hh.
References cmd, and MemCmd::CommandInfo::response.
Referenced by TimingSimpleCPU::buildSplitPacket(), Packet::hasRespData(), and Packet::makeResponse().
|
inlineprivate |
Definition at line 190 of file packet.hh.
References MemCmd::CommandInfo::attributes, and cmd.
Referenced by fromCache(), hasData(), isClean(), isError(), isEviction(), isFlush(), isHWPrefetch(), isInvalidate(), isLLSC(), isPrefetch(), isPrint(), isRead(), isRequest(), isResponse(), isSWPrefetch(), isUpgrade(), isWrite(), isWriteback(), needsResponse(), and needsWritable().
|
inline |
Definition at line 238 of file packet.hh.
References cmd.
Referenced by Packet::cmdToIndex(), and MemTraceProbe::handleRequest().
|
inline |
Return the string to a cmd given by idx.
Definition at line 237 of file packet.hh.
References cmd, and MemCmd::CommandInfo::str.
Referenced by Packet::cmdString(), X86ISA::IntSlavePort< X86ISA::Interrupts >::recvAtomic(), ComputeUnit::DTLBPort::recvTimingResp(), Minor::LSQ::recvTimingResp(), and BaseXBar::regStats().
|
friend |
Packet probe point.
This probe point provides a unified interface for components that want to instrument Packets in the memory system. Components should when possible adhere to the following naming scheme:
PktRequest: Requests sent out on the memory side of a normal components and incoming requests for memories. Packets should not be duplicated (i.e., a packet should only appear once irrespective of the receiving end requesting a retry).
PktResponse: Response received from the memory side of a normal component or a response being sent out from a memory.
PktRequestCPU: Incoming, accepted, memory request on the CPU side of a two-sided component. This probe point is primarily intended for components that cache or forward requests (e.g., caches and XBars), single-sided components should use PktRequest instead. The probe point should only be called when a packet is accepted.
PktResponseCPU: Outgoing response memory request on the CPU side of a two-sided component. This probe point is primarily intended for components that cache or forward requests (e.g., caches and XBars), single-sided components should use PktRequest instead.
Definition at line 78 of file packet.hh.
Referenced by Packet::createRead(), and Packet::createWrite().
|
private |
Definition at line 187 of file packet.hh.
Referenced by operator!=(), operator==(), TraceGen::InputStream::read(), TraceCPU::FixedRetryGen::InputStream::read(), responseCommand(), testCmdAttrib(), toInt(), and toString().
|
staticprivate |