x86: changes to apic, keyboard
[gem5.git] / src / mem / qport.hh
index 6ee71a572d36cc48bfc0c1712cea44875e02cbab..dd5caa084d07fb6343a09e566d8c6347aa665bda 100644 (file)
@@ -62,7 +62,7 @@ class QueuedSlavePort : public SlavePort
   protected:
 
     /** Packet queue used to store outgoing requests and responses. */
-    PacketQueue &queue;
+    SlavePacketQueue &queue;
 
      /** This function is notification that the device should attempt to send a
       * packet again. */
@@ -78,23 +78,26 @@ class QueuedSlavePort : public SlavePort
      * QueuePort constructor.
      */
     QueuedSlavePort(const std::string& name, MemObject* owner,
-                    PacketQueue &queue) :
+                    SlavePacketQueue &queue) :
         SlavePort(name, owner), queue(queue)
     { }
 
     virtual ~QueuedSlavePort() { }
 
+    /**
+     * Schedule the sending of a timing response.
+     *
+     * @param pkt Packet to send
+     * @param when Absolute time (in ticks) to send packet
+     */
+    void schedTimingResp(PacketPtr pkt, Tick when)
+    { queue.schedSendTiming(pkt, when); }
+
     /** Check the list of buffered packets against the supplied
      * functional request. */
     bool checkFunctional(PacketPtr pkt) { return queue.checkFunctional(pkt); }
 
-    /**
-     * Hook for draining the queued port.
-     *
-     * @param de an event which is used to signal back to the caller
-     * @returns a number indicating how many times process will be called
-     */
-    unsigned int drain(Event *de) { return queue.drain(de); }
+    unsigned int drain(DrainManager *dm) { return queue.drain(dm); }
 };
 
 class QueuedMasterPort : public MasterPort
@@ -103,7 +106,7 @@ class QueuedMasterPort : public MasterPort
   protected:
 
     /** Packet queue used to store outgoing requests and responses. */
-    PacketQueue &queue;
+    MasterPacketQueue &queue;
 
      /** This function is notification that the device should attempt to send a
       * packet again. */
@@ -119,23 +122,35 @@ class QueuedMasterPort : public MasterPort
      * QueuePort constructor.
      */
     QueuedMasterPort(const std::string& name, MemObject* owner,
-                    PacketQueue &queue) :
+                     MasterPacketQueue &queue) :
         MasterPort(name, owner), queue(queue)
     { }
 
     virtual ~QueuedMasterPort() { }
 
-    /** Check the list of buffered packets against the supplied
-     * functional request. */
-    bool checkFunctional(PacketPtr pkt) { return queue.checkFunctional(pkt); }
+    /**
+     * Schedule the sending of a timing request.
+     *
+     * @param pkt Packet to send
+     * @param when Absolute time (in ticks) to send packet
+     */
+    void schedTimingReq(PacketPtr pkt, Tick when)
+    { queue.schedSendTiming(pkt, when); }
 
     /**
-     * Hook for draining the queued port.
+     * Schedule the sending of a timing snoop response.
      *
-     * @param de an event which is used to signal back to the caller
-     * @returns a number indicating how many times process will be called
+     * @param pkt Packet to send
+     * @param when Absolute time (in ticks) to send packet
      */
-    unsigned int drain(Event *de) { return queue.drain(de); }
+    void schedTimingSnoopResp(PacketPtr pkt, Tick when)
+    { queue.schedSendTiming(pkt, when, true); }
+
+    /** Check the list of buffered packets against the supplied
+     * functional request. */
+    bool checkFunctional(PacketPtr pkt) { return queue.checkFunctional(pkt); }
+
+    unsigned int drain(DrainManager *dm) { return queue.drain(dm); }
 };
 
 #endif // __MEM_QPORT_HH__