/*
- * Copyright (c) 2011-2014 ARM Limited
+ * Copyright (c) 2011-2015 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* Declare the layers of this crossbar, one vector for requests
* and one for responses.
*/
- typedef Layer<SlavePort,MasterPort> ReqLayer;
- typedef Layer<MasterPort,SlavePort> RespLayer;
std::vector<ReqLayer*> reqLayers;
std::vector<RespLayer*> respLayers;
* will be instantiated for each of the master ports connecting to
* the crossbar.
*/
- class NoncoherentXBarSlavePort : public SlavePort
+ class NoncoherentXBarSlavePort : public QueuedSlavePort
{
private:
/** A reference to the crossbar to which this port belongs. */
NoncoherentXBar &xbar;
+ /** A normal packet queue used to store responses. */
+ RespPacketQueue queue;
+
public:
NoncoherentXBarSlavePort(const std::string &_name,
NoncoherentXBar &_xbar, PortID _id)
- : SlavePort(_name, &_xbar, _id), xbar(_xbar)
+ : QueuedSlavePort(_name, &_xbar, queue, _id), xbar(_xbar),
+ queue(_xbar, *this)
{ }
protected:
virtual void recvFunctional(PacketPtr pkt)
{ xbar.recvFunctional(pkt, id); }
- /**
- * When receiving a retry, pass it to the crossbar.
- */
- virtual void recvRetry()
- { panic("Crossbar slave ports should never retry.\n"); }
-
/**
* Return the union of all adress ranges seen by this crossbar.
*/
/** 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); }
};
/** 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);
/** Function called by the port when the crossbar is recieving a Atomic
transaction.*/
virtual ~NoncoherentXBar();
- unsigned int drain(DrainManager *dm);
-
/**
* stats
*/