From 995e6e4670f52c52f798320055d74994e6539cda Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 9 Jul 2012 12:35:36 -0400 Subject: Bus: Add a notion of layers to the buses This patch moves all flow control, arbitration and state information into a bus layer. The layer is thus responsible for all the state transitions, and for keeping hold of the retry list. Consequently the layer is also responsible for the draining. With this change, the non-coherent and coherent bus are given a single layer to avoid changing any temporal behaviour, but the patch opens up for adding more layers. --- src/mem/coherent_bus.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mem/coherent_bus.hh') diff --git a/src/mem/coherent_bus.hh b/src/mem/coherent_bus.hh index 460afd828..b5f0cdee5 100644 --- a/src/mem/coherent_bus.hh +++ b/src/mem/coherent_bus.hh @@ -69,6 +69,11 @@ class CoherentBus : public BaseBus protected: + /** + * Declare the single layer of this bus. + */ + Layer layer; + /** * Declaration of the coherent bus slave port type, one will be * instantiated for each of the master ports connecting to the @@ -231,6 +236,10 @@ class CoherentBus : public BaseBus snoop response.*/ virtual bool recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id); + /** Timing function called by port when it is once again able to process + * requests. */ + void recvRetry(); + /** * Forward a timing packet to our snoopers, potentially excluding * one of the connected coherent masters to avoid sending a packet @@ -285,6 +294,8 @@ class CoherentBus : public BaseBus virtual void init(); CoherentBus(const CoherentBusParams *p); + + unsigned int drain(Event *de); }; #endif //__MEM_COHERENT_BUS_HH__ -- cgit v1.2.3