mem-cache: Add match functions to QueueEntry
[gem5.git] / src / mem / external_slave.hh
index d1782237c8ed88b089e3415ed3fbc46bb7416276..cfe89b98a27a65519de8d33900920819fcdccd91 100644 (file)
@@ -57,8 +57,8 @@
  * object).
  */
 
-#ifndef __MEM_EXTERNAL_SLAVE__
-#define __MEM_EXTERNAL_SLAVE__
+#ifndef __MEM_EXTERNAL_SLAVE_HH__
+#define __MEM_EXTERNAL_SLAVE_HH__
 
 #include "mem/mem_object.hh"
 #include "params/ExternalSlave.hh"
@@ -67,18 +67,18 @@ class ExternalSlave : public MemObject
 {
   public:
     /** Derive from this class to create an external port interface */
-    class Port : public SlavePort
+    class ExternalPort : public SlavePort
     {
       protected:
         ExternalSlave &owner;
 
       public:
-        Port(const std::string &name_,
+        ExternalPort(const std::string &name_,
             ExternalSlave &owner_) :
             SlavePort(name_, &owner_), owner(owner_)
         { }
 
-        ~Port() { }
+        ~ExternalPort() { }
 
         /** Any or all of recv... can be overloaded to provide the port's
          *  functionality */
@@ -95,14 +95,14 @@ class ExternalSlave : public MemObject
       public:
         /** Create or find an external port which can be bound.  Returns
          *  NULL on failure */
-        virtual Port *getExternalPort(
+        virtual ExternalPort *getExternalPort(
             const std::string &name, ExternalSlave &owner,
             const std::string &port_data) = 0;
     };
 
   protected:
     /** The peer port for the gem5 port "port" */
-    Port *externalPort;
+    ExternalPort *externalPort;
 
     /** Name of the bound port.  This will be name() + ".port" */
     std::string portName;
@@ -126,17 +126,17 @@ class ExternalSlave : public MemObject
   public:
     ExternalSlave(ExternalSlaveParams *params);
 
-    /** SlavePort interface.  Responds only to port "port" */
-    BaseSlavePort &getSlavePort(const std::string &if_name,
-        PortID idx = InvalidPortID);
+    /** Port interface.  Responds only to port "port" */
+    Port &getPort(const std::string &if_name,
+                  PortID idx=InvalidPortID) override;
 
     /** Register a handler which can provide ports with port_type ==
      *  handler_name */
     static void registerHandler(const std::string &handler_name,
         Handler *handler);
 
-    void init();
+    void init() override;
 };
 
 
-#endif // __MEM_EXTERNAL_SLAVE__
+#endif //__MEM_EXTERNAL_SLAVE_HH__