{
protected:
- /**
- * A bridge request state stores packets along with their sender
- * state and original source. It has enough information to also
- * restore the response once it comes back to the bridge.
- */
- class RequestState : public Packet::SenderState
- {
-
- public:
-
- const PortID origSrc;
-
- RequestState(PortID orig_src) : origSrc(orig_src)
- { }
-
- };
-
/**
* A deferred packet stores a packet along with its scheduled
* transmission time
/** Max queue size for reserved responses. */
unsigned int respQueueLimit;
+ /**
+ * Upstream caches need this packet until true is returned, so
+ * hold it for deletion until a subsequent call
+ */
+ std::unique_ptr<Packet> pendingDelete;
+
/**
* Is this side blocked from accepting new response packets.
*
void trySendTiming();
/** Send event for the response queue. */
- EventWrapper<BridgeSlavePort,
- &BridgeSlavePort::trySendTiming> sendEvent;
+ EventFunctionWrapper sendEvent;
public:
/** When receiving a retry request from the peer port,
pass it to the bridge. */
- void recvRetry();
+ void recvRespRetry();
/** When receiving a Atomic requestfrom the peer port,
pass it to the bridge. */
void trySendTiming();
/** Send event for the request queue. */
- EventWrapper<BridgeMasterPort,
- &BridgeMasterPort::trySendTiming> sendEvent;
+ EventFunctionWrapper sendEvent;
public:
*
* @return true if we find a match
*/
- bool checkFunctional(PacketPtr pkt);
+ bool trySatisfyFunctional(PacketPtr pkt);
protected:
/** When receiving a retry request from the peer port,
pass it to the bridge. */
- void recvRetry();
+ void recvReqRetry();
};
/** Slave port of the bridge. */
public:
- virtual BaseMasterPort& getMasterPort(const std::string& if_name,
- PortID idx = InvalidPortID);
- virtual BaseSlavePort& getSlavePort(const std::string& if_name,
- PortID idx = InvalidPortID);
+ Port &getPort(const std::string &if_name,
+ PortID idx=InvalidPortID) override;
- virtual void init();
+ void init() override;
typedef BridgeParams Params;