changeset d4090f0cab30 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=d4090f0cab30
description:
        cpu: Ensure the traffic generator suppresses non-memory packets

        This patch adds a check to ensure that packets which are not going to
        a memory range are suppressed in the traffic generator. Thus, if a
        trace is collected in full-system, the packets destined for devices
        are not played back.

diffstat:

 src/cpu/testers/traffic_gen/traffic_gen.cc |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r 0d0be755dda8 -r d4090f0cab30 src/cpu/testers/traffic_gen/traffic_gen.cc
--- a/src/cpu/testers/traffic_gen/traffic_gen.cc        Sun Aug 10 05:38:59 
2014 -0400
+++ b/src/cpu/testers/traffic_gen/traffic_gen.cc        Sun Aug 10 05:39:04 
2014 -0400
@@ -187,10 +187,18 @@
         assert(curTick() >= nextPacketTick);
         // get the next packet and try to send it
         PacketPtr pkt = states[currState]->getNextPacket();
-        numPackets++;
-        if (!port.sendTimingReq(pkt)) {
-            retryPkt = pkt;
-            retryPktTick = curTick();
+
+        // suppress packets that are not destined for a memory, such as
+        // device accesses that could be part of a trace
+        if (system->isMemAddr(pkt->getAddr())) {
+            numPackets++;
+            if (!port.sendTimingReq(pkt)) {
+                retryPkt = pkt;
+                retryPktTick = curTick();
+            }
+        } else {
+            DPRINTF(TrafficGen, "Suppressed packet %s 0x%x\n",
+                    pkt->cmdString(), pkt->getAddr());
         }
     }
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to