#include "mem/cache/base_cache.hh"
#include "cpu/smt.hh"
#include "cpu/base.hh"
+#include "mem/cache/miss/mshr.hh"
using namespace std;
}
pkt = cache->getPacket();
MSHR* mshr = (MSHR*)pkt->senderState;
+ //Copy the packet, it may be modified/destroyed elsewhere
+ Packet * copyPkt = new Packet(*pkt);
+ copyPkt->dataStatic<uint8_t>(pkt->getPtr<uint8_t>());
+ mshr->pkt = copyPkt;
bool success = sendTiming(pkt);
DPRINTF(Cache, "Address %x was %s in sending the timing request\n",
pkt->getAddr(), success ? "succesful" : "unsuccesful");
pkt = cachePort->cache->getPacket();
MSHR* mshr = (MSHR*) pkt->senderState;
+ //Copy the packet, it may be modified/destroyed elsewhere
+ Packet * copyPkt = new Packet(*pkt);
+ copyPkt->dataStatic<uint8_t>(pkt->getPtr<uint8_t>());
+ mshr->pkt = copyPkt;
+
bool success = cachePort->sendTiming(pkt);
DPRINTF(Cache, "Address %x was %s in sending the timing request\n",
pkt->getAddr(), success ? "succesful" : "unsuccesful");
Cache<TagStore,Buffering,Coherence>::sendResult(PacketPtr &pkt, MSHR* mshr, bool success)
{
if (success && !(pkt->flags & NACKED_LINE)) {
- missQueue->markInService(pkt, mshr);
+ missQueue->markInService(mshr->pkt, mshr);
//Temp Hack for UPGRADES
- if (pkt->cmd == Packet::UpgradeReq) {
+ if (mshr->pkt->cmd == Packet::UpgradeReq) {
pkt->flags &= ~CACHE_LINE_FILL;
BlkType *blk = tags->findBlock(pkt);
CacheBlk::State old_state = (blk) ? blk->status : 0;
{
BlkType *blk = NULL;
if (pkt->senderState) {
+ //Delete temp copy in MSHR, restore it.
+ delete ((MSHR*)pkt->senderState)->pkt;
((MSHR*)pkt->senderState)->pkt = pkt;
if (pkt->result == Packet::Nacked) {
//pkt->reinitFromRequest();