mem-cache: Add match functions to QueueEntry
[gem5.git] / src / mem / external_master.hh
index 7303de062aadc1a7477677fe8c5476abefe149a5..f105054b417dcf32a672b69d50be471cc068b320 100644 (file)
@@ -57,8 +57,8 @@
  * The external port must provide a gem5 MasterPort interface.
  */
 
-#ifndef __MEM_EXTERNAL_MASTER__
-#define __MEM_EXTERNAL_MASTER__
+#ifndef __MEM_EXTERNAL_MASTER_HH__
+#define __MEM_EXTERNAL_MASTER_HH__
 
 #include "mem/mem_object.hh"
 #include "params/ExternalMaster.hh"
@@ -67,18 +67,18 @@ class ExternalMaster : public MemObject
 {
   public:
     /** Derive from this class to create an external port interface */
-    class Port : public MasterPort
+    class ExternalPort : public MasterPort
     {
       protected:
         ExternalMaster &owner;
 
       public:
-        Port(const std::string &name_,
+        ExternalPort(const std::string &name_,
             ExternalMaster &owner_) :
             MasterPort(name_, &owner_), owner(owner_)
         { }
 
-        ~Port() { }
+        ~ExternalPort() { }
 
         /** Any or all of recv... can be overloaded to provide the port's
          *  functionality */
@@ -93,14 +93,14 @@ class ExternalMaster : 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, ExternalMaster &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;
@@ -120,19 +120,19 @@ class ExternalMaster : public MemObject
   public:
     ExternalMaster(ExternalMasterParams *params);
 
-    /** MasterPort interface.  Responds only to port "port" */
-    BaseMasterPort &getMasterPort(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;
 
     const MasterID masterId;
 };
 
 
-#endif // __MEM_EXTERNAL_MASTER__
+#endif //__MEM_EXTERNAL_MASTER_HH__