// check the response queue
for (auto i = transmitList.begin(); i != transmitList.end(); ++i) {
- if (pkt->checkFunctional((*i).pkt)) {
+ if (pkt->trySatisfyFunctional((*i).pkt)) {
pkt->makeResponse();
return;
}
}
// also check the master port's request queue
- if (masterPort.checkFunctional(pkt)) {
+ if (masterPort.trySatisfyFunctional(pkt)) {
return;
}
}
bool
-Bridge::BridgeMasterPort::checkFunctional(PacketPtr pkt)
+Bridge::BridgeMasterPort::trySatisfyFunctional(PacketPtr pkt)
{
bool found = false;
auto i = transmitList.begin();
while (i != transmitList.end() && !found) {
- if (pkt->checkFunctional((*i).pkt)) {
+ if (pkt->trySatisfyFunctional((*i).pkt)) {
pkt->makeResponse();
found = true;
}
*
* @return true if we find a match
*/
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
protected:
// see if we have data at all (owned or otherwise)
bool have_data = blk && blk->isValid()
- && pkt->checkFunctional(&cbpw, blk_addr, is_secure, blkSize,
- blk->data);
+ && pkt->trySatisfyFunctional(&cbpw, blk_addr, is_secure, blkSize,
+ blk->data);
// data we have is dirty if marked as such or if we have an
// in-service MSHR that is pending a modified line
(mshr && mshr->inService && mshr->isPendingModified()));
bool done = have_dirty ||
- cpuSidePort.checkFunctional(pkt) ||
- mshrQueue.checkFunctional(pkt, blk_addr) ||
- writeBuffer.checkFunctional(pkt, blk_addr) ||
- memSidePort.checkFunctional(pkt);
+ cpuSidePort.trySatisfyFunctional(pkt) ||
+ mshrQueue.trySatisfyFunctional(pkt, blk_addr) ||
+ writeBuffer.trySatisfyFunctional(pkt, blk_addr) ||
+ memSidePort.trySatisfyFunctional(pkt);
DPRINTF(CacheVerbose, "%s: %s %s%s%s\n", __func__, pkt->print(),
(blk && blk->isValid()) ? "valid " : "",
bool
-MSHR::TargetList::checkFunctional(PacketPtr pkt)
+MSHR::TargetList::trySatisfyFunctional(PacketPtr pkt)
{
for (auto& t : *this) {
- if (pkt->checkFunctional(t.pkt)) {
+ if (pkt->trySatisfyFunctional(t.pkt)) {
return true;
}
}
bool
-MSHR::checkFunctional(PacketPtr pkt)
+MSHR::trySatisfyFunctional(PacketPtr pkt)
{
// For printing, we treat the MSHR as a whole as single entity.
// For other requests, we iterate over the individual targets
// since that's where the actual data lies.
if (pkt->isPrint()) {
- pkt->checkFunctional(this, blkAddr, isSecure, blkSize, nullptr);
+ pkt->trySatisfyFunctional(this, blkAddr, isSecure, blkSize, nullptr);
return false;
} else {
- return (targets.checkFunctional(pkt) ||
- deferredTargets.checkFunctional(pkt));
+ return (targets.trySatisfyFunctional(pkt) ||
+ deferredTargets.trySatisfyFunctional(pkt));
}
}
void clearDownstreamPending();
void clearDownstreamPending(iterator begin, iterator end);
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
void print(std::ostream &os, int verbosity,
const std::string &prefix) const;
};
*/
void promoteWritable();
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
/**
* Prints the contents of this MSHR for debugging.
return nullptr;
}
- bool checkFunctional(PacketPtr pkt, Addr blk_addr)
+ bool trySatisfyFunctional(PacketPtr pkt, Addr blk_addr)
{
pkt->pushLabel(label);
for (const auto& entry : allocatedList) {
- if (entry->blkAddr == blk_addr && entry->checkFunctional(pkt)) {
+ if (entry->blkAddr == blk_addr && entry->trySatisfyFunctional(pkt)) {
pkt->popLabel();
return true;
}
}
bool
-WriteQueueEntry::TargetList::checkFunctional(PacketPtr pkt)
+WriteQueueEntry::TargetList::trySatisfyFunctional(PacketPtr pkt)
{
for (auto& t : *this) {
- if (pkt->checkFunctional(t.pkt)) {
+ if (pkt->trySatisfyFunctional(t.pkt)) {
return true;
}
}
}
bool
-WriteQueueEntry::checkFunctional(PacketPtr pkt)
+WriteQueueEntry::trySatisfyFunctional(PacketPtr pkt)
{
// For printing, we treat the WriteQueueEntry as a whole as single
// entity. For other requests, we iterate over the individual
// targets since that's where the actual data lies.
if (pkt->isPrint()) {
- pkt->checkFunctional(this, blkAddr, isSecure, blkSize, nullptr);
+ pkt->trySatisfyFunctional(this, blkAddr, isSecure, blkSize, nullptr);
return false;
} else {
- return targets.checkFunctional(pkt);
+ return targets.trySatisfyFunctional(pkt);
}
}
TargetList() {}
void add(PacketPtr pkt, Tick readyTime, Counter order);
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
void print(std::ostream &os, int verbosity,
const std::string &prefix) const;
};
targets.pop_front();
}
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
/**
* Prints the contents of this MSHR for debugging.
// if we find a response that has the data, then the
// downstream caches/memories may be out of date, so simply stop
// here
- if (p->checkFunctional(pkt)) {
+ if (p->trySatisfyFunctional(pkt)) {
if (pkt->needsResponse())
pkt->makeResponse();
return;
}
for (const auto& p : slavePorts) {
- if (p->checkFunctional(pkt)) {
+ if (p->trySatisfyFunctional(pkt)) {
if (pkt->needsResponse())
pkt->makeResponse();
return;
{
pkt->pushLabel(memory.name());
- if (!queue.checkFunctional(pkt)) {
+ if (!queue.trySatisfyFunctional(pkt)) {
// Default implementation of SimpleTimingPort::recvFunctional()
// calls recvAtomic() and throws away the latency; we can save a
// little here by just not calculating the latency.
// potentially update the packets in our response queue as well
for (auto i = responseQueue.begin(); i != responseQueue.end(); ++i)
- pkt->checkFunctional(*i);
+ pkt->trySatisfyFunctional(*i);
pkt->popLabel();
}
}
bool
-MemDelay::checkFunctional(PacketPtr pkt)
+MemDelay::trySatisfyFunctional(PacketPtr pkt)
{
- return slavePort.checkFunctional(pkt) ||
- masterPort.checkFunctional(pkt);
+ return slavePort.trySatisfyFunctional(pkt) ||
+ masterPort.trySatisfyFunctional(pkt);
}
MemDelay::MasterPort::MasterPort(const std::string &_name, MemDelay &_parent)
void
MemDelay::MasterPort::recvFunctionalSnoop(PacketPtr pkt)
{
- if (parent.checkFunctional(pkt)) {
+ if (parent.trySatisfyFunctional(pkt)) {
pkt->makeResponse();
} else {
parent.slavePort.sendFunctionalSnoop(pkt);
void
MemDelay::SlavePort::recvFunctional(PacketPtr pkt)
{
- if (parent.checkFunctional(pkt)) {
+ if (parent.trySatisfyFunctional(pkt)) {
pkt->makeResponse();
} else {
parent.masterPort.sendFunctional(pkt);
};
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
MasterPort masterPort;
SlavePort slavePort;
// if we find a response that has the data, then the
// downstream caches/memories may be out of date, so simply stop
// here
- if (p->checkFunctional(pkt)) {
+ if (p->trySatisfyFunctional(pkt)) {
if (pkt->needsResponse())
pkt->makeResponse();
return;
};
bool
-Packet::checkFunctional(Printable *obj, Addr addr, bool is_secure, int size,
+Packet::trySatisfyFunctional(Printable *obj, Addr addr, bool is_secure, int size,
uint8_t *_data)
{
const Addr func_start = getAddr();
* accordingly.
*/
bool
- checkFunctional(PacketPtr other)
+ trySatisfyFunctional(PacketPtr other)
{
// all packets that are carrying a payload should have a valid
// data pointer
- return checkFunctional(other, other->getAddr(), other->isSecure(),
- other->getSize(),
- other->hasData() ?
- other->getPtr<uint8_t>() : NULL);
+ return trySatisfyFunctional(other, other->getAddr(), other->isSecure(),
+ other->getSize(),
+ other->hasData() ?
+ other->getPtr<uint8_t>() : NULL);
}
/**
* memory value.
*/
bool
- checkFunctional(Printable *obj, Addr base, bool is_secure, int size,
- uint8_t *_data);
+ trySatisfyFunctional(Printable *obj, Addr base, bool is_secure, int size,
+ uint8_t *_data);
/**
* Push label for PrintReq (safe to call unconditionally).
}
bool
-PacketQueue::checkFunctional(PacketPtr pkt)
+PacketQueue::trySatisfyFunctional(PacketPtr pkt)
{
pkt->pushLabel(label);
while (!found && i != transmitList.end()) {
// If the buffered packet contains data, and it overlaps the
// current packet, then update data
- found = pkt->checkFunctional(i->pkt);
+ found = pkt->trySatisfyFunctional(i->pkt);
++i;
}
/** Check the list of buffered packets against the supplied
* functional request. */
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
/**
* Schedule a send event if we are not already waiting for a
/** Check the list of buffered packets against the supplied
* functional request. */
- bool checkFunctional(PacketPtr pkt)
- { return respQueue.checkFunctional(pkt); }
+ bool trySatisfyFunctional(PacketPtr pkt)
+ { return respQueue.trySatisfyFunctional(pkt); }
};
/**
/** Check the list of buffered packets against the supplied
* functional request. */
- bool checkFunctional(PacketPtr pkt)
+ bool trySatisfyFunctional(PacketPtr pkt)
{
- return reqQueue.checkFunctional(pkt) ||
- snoopRespQueue.checkFunctional(pkt);
+ return reqQueue.trySatisfyFunctional(pkt) ||
+ snoopRespQueue.trySatisfyFunctional(pkt);
}
};
int num_functional_writes = 0;
// Check the buffer from the controller to the memory.
- if (memoryPort.checkFunctional(pkt)) {
+ if (memoryPort.trySatisfyFunctional(pkt)) {
num_functional_writes++;
}
// check the response queue
for (auto i = transmitList.begin(); i != transmitList.end(); ++i) {
- if (pkt->checkFunctional((*i).pkt)) {
+ if (pkt->trySatisfyFunctional((*i).pkt)) {
pkt->makeResponse();
return;
}
}
// also check the master port's request queue
- if (masterPort.checkFunctional(pkt)) {
+ if (masterPort.trySatisfyFunctional(pkt)) {
return;
}
}
bool
-SerialLink::SerialLinkMasterPort::checkFunctional(PacketPtr pkt)
+SerialLink::SerialLinkMasterPort::trySatisfyFunctional(PacketPtr pkt)
{
bool found = false;
auto i = transmitList.begin();
while (i != transmitList.end() && !found) {
- if (pkt->checkFunctional((*i).pkt)) {
+ if (pkt->trySatisfyFunctional((*i).pkt)) {
pkt->makeResponse();
found = true;
}
*
* @return true if we find a match
*/
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
protected:
auto p = packetQueue.begin();
// potentially update the packets in our packet queue as well
while (!done && p != packetQueue.end()) {
- done = pkt->checkFunctional(p->pkt);
+ done = pkt->trySatisfyFunctional(p->pkt);
++p;
}
void
SimpleTimingPort::recvFunctional(PacketPtr pkt)
{
- if (!respQueue.checkFunctional(pkt)) {
+ if (!respQueue.trySatisfyFunctional(pkt)) {
// do an atomic access and throw away the returned latency
recvAtomic(pkt);
}