gem5 v24.0.0.0
|
#include <mshr.hh>
Public Member Functions | |
TargetList (const std::string &name=".unnamedTargetList") | |
void | updateFlags (PacketPtr pkt, Target::Source source, bool alloc_on_fill) |
Use the provided packet and the source to update the flags of this TargetList. | |
void | init (Addr blk_addr, Addr blk_size) |
Reset state. | |
void | resetFlags () |
void | populateFlags () |
Goes through the list of targets and uses them to populate the flags of this TargetList. | |
void | updateWriteFlags (PacketPtr pkt) |
Add the specified packet in the TargetList. | |
bool | isReset () const |
Tests if the flags of this TargetList have their default values. | |
void | add (PacketPtr pkt, Tick readyTime, Counter order, Target::Source source, bool markPending, bool alloc_on_fill) |
Add the specified packet in the TargetList. | |
void | replaceUpgrades () |
Convert upgrades to the equivalent request if the cache line they refer to would have been invalid (Upgrade -> ReadEx, SC* -> Fail). | |
void | clearDownstreamPending () |
void | clearDownstreamPending (iterator begin, iterator end) |
bool | trySatisfyFunctional (PacketPtr pkt) |
void | print (std::ostream &os, int verbosity, const std::string &prefix) const |
bool | isWholeLineWrite () const |
Check if this list contains writes that cover an entire cache line. | |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Public Attributes | |
bool | needsWritable |
bool | hasUpgrade |
bool | allocOnFill |
Set when the response should allocate on fill. | |
bool | hasFromCache |
Determine whether there was at least one non-snooping target coming from another cache. | |
Public Attributes inherited from std::list< Target > | |
Target | item |
Dummy Item. | |
Private Attributes | |
Addr | blkAddr |
Address of the cache block for this list of targets. | |
Addr | blkSize |
Size of the cache block. | |
bool | canMergeWrites |
Indicates whether we can merge incoming write requests. | |
std::vector< char > | writesBitmap |
Track which bytes are written by requests in this target list. | |
gem5::MSHR::TargetList::TargetList | ( | const std::string & | name = ".unnamedTargetList" | ) |
|
inline |
Add the specified packet in the TargetList.
This function stores information related to the added packet and updates accordingly the flags.
pkt | Packet considered for adding |
readTime | Tick at which the packet is processed by this cache |
order | A counter giving a unique id to each target |
source | Indicates the source agent of the packet |
markPending | Set for deferred targets or pending MSHRs |
alloc_on_fill | Whether it should allocate on a fill |
Definition at line 164 of file mshr.cc.
References gem5::MSHR::downstreamPending, DPRINTF, gem5::Packet::findNextSenderState(), gem5::QueueEntry::order, gem5::Packet::print(), and gem5::QueueEntry::readyTime.
Referenced by gem5::MSHR::allocate(), gem5::MSHR::allocateTarget(), and gem5::MSHR::handleSnoop().
void gem5::MSHR::TargetList::clearDownstreamPending | ( | ) |
Definition at line 257 of file mshr.cc.
References gem5::MSHR::clearDownstreamPending().
Referenced by gem5::MSHR::clearDownstreamPending(), gem5::MSHR::markInService(), and gem5::MSHR::promoteIf().
void gem5::MSHR::TargetList::clearDownstreamPending | ( | iterator | begin, |
iterator | end ) |
Reset state.
blk_addr | Address of the cache block |
blk_size | Size of the cache block |
Definition at line 202 of file mshr.hh.
References blkAddr, blkSize, resetFlags(), and writesBitmap.
Referenced by gem5::MSHR::allocate(), and gem5::MSHR::extractServiceableTargets().
|
inline |
Tests if the flags of this TargetList have their default values.
Definition at line 243 of file mshr.hh.
References allocOnFill, canMergeWrites, hasFromCache, hasUpgrade, and needsWritable.
Referenced by gem5::MSHR::deallocate().
|
inline |
Check if this list contains writes that cover an entire cache line.
This is used as part of the miss-packet creation. Note that new requests may arrive after a miss-packet has been created, and for the corresponding fill we use the wasWholeLineWrite field.
Definition at line 282 of file mshr.hh.
References gem5::ArmISA::i, and writesBitmap.
Referenced by gem5::MSHR::isWholeLineWrite().
void gem5::MSHR::TargetList::populateFlags | ( | ) |
Goes through the list of targets and uses them to populate the flags of this TargetList.
When the function returns the flags are consistent with the properties of packets in the list.
Definition at line 109 of file mshr.cc.
References gem5::ArmISA::t.
Referenced by gem5::MSHR::extractServiceableTargets(), gem5::MSHR::promoteDeferredTargets(), and gem5::MSHR::promoteIf().
void gem5::MSHR::TargetList::print | ( | std::ostream & | os, |
int | verbosity, | ||
const std::string & | prefix ) const |
Definition at line 277 of file mshr.cc.
References gem5::ccprintf(), gem5::MSHR::Target::FromCPU, gem5::MSHR::Target::FromPrefetcher, gem5::MSHR::Target::FromSnoop, gem5::X86ISA::os, gem5::ArmISA::s, and gem5::ArmISA::t.
Referenced by gem5::MSHR::popTarget(), and gem5::MSHR::print().
void gem5::MSHR::TargetList::replaceUpgrades | ( | ) |
Convert upgrades to the equivalent request if the cache line they refer to would have been invalid (Upgrade -> ReadEx, SC* -> Fail).
Used to rejig ordering between targets waiting on an MSHR.
Definition at line 222 of file mshr.cc.
References gem5::replaceUpgrade(), and gem5::ArmISA::t.
Referenced by gem5::MSHR::handleSnoop().
|
inline |
Definition at line 210 of file mshr.hh.
References allocOnFill, canMergeWrites, hasFromCache, hasUpgrade, needsWritable, and writesBitmap.
Referenced by gem5::MSHR::deallocate(), and init().
bool gem5::MSHR::TargetList::trySatisfyFunctional | ( | PacketPtr | pkt | ) |
Definition at line 264 of file mshr.cc.
References gem5::ArmISA::t, and gem5::Packet::trySatisfyFunctional().
Referenced by gem5::MSHR::trySatisfyFunctional().
void gem5::MSHR::TargetList::updateFlags | ( | PacketPtr | pkt, |
Target::Source | source, | ||
bool | alloc_on_fill ) |
Use the provided packet and the source to update the flags of this TargetList.
pkt | Packet considered for the flag update |
source | Indicates the source of the packet |
alloc_on_fill | Whether the pkt would allocate on a fill |
Definition at line 81 of file mshr.cc.
References gem5::MSHR::allocOnFill(), gem5::Packet::cmd, gem5::Packet::fromCache(), gem5::MSHR::Target::FromPrefetcher, gem5::MSHR::Target::FromSnoop, gem5::MSHR::hasFromCache(), gem5::Packet::isUpgrade(), gem5::MSHR::needsWritable(), gem5::Packet::needsWritable(), and gem5::MemCmd::StoreCondReq.
void gem5::MSHR::TargetList::updateWriteFlags | ( | PacketPtr | pkt | ) |
Add the specified packet in the TargetList.
This function stores information related to the added packet and updates accordingly the flags.
pkt | Packet considered for adding |
Definition at line 118 of file mshr.cc.
References gem5::QueueEntry::blkSize, gem5::Packet::getOffset(), gem5::Packet::getSize(), gem5::Packet::isMaskedWrite(), gem5::MSHR::isWholeLineWrite(), gem5::Packet::isWrite(), gem5::Request::LLSC, gem5::Request::LOCKED_RMW, gem5::Request::MEM_SWAP, gem5::Request::MEM_SWAP_COND, gem5::ArmISA::offset, gem5::Request::PRIVILEGED, gem5::Packet::req, gem5::Request::SECURE, gem5::Request::STRICT_ORDER, and gem5::Request::UNCACHEABLE.
bool gem5::MSHR::TargetList::allocOnFill |
Set when the response should allocate on fill.
Definition at line 176 of file mshr.hh.
Referenced by gem5::MSHR::allocOnFill(), isReset(), and resetFlags().
|
private |
|
private |
|
private |
Indicates whether we can merge incoming write requests.
Definition at line 296 of file mshr.hh.
Referenced by isReset(), and resetFlags().
bool gem5::MSHR::TargetList::hasFromCache |
Determine whether there was at least one non-snooping target coming from another cache.
Definition at line 181 of file mshr.hh.
Referenced by gem5::MSHR::hasFromCache(), isReset(), resetFlags(), and gem5::Cache::serviceMSHRTargets().
bool gem5::MSHR::TargetList::hasUpgrade |
Definition at line 174 of file mshr.hh.
Referenced by isReset(), and resetFlags().
bool gem5::MSHR::TargetList::needsWritable |
Definition at line 173 of file mshr.hh.
Referenced by gem5::MSHR::handleSnoop(), isReset(), gem5::MSHR::markInService(), gem5::MSHR::needsWritable(), gem5::MSHR::promoteWritable(), and resetFlags().
|
private |
Track which bytes are written by requests in this target list.
Definition at line 305 of file mshr.hh.
Referenced by init(), isWholeLineWrite(), and resetFlags().