params: Get rid of the remnants of the old style parameter configuration stuff.

This commit is contained in:
Nathan Binkert 2008-08-11 12:22:17 -07:00
parent ee62a0fec8
commit 9cf8ad3a17
5 changed files with 4 additions and 35 deletions

View file

@ -35,14 +35,6 @@ MemObject::MemObject(const Params *params)
{
}
MemObjectParams *
MemObject::makeParams(const std::string &name)
{
MemObjectParams *params = new MemObjectParams;
params->name = name;
return params;
}
void
MemObject::deletePortRefs(Port *p)
{

View file

@ -48,18 +48,11 @@ class MemObject : public SimObject
{
public:
typedef MemObjectParams Params;
const Params *params() const
{ return dynamic_cast<const Params *>(_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. */
virtual Port *getPort(const std::string &if_name, int idx = -1) = 0;

View file

@ -69,14 +69,6 @@ SimObject::SimObject(const Params *p)
state = Running;
}
SimObjectParams *
SimObject::makeParams(const std::string &name)
{
SimObjectParams *params = new SimObjectParams;
params->name = name;
return params;
}
void
SimObject::init()
{

View file

@ -87,10 +87,6 @@ class SimObject : public Serializable, protected StartupCallback
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; }

View file

@ -285,11 +285,7 @@ const char *System::MemoryModeStrings[3] = {"invalid", "atomic",
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