/**
* @file
- * Base Memory Object decleration.
+ * Base Memory Object declaration.
*/
#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;
+ const Params *params() const
+ { return dynamic_cast<const Params *>(_params); }
+
+ MemObject(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;
+
+ /** Tell object that this port is about to disappear, so it should remove it
+ * from any structures that it's keeping it in. */
+ virtual void deletePortRefs(Port *p) ;
};
#endif //__MEM_MEM_OBJECT_HH__