From abc76f20cb98c90e8dab416dd16dfd4a954013ba Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 23 Jul 2007 21:51:38 -0700 Subject: 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 --- src/sim/root.cc | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'src/sim/root.cc') diff --git a/src/sim/root.cc b/src/sim/root.cc index f4743af0a..15f73b15b 100644 --- a/src/sim/root.cc +++ b/src/sim/root.cc @@ -36,28 +36,17 @@ #include #include "base/misc.hh" -#include "sim/builder.hh" +#include "params/Root.hh" #include "sim/sim_object.hh" // Dummy Object struct Root : public SimObject { - Root(const std::string &name) : SimObject(name) {} + Root(RootParams *params) : SimObject(params) {} }; -BEGIN_DECLARE_SIM_OBJECT_PARAMS(Root) - - Param dummy; // needed below - -END_DECLARE_SIM_OBJECT_PARAMS(Root) - -BEGIN_INIT_SIM_OBJECT_PARAMS(Root) - - INIT_PARAM(dummy, "") // All SimObjects must have params - -END_INIT_SIM_OBJECT_PARAMS(Root) - -CREATE_SIM_OBJECT(Root) +Root * +RootParams::create() { static bool created = false; if (created) @@ -65,7 +54,5 @@ CREATE_SIM_OBJECT(Root) created = true; - return new Root(getInstanceName()); + return new Root(this); } - -REGISTER_SIM_OBJECT("Root", Root) -- cgit v1.2.3