73c73
< Port *getDcachePort() { return thread[0].getDcachePort(); }
---
> Port *getDcachePort() { return &dcachePort; }
260a261,269
> /** Returns if the cache is currently blocked. */
> bool cacheBlocked()
> { return retryTid != -1; }
>
> /** Sets the retry thread id, indicating that one of the LSQUnits
> * tried to access the cache but the cache was blocked. */
> void setRetryTid(int tid)
> { retryTid = tid; }
>
277c286,328
< private:
---
> /** DcachePort class for this LSQ. Handles doing the
> * communication with the cache/memory.
> */
> class DcachePort : public Port
> {
> protected:
> /** Pointer to LSQ. */
> LSQ *lsq;
>
> public:
> /** Default constructor. */
> DcachePort(LSQ *_lsq)
> : lsq(_lsq)
> { }
>
> protected:
> /** Atomic version of receive. Panics. */
> virtual Tick recvAtomic(PacketPtr pkt);
>
> /** Functional version of receive. Panics. */
> virtual void recvFunctional(PacketPtr pkt);
>
> /** Receives status change. Other than range changing, panics. */
> virtual void recvStatusChange(Status status);
>
> /** Returns the address ranges of this device. */
> virtual void getDeviceAddressRanges(AddrRangeList &resp,
> AddrRangeList &snoop)
> { resp.clear(); snoop.clear(); }
>
> /** Timing version of receive. Handles writing back and
> * completing the load or store that has returned from
> * memory. */
> virtual bool recvTiming(PacketPtr pkt);
>
> /** Handles doing a retry of the previous send. */
> virtual void recvRetry();
> };
>
> /** D-cache port. */
> DcachePort dcachePort;
>
> protected:
305a357,360
>
> /** The thread id of the LSQ Unit that is currently waiting for a
> * retry. */
> int retryTid;