mem: Change warmupCycle stat to warmupTick
[gem5.git] / src / mem / se_translating_port_proxy.hh
index ce55ed794ca9eb85e301f55118b08fcf16f3a5a5..41f92a665f1394917aae8b88ccb86792aa21529e 100644 (file)
 #ifndef __MEM_SE_TRANSLATING_PORT_PROXY_HH__
 #define __MEM_SE_TRANSLATING_PORT_PROXY_HH__
 
-#include "mem/port_proxy.hh"
+#include "mem/translating_port_proxy.hh"
 
-class EmulationPageTable;
-class Process;
-
-/**
- * @file
- * TranslatingPortProxy Object Declaration for SE.
- *
- * Port proxies are used when non structural entities need access to
- * the memory system. Proxy objects replace the previous
- * FunctionalPort, TranslatingPort and VirtualPort objects, which
- * provided the same functionality as the proxies, but were instances
- * of ports not corresponding to real structural ports of the
- * simulated system. Via the port proxies all the accesses go through
- * an actual port and thus are transparent to a potentially
- * distributed memory and automatically adhere to the memory map of
- * the system.
- */
-class SETranslatingPortProxy : public PortProxy
+class SETranslatingPortProxy : public TranslatingPortProxy
 {
 
   public:
@@ -71,21 +54,14 @@ class SETranslatingPortProxy : public PortProxy
     };
 
   private:
-    EmulationPageTable *pTable;
-    Process *process;
     AllocType allocating;
 
-  public:
-    SETranslatingPortProxy(SendFunctionalFunc func,
-                           Process* p, AllocType alloc);
-    SETranslatingPortProxy(MasterPort &port, Process* p, AllocType alloc);
-    ~SETranslatingPortProxy() {}
+  protected:
+    bool fixupAddr(Addr addr, BaseTLB::Mode mode) const override;
 
-    void setPageTable(EmulationPageTable *p) { pTable = p; }
-    void setProcess(Process *p) { process = p; }
-    bool tryReadBlob(Addr addr, void *p, int size) const override;
-    bool tryWriteBlob(Addr addr, const void *p, int size) const override;
-    bool tryMemsetBlob(Addr addr, uint8_t val, int size) const override;
+  public:
+    SETranslatingPortProxy(ThreadContext *tc, AllocType alloc=NextPage,
+                           Request::Flags _flags=0);
 };
 
 #endif // __MEM_SE_TRANSLATING_PORT_PROXY_HH__