mem: Change warmupCycle stat to warmupTick
[gem5.git] / src / mem / se_translating_port_proxy.hh
index 5ac6b528678ae8c2e157999788b79061e9a55ba0..41f92a665f1394917aae8b88ccb86792aa21529e 100644 (file)
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Ron Dreslinski
- *          Ali Saidi
- *          Andreas Hansson
  */
 
 #ifndef __MEM_SE_TRANSLATING_PORT_PROXY_HH__
 #define __MEM_SE_TRANSLATING_PORT_PROXY_HH__
 
-#include "mem/port_proxy.hh"
-
-class PageTableBase;
-class Process;
+#include "mem/translating_port_proxy.hh"
 
-/**
- * @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:
@@ -75,28 +54,14 @@ class SETranslatingPortProxy : public PortProxy
     };
 
   private:
-    PageTableBase *pTable;
-    Process *process;
     AllocType allocating;
 
-  public:
-    SETranslatingPortProxy(MasterPort& port, Process* p, AllocType alloc);
-    virtual ~SETranslatingPortProxy();
-
-    void setPageTable(PageTableBase *p) { pTable = p; }
-    void setProcess(Process *p) { process = p; }
-    bool tryReadBlob(Addr addr, uint8_t *p, int size) const;
-    bool tryWriteBlob(Addr addr, const uint8_t *p, int size) const;
-    bool tryMemsetBlob(Addr addr, uint8_t val, int size) const;
-    bool tryWriteString(Addr addr, const char *str) const;
-    bool tryReadString(std::string &str, Addr addr) const;
+  protected:
+    bool fixupAddr(Addr addr, BaseTLB::Mode mode) const override;
 
-    virtual void readBlob(Addr addr, uint8_t *p, int size) const;
-    virtual void writeBlob(Addr addr, const uint8_t *p, int size) const;
-    virtual void memsetBlob(Addr addr, uint8_t val, int size) const;
-
-    void writeString(Addr addr, const char *str) const;
-    void readString(std::string &str, Addr addr) const;
+  public:
+    SETranslatingPortProxy(ThreadContext *tc, AllocType alloc=NextPage,
+                           Request::Flags _flags=0);
 };
 
 #endif // __MEM_SE_TRANSLATING_PORT_PROXY_HH__