diff options
author | Stephan Diestelhorst <stephan.diestelhorst@arm.com> | 2015-03-02 04:00:31 -0500 |
---|---|---|
committer | Stephan Diestelhorst <stephan.diestelhorst@arm.com> | 2015-03-02 04:00:31 -0500 |
commit | de46eeade74746aa4939ce9522b3c50a609f3be5 (patch) | |
tree | 4b2ef060e668ff3899138742b251716b60cf632d | |
parent | eed0795f3abf6da71ba62307ae29c975b4ad9246 (diff) | |
download | gem5-de46eeade74746aa4939ce9522b3c50a609f3be5.tar.xz |
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.
-rw-r--r-- | src/cpu/testers/traffic_gen/generators.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cpu/testers/traffic_gen/generators.cc b/src/cpu/testers/traffic_gen/generators.cc index f0cf14206..300bcc122 100644 --- a/src/cpu/testers/traffic_gen/generators.cc +++ b/src/cpu/testers/traffic_gen/generators.cc @@ -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); |