{
}
-MemObjectParams *
-MemObject::makeParams(const std::string &name)
-{
- MemObjectParams *params = new MemObjectParams;
- params->name = name;
- return params;
-}
-
void
MemObject::deletePortRefs(Port *p)
{
{
public:
typedef MemObjectParams Params;
- MemObject(const Params *params);
-
- const Params *
- params() const
- {
- return dynamic_cast<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);
+ MemObject(const Params *params);
public:
/** Additional function to return the Port of a memory object. */
state = Running;
}
-SimObjectParams *
-SimObject::makeParams(const std::string &name)
-{
- SimObjectParams *params = new SimObjectParams;
- params->name = name;
- return params;
-}
-
void
SimObject::init()
{
SimObject(const Params *_params);
virtual ~SimObject() {}
- protected:
- // static: support for old-style constructors (call manually)
- static Params *makeParams(const std::string &name);
-
public:
virtual const std::string name() const { return params()->name; }
System *
SystemParams::create()
{
- System::Params *p = new System::Params;
- p->name = name;
- p->physmem = physmem;
- p->mem_mode = mem_mode;
- return new System(p);
+ return new System(this);
}
#endif