Hi,
I want to initiate/new/request a prefetch somewhere in the code like this:

Request *pfReq = new Request(thAddr, cacheBlkSize, Request::PREFETCH);
PacketPtr pkt = new Packet(pfReq, MemCmd::HardPFReq, Packet::Broadcast);
dcachePort->sendTiming(pkt);

Problem is, this request hits MSHR in this part of code:

    ...
    } else {
        // miss
        Addr blk_addr = blockAlign(pkt->getAddr());
        MSHR *mshr = mshrQueue.findMatch(blk_addr);
        if (mshr) {
            // MSHR hit
            //@todo remove hw_pf here
            mshr_hits[pkt->cmdToIndex()][0/*pkt->req->threadId()*/]++;
            if (mshr->threadNum != 0/*pkt->req->threadId()*/) {
                mshr->threadNum = -1;
            }
            mshr->allocateTarget(pkt, time, order++);

and causes a failure in allocateTarget() because this function first want
to be sure this request is not HardPFReq.

assert(pkt->cmd != MemCmd::HardPFReq);

That mean I am not able to request for a prefetch anywhere I want. Right?
Why it is not possible then?
--
// Naderan *Mahmood;
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to