Update statistics to use cycles properly instead of ticks
[gem5.git] / src / mem / mem_object.hh
index ec6fa2b2aea0230e2b78d1288b7cde5605ddc6d5..33b56dfd4094c9637b262fe96c1c8bf3a9abfb44 100644 (file)
@@ -36,8 +36,9 @@
 #ifndef __MEM_MEM_OBJECT_HH__
 #define __MEM_MEM_OBJECT_HH__
 
-#include "sim/sim_object.hh"
 #include "mem/port.hh"
+#include "params/MemObject.hh"
+#include "sim/sim_object.hh"
 
 /**
  * The base MemoryObject class, allows for an accesor function to a
 class MemObject : public SimObject
 {
   public:
-    MemObject(const std::string &name);
+    typedef MemObjectParams Params;
+    MemObject(const Params *params);
+
+    const Params *
+    params() const
+    {
+        return dynamic_cast<const Params *>(_params);
+    }
+
+  protected:
+    // static: support for old-style constructors (call manually)
+    static Params *makeParams(const std::string &name);
 
   public:
     /** Additional function to return the Port of a memory object. */