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/bus.cc | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'src/mem/bus.cc') diff --git a/src/mem/bus.cc b/src/mem/bus.cc index 443c0557c..bd098d496 100644 --- a/src/mem/bus.cc +++ b/src/mem/bus.cc @@ -39,7 +39,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "mem/bus.hh" -#include "sim/builder.hh" +#include "params/Bus.hh" Port * Bus::getPort(const std::string &if_name, int idx) @@ -612,28 +612,8 @@ Bus::startup() tickNextIdle = (curTick / clock) * clock + clock; } -BEGIN_DECLARE_SIM_OBJECT_PARAMS(Bus) - - Param bus_id; - Param clock; - Param width; - Param responder_set; - Param block_size; - -END_DECLARE_SIM_OBJECT_PARAMS(Bus) - -BEGIN_INIT_SIM_OBJECT_PARAMS(Bus) - INIT_PARAM(bus_id, "a globally unique bus id"), - INIT_PARAM(clock, "bus clock speed"), - INIT_PARAM(width, "width of the bus (bits)"), - INIT_PARAM(responder_set, "Is a default responder set by the user"), - INIT_PARAM(block_size, "Default blocksize if no device has one") -END_INIT_SIM_OBJECT_PARAMS(Bus) - -CREATE_SIM_OBJECT(Bus) +Bus * +BusParams::create() { - return new Bus(getInstanceName(), bus_id, clock, width, responder_set, - block_size); + return new Bus(name, bus_id, clock, width, responder_set, block_size); } - -REGISTER_SIM_OBJECT("Bus", Bus) -- cgit v1.2.3