summaryrefslogtreecommitdiff
path: root/src/cpu/testers
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-08-10 05:39:04 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2014-08-10 05:39:04 -0400
commit47313601c1e4640b65d3974b7e06b9d7c7707742 (patch)
tree228500b4311b41f1172e5e5c88a0f815ef01fca6 /src/cpu/testers
parentd45ab59c29b918753b64f65448cd04b1cc3c6aba (diff)
downloadgem5-47313601c1e4640b65d3974b7e06b9d7c7707742.tar.xz
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 (limited to 'src/cpu/testers')
-rw-r--r--src/cpu/testers/traffic_gen/traffic_gen.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/cpu/testers/traffic_gen/traffic_gen.cc b/src/cpu/testers/traffic_gen/traffic_gen.cc
index d53c9b000..c1ce0d6d4 100644
--- a/src/cpu/testers/traffic_gen/traffic_gen.cc
+++ b/src/cpu/testers/traffic_gen/traffic_gen.cc
@@ -187,10 +187,18 @@ TrafficGen::update()
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());
}
}