gem5
v20.0.0.0
|
#include <mshr.hh>
Public Member Functions | |
TargetList () | |
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. More... | |
void | init (Addr blk_addr, Addr blk_size) |
Reset state. More... | |
void | resetFlags () |
void | populateFlags () |
Goes through the list of targets and uses them to populate the flags of this TargetList. More... | |
void | updateWriteFlags (PacketPtr pkt) |
Add the specified packet in the TargetList. More... | |
bool | isReset () const |
Tests if the flags of this TargetList have their default values. More... | |
void | add (PacketPtr pkt, Tick readyTime, Counter order, Target::Source source, bool markPending, bool alloc_on_fill) |
Add the specified packet in the TargetList. More... | |
void | replaceUpgrades () |
Convert upgrades to the equivalent request if the cache line they refer to would have been invalid (Upgrade -> ReadEx, SC* -> Fail). More... | |
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. More... | |
Public Attributes | |
bool | needsWritable |
bool | hasUpgrade |
bool | allocOnFill |
Set when the response should allocate on fill. More... | |
bool | hasFromCache |
Determine whether there was at least one non-snooping target coming from another cache. More... | |
![]() | |
Target | item |
Dummy Item. More... | |
Private Attributes | |
Addr | blkAddr |
Address of the cache block for this list of targets. More... | |
Addr | blkSize |
Size of the cache block. More... | |
bool | canMergeWrites |
Indicates whether we can merge incoming write requests. More... | |
std::vector< char > | writesBitmap |
Track which bytes are written by requests in this target list. More... | |
|
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 156 of file mshr.cc.
References MSHR::downstreamPending, Packet::findNextSenderState(), and updateFlags().
Referenced by MSHR::allocate(), MSHR::allocateTarget(), and MSHR::handleSnoop().
void MSHR::TargetList::clearDownstreamPending | ( | ) |
Definition at line 247 of file mshr.cc.
Referenced by MSHR::clearDownstreamPending(), MSHR::markInService(), MSHR::promoteIf(), and replaceUpgrades().
void 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 194 of file mshr.hh.
References QueueEntry::blkAddr, and QueueEntry::blkSize.
Referenced by MSHR::allocate(), and MSHR::extractServiceableTargets().
|
inline |
Tests if the flags of this TargetList have their default values.
Definition at line 235 of file mshr.hh.
References MSHR::clearDownstreamPending(), QueueEntry::Target::order, X86ISA::os, MSHR::print(), QueueEntry::Target::readyTime, MSHR::Target::source, and MSHR::trySatisfyFunctional().
Referenced by 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 274 of file mshr.hh.
References ArmISA::i.
Referenced by MSHR::isWholeLineWrite(), MSHR::markInService(), and updateWriteFlags().
void 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 102 of file mshr.cc.
References resetFlags(), ArmISA::t, and updateFlags().
Referenced by MSHR::extractServiceableTargets(), MSHR::promoteDeferredTargets(), and MSHR::promoteIf().
void MSHR::TargetList::print | ( | std::ostream & | os, |
int | verbosity, | ||
const std::string & | prefix | ||
) | const |
Definition at line 267 of file mshr.cc.
References ccprintf(), MSHR::Target::FromCPU, MSHR::Target::FromPrefetcher, MSHR::Target::FromSnoop, ArmISA::s, and ArmISA::t.
Referenced by MSHR::print().
void 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 212 of file mshr.cc.
References clearDownstreamPending(), MSHR::clearDownstreamPending(), hasUpgrade, replaceUpgrade(), and ArmISA::t.
Referenced by MSHR::handleSnoop().
|
inline |
Definition at line 202 of file mshr.hh.
References MipsISA::fill, and QueueEntry::Target::pkt.
Referenced by MSHR::deallocate(), and populateFlags().
bool MSHR::TargetList::trySatisfyFunctional | ( | PacketPtr | pkt | ) |
Definition at line 254 of file mshr.cc.
References ArmISA::t, and Packet::trySatisfyFunctional().
Referenced by MSHR::trySatisfyFunctional().
void 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 74 of file mshr.cc.
References allocOnFill, Packet::cmd, Packet::fromCache(), MSHR::Target::FromPrefetcher, MSHR::Target::FromSnoop, hasFromCache, hasUpgrade, Packet::isUpgrade(), needsWritable, Packet::needsWritable(), MemCmd::StoreCondReq, and updateWriteFlags().
Referenced by add(), and populateFlags().
void 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 111 of file mshr.cc.
References blkSize, canMergeWrites, MipsISA::fill, Packet::getOffset(), Packet::getSize(), isWholeLineWrite(), Packet::isWrite(), Request::LLSC, Request::MEM_SWAP, Request::MEM_SWAP_COND, ArmISA::offset, Request::PRIVILEGED, Packet::req, Request::SECURE, Request::STRICT_ORDER, Request::UNCACHEABLE, and writesBitmap.
Referenced by updateFlags().
bool MSHR::TargetList::allocOnFill |
Set when the response should allocate on fill.
Definition at line 168 of file mshr.hh.
Referenced by MSHR::allocOnFill(), MSHR::print(), and updateFlags().
|
private |
Address of the cache block for this list of targets.
Definition at line 282 of file mshr.hh.
Referenced by MSHR::allocate(), MSHR::conflictAddr(), MSHR::extractServiceableTargets(), MSHR::matchBlockAddr(), MSHR::print(), and MSHR::trySatisfyFunctional().
|
private |
Size of the cache block.
Definition at line 285 of file mshr.hh.
Referenced by MSHR::allocate(), MSHR::extractServiceableTargets(), MSHR::handleSnoop(), MSHR::matchBlockAddr(), MSHR::print(), MSHR::trySatisfyFunctional(), and updateWriteFlags().
|
private |
Indicates whether we can merge incoming write requests.
Definition at line 288 of file mshr.hh.
Referenced by updateWriteFlags().
bool MSHR::TargetList::hasFromCache |
Determine whether there was at least one non-snooping target coming from another cache.
Definition at line 173 of file mshr.hh.
Referenced by MSHR::hasFromCache(), MSHR::print(), and updateFlags().
bool MSHR::TargetList::hasUpgrade |
Definition at line 166 of file mshr.hh.
Referenced by replaceUpgrades(), and updateFlags().
bool MSHR::TargetList::needsWritable |
Definition at line 165 of file mshr.hh.
Referenced by MSHR::handleSnoop(), MSHR::markInService(), MSHR::needsWritable(), MSHR::print(), MSHR::promoteWritable(), and updateFlags().
|
private |
Track which bytes are written by requests in this target list.
Definition at line 297 of file mshr.hh.
Referenced by updateWriteFlags().