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/mem/cache/tags/repl/gen.cc | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) (limited to 'src/mem/cache/tags/repl/gen.cc') diff --git a/src/mem/cache/tags/repl/gen.cc b/src/mem/cache/tags/repl/gen.cc index ec1c2aaf3..7d1566300 100644 --- a/src/mem/cache/tags/repl/gen.cc +++ b/src/mem/cache/tags/repl/gen.cc @@ -39,7 +39,7 @@ #include "base/misc.hh" #include "mem/cache/tags/iic.hh" #include "mem/cache/tags/repl/gen.hh" -#include "sim/builder.hh" +#include "params/GenRepl.hh" #include "sim/host.hh" using namespace std; @@ -247,31 +247,8 @@ GenRepl::findTagPtr(unsigned long index) return false; } -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -BEGIN_DECLARE_SIM_OBJECT_PARAMS(GenRepl) - - Param num_pools; - Param fresh_res; - Param pool_res; - -END_DECLARE_SIM_OBJECT_PARAMS(GenRepl) - - -BEGIN_INIT_SIM_OBJECT_PARAMS(GenRepl) - - INIT_PARAM(num_pools, "capacity in bytes"), - INIT_PARAM(fresh_res, "associativity"), - INIT_PARAM(pool_res, "block size in bytes") - -END_INIT_SIM_OBJECT_PARAMS(GenRepl) - - -CREATE_SIM_OBJECT(GenRepl) +GenRepl * +GenReplParams::create() { - return new GenRepl(getInstanceName(), num_pools, fresh_res, pool_res); + return new GenRepl(name, num_pools, fresh_res, pool_res); } - -REGISTER_SIM_OBJECT("GenRepl", GenRepl) - -#endif // DOXYGEN_SHOULD_SKIP_THIS -- cgit v1.2.3