cpu: Add a PC-value to the traffic generator requests
Have the traffic generator add its masterID as the PC address to the requests. That way, prefetchers (and other components) that use a PC for request classification will see per-tester streams of requests. This enables us to test strided prefetchers with the memchecker, too.
This commit is contained in:
parent
eed0795f3a
commit
de46eeade7
1 changed files with 3 additions and 0 deletions
|
@ -57,6 +57,9 @@ BaseGen::getPacket(Addr addr, unsigned size, const MemCmd& cmd,
|
|||
{
|
||||
// Create new request
|
||||
Request *req = new Request(addr, size, flags, masterID);
|
||||
// Dummy PC to have PC-based prefetchers latch on; get entropy into higher
|
||||
// bits
|
||||
req->setPC(((Addr)masterID) << 2);
|
||||
|
||||
// Embed it in a packet
|
||||
PacketPtr pkt = new Packet(req, cmd);
|
||||
|
|
Loading…
Reference in a new issue