diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-03-02 04:00:35 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-03-02 04:00:35 -0500 |
commit | f26a28929583f2ed7fb55521e49c3f9bef557c05 (patch) | |
tree | e5d71fc69566b02a394015776b0f3f4e3be81427 /src/mem/coherent_xbar.hh | |
parent | 6ebe8d863ae0c5a7799e9421da32593ac35e1cc7 (diff) | |
download | gem5-f26a28929583f2ed7fb55521e49c3f9bef557c05.tar.xz |
mem: Split port retry for all different packet classes
This patch fixes a long-standing isue with the port flow
control. Before this patch the retry mechanism was shared between all
different packet classes. As a result, a snoop response could get
stuck behind a request waiting for a retry, even if the send/recv
functions were split. This caused message-dependent deadlocks in
stress-test scenarios.
The patch splits the retry into one per packet (message) class. Thus,
sendTimingReq has a corresponding recvReqRetry, sendTimingResp has
recvRespRetry etc. Most of the changes to the code involve simply
clarifying what type of request a specific object was accepting.
The biggest change in functionality is in the cache downstream packet
queue, facing the memory. This queue was shared by requests and snoop
responses, and it is now split into two queues, each with their own
flow control, but the same physical MasterPort. These changes fixes
the previously seen deadlocks.
Diffstat (limited to 'src/mem/coherent_xbar.hh')
-rw-r--r-- | src/mem/coherent_xbar.hh | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mem/coherent_xbar.hh b/src/mem/coherent_xbar.hh index 446c0b577..ffe4a066b 100644 --- a/src/mem/coherent_xbar.hh +++ b/src/mem/coherent_xbar.hh @@ -75,12 +75,9 @@ class CoherentXBar : public BaseXBar * Declare the layers of this crossbar, one vector for requests, * one for responses, and one for snoop responses */ - typedef Layer<SlavePort,MasterPort> ReqLayer; - typedef Layer<MasterPort,SlavePort> RespLayer; - typedef Layer<SlavePort,MasterPort> SnoopLayer; std::vector<ReqLayer*> reqLayers; std::vector<RespLayer*> respLayers; - std::vector<SnoopLayer*> snoopLayers; + std::vector<SnoopRespLayer*> snoopLayers; /** * Declaration of the coherent crossbar slave port type, one will @@ -131,7 +128,7 @@ class CoherentXBar : public BaseXBar /** * When receiving a retry, pass it to the crossbar. */ - virtual void recvRetry() + virtual void recvRespRetry() { panic("Crossbar slave ports should never retry.\n"); } /** @@ -202,8 +199,8 @@ class CoherentXBar : public BaseXBar /** When reciving a retry from the peer port (at id), pass it to the crossbar. */ - virtual void recvRetry() - { xbar.recvRetry(id); } + virtual void recvReqRetry() + { xbar.recvReqRetry(id); } }; @@ -233,14 +230,15 @@ class CoherentXBar : public BaseXBar * Override the sending of retries and pass them on through * the mirrored slave port. */ - void sendRetry() { - slavePort.sendRetry(); + void sendRetryResp() { + // forward it as a snoop response retry + slavePort.sendRetrySnoopResp(); } /** * Provided as necessary. */ - void recvRetry() { panic("SnoopRespPort should never see retry\n"); } + void recvReqRetry() { panic("SnoopRespPort should never see retry\n"); } /** * Provided as necessary. @@ -292,7 +290,7 @@ class CoherentXBar : public BaseXBar /** Timing function called by port when it is once again able to process * requests. */ - void recvRetry(PortID master_port_id); + void recvReqRetry(PortID master_port_id); /** * Forward a timing packet to our snoopers, potentially excluding |