summaryrefslogtreecommitdiff
path: root/src/mem/mem_object.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/mem_object.hh')
-rw-r--r--src/mem/mem_object.hh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mem/mem_object.hh b/src/mem/mem_object.hh
index ec6fa2b2a..79e555cda 100644
--- a/src/mem/mem_object.hh
+++ b/src/mem/mem_object.hh
@@ -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
@@ -46,8 +47,16 @@
class MemObject : public SimObject
{
public:
+ typedef MemObjectParams Params;
+ MemObject(const Params *params);
MemObject(const std::string &name);
+ const Params *
+ params() const
+ {
+ return dynamic_cast<const Params *>(_params);
+ }
+
public:
/** Additional function to return the Port of a memory object. */
virtual Port *getPort(const std::string &if_name, int idx = -1) = 0;