diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-05-07 18:58:38 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-05-07 18:58:38 -0400 |
commit | a38c79ec22918b02c529c930827e64e440984d29 (patch) | |
tree | 47769ccbbb1113f7ab408f46512a0d1060c9e698 /src/mem/bridge.hh | |
parent | 0dfc29a023ff407846ea4f200547e2b2d9de9c1a (diff) | |
download | gem5-a38c79ec22918b02c529c930827e64e440984d29.tar.xz |
the bridge never returns false when recvTiming() is called on its ports now, it always returns true and nacks the packet if there isn't sufficient buffer space
fix the timing cpu to handle receiving a nacked packet
src/cpu/simple/timing.cc:
make the timing cpu handle receiving a nacked packet
src/mem/bridge.cc:
src/mem/bridge.hh:
the bridge never returns false when recvTiming() is called on its ports now, it always returns true and nacks the packet if there isn't sufficient buffer space
--HG--
extra : convert_revision : 5e12d0cf6ce985a5f72bcb7ce26c83a76c34c50a
Diffstat (limited to 'src/mem/bridge.hh')
-rw-r--r-- | src/mem/bridge.hh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh index d1154eda0..1fa9cdffc 100644 --- a/src/mem/bridge.hh +++ b/src/mem/bridge.hh @@ -79,13 +79,16 @@ class Bridge : public MemObject bool partialWriteFixed; PacketPtr oldPkt; + bool nacked; - PacketBuffer(PacketPtr _pkt, Tick t) + PacketBuffer(PacketPtr _pkt, Tick t, bool nack = false) : ready(t), pkt(_pkt), origSenderState(_pkt->senderState), origSrc(_pkt->getSrc()), - expectResponse(_pkt->needsResponse()), partialWriteFixed(false) + expectResponse(_pkt->needsResponse() && !nack), + partialWriteFixed(false), nacked(nack) + { - if (!pkt->isResponse()) + if (!pkt->isResponse() && !nack) pkt->senderState = this; } @@ -144,6 +147,7 @@ class Bridge : public MemObject std::list<PacketBuffer*> sendQueue; int outstandingResponses; + int queuedRequests; /** Max queue size for outbound packets */ int queueLimit; @@ -151,12 +155,14 @@ class Bridge : public MemObject /** * Is this side blocked from accepting outbound packets? */ - bool queueFull() { return (sendQueue.size() == queueLimit); } + bool queueFull(); - bool queueForSendTiming(PacketPtr pkt); + void queueForSendTiming(PacketPtr pkt); void finishSend(PacketBuffer *buf); + void nackRequest(PacketPtr pkt); + /** * Handle send event, scheduled when the packet at the head of * the outbound queue is ready to transmit (for timing |