cpu: Apply the ARM TLB rework to the O3 checker CPU.
[gem5.git] / src / mem / external_slave.hh
index d1782237c8ed88b089e3415ed3fbc46bb7416276..ab33fc53b05d1831c3461dabaff14c298f867eb4 100644 (file)
  * 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 "mem/port.hh"
 #include "params/ExternalSlave.hh"
+#include "sim/sim_object.hh"
 
-class ExternalSlave : public MemObject
+class ExternalSlave : public SimObject
 {
   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 +96,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 +127,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__