summaryrefslogtreecommitdiff
path: root/src/mem/bridge.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-11-06 03:26:35 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2015-11-06 03:26:35 -0500
commit8bc925e36d0e5de7e70a6d5bf2b1824649932599 (patch)
tree8ffddb6d34d4c574e9d43b75c5be804a1d0d328e /src/mem/bridge.cc
parent8e55d51aaa71d71c7058e8ee15c89d3482991ba2 (diff)
downloadgem5-8bc925e36d0e5de7e70a6d5bf2b1824649932599.tar.xz
mem: Align rules for sinking inhibited packets at the slave
This patch aligns how the memory-system slaves, i.e. the various memory controllers and the bridge, identify and deal with sinking of inhibited packets that are only useful within the coherent part of the memory system. In the future we could shift the onus to the crossbar, and add a parameter "is_point_of_coherence" that would allow it to sink the aforementioned packets.
Diffstat (limited to 'src/mem/bridge.cc')
-rw-r--r--src/mem/bridge.cc21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/mem/bridge.cc b/src/mem/bridge.cc
index ecaf6de04..855f39de3 100644
--- a/src/mem/bridge.cc
+++ b/src/mem/bridge.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 ARM Limited
+ * Copyright (c) 2011-2013, 2015 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -150,8 +150,20 @@ Bridge::BridgeSlavePort::recvTimingReq(PacketPtr pkt)
DPRINTF(Bridge, "recvTimingReq: %s addr 0x%x\n",
pkt->cmdString(), pkt->getAddr());
- // we should not see a timing request if we are already in a retry
- assert(!retryReq);
+ // sink inhibited packets without further action, also discard any
+ // packet that is not a read or a write
+ if (pkt->memInhibitAsserted() ||
+ !(pkt->isWrite() || pkt->isRead())) {
+ assert(!pkt->needsResponse());
+ pendingDelete.reset(pkt);
+ return true;
+ }
+
+ // we should not get a new request after committing to retry the
+ // current one, but unfortunately the CPU violates this rule, so
+ // simply ignore it for now
+ if (retryReq)
+ return false;
DPRINTF(Bridge, "Response queue size: %d outresp: %d\n",
transmitList.size(), outstandingResponses);
@@ -162,8 +174,7 @@ Bridge::BridgeSlavePort::recvTimingReq(PacketPtr pkt)
retryReq = true;
} else {
// look at the response queue if we expect to see a response
- bool expects_response = pkt->needsResponse() &&
- !pkt->memInhibitAsserted();
+ bool expects_response = pkt->needsResponse();
if (expects_response) {
if (respQueueFull()) {
DPRINTF(Bridge, "Response queue full\n");