summaryrefslogtreecommitdiff
path: root/src/mem/mem_object.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2007-07-23 21:51:38 -0700
committerNathan Binkert <nate@binkert.org>2007-07-23 21:51:38 -0700
commitabc76f20cb98c90e8dab416dd16dfd4a954013ba (patch)
treef3131e68a09c1b4537e17df5b14df21df53746e4 /src/mem/mem_object.hh
parent552097b92e37fb4c0fd27960afe0a03c02894f11 (diff)
downloadgem5-abc76f20cb98c90e8dab416dd16dfd4a954013ba.tar.xz
Major changes to how SimObjects are created and initialized. Almost all
creation and initialization now happens in python. Parameter objects are generated and initialized by python. The .ini file is now solely for debugging purposes and is not used in construction of the objects in any way. --HG-- extra : convert_revision : 7e722873e417cb3d696f2e34c35ff488b7bff4ed
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;