MemTest::CpuPort::recvFunctional(Packet *pkt)
{
//Do nothing if we see one come through
- if (curTick != 0)//Supress warning durring initialization
- warn("Functional Writes not implemented in MemTester\n");
+// if (curTick != 0)//Supress warning durring initialization
+// warn("Functional Writes not implemented in MemTester\n");
//Need to find any response values that intersect and update
return;
}
} else {
paddr = ((base) ? baseAddr1 : baseAddr2) + offset;
}
- //bool probe = (random() % 2 == 1) && !req->isUncacheable();
- bool probe = false;
+ bool probe = (random() % 2 == 1) && !(flags & UNCACHEABLE);
+ //bool probe = false;
paddr &= ~((1 << access_size) - 1);
req->setPhys(paddr, 1 << access_size, flags);
if (probe) {
cachePort.sendFunctional(pkt);
+ pkt->makeAtomicResponse();
completeRequest(pkt);
} else {
// req->completionEvent = new MemCompleteEvent(req, result, this);
if (probe) {
cachePort.sendFunctional(pkt);
+ pkt->makeAtomicResponse();
completeRequest(pkt);
} else {
// req->completionEvent = new MemCompleteEvent(req, NULL, this);
if (pkt->isWrite()) {
memcpy(pkt_data, write_data, data_size);
} else {
+ pkt->flags |= SATISFIED;
+ pkt->result = Packet::Success;
memcpy(write_data, pkt_data, data_size);
}
}
if (pkt->isWrite()) {
memcpy(pkt_data, write_data, data_size);
} else {
+ pkt->flags |= SATISFIED;
+ pkt->result = Packet::Success;
memcpy(write_data, pkt_data, data_size);
}
}
}
+ if (pkt->isRead()
+ && pkt->result != Packet::Success
+ && otherSidePort == memSidePort) {
+ otherSidePort->sendFunctional(pkt);
+ assert(pkt->result == Packet::Success);
+ }
return 0;
} else if (!blk) {
// update the cache state and statistics