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/dev/simple_disk.cc | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'src/dev/simple_disk.cc') diff --git a/src/dev/simple_disk.cc b/src/dev/simple_disk.cc index e29bfa726..4b6d37286 100644 --- a/src/dev/simple_disk.cc +++ b/src/dev/simple_disk.cc @@ -45,7 +45,7 @@ #include "dev/disk_image.hh" #include "dev/simple_disk.hh" #include "mem/port.hh" -#include "sim/builder.hh" +#include "params/SimpleDisk.hh" #include "sim/system.hh" using namespace std; @@ -91,23 +91,8 @@ SimpleDisk::write(Addr addr, baddr_t block, int count) #endif } -BEGIN_DECLARE_SIM_OBJECT_PARAMS(SimpleDisk) - - SimObjectParam system; - SimObjectParam disk; - -END_DECLARE_SIM_OBJECT_PARAMS(SimpleDisk) - -BEGIN_INIT_SIM_OBJECT_PARAMS(SimpleDisk) - - INIT_PARAM(system, "System pointer"), - INIT_PARAM(disk, "Disk Image") - -END_INIT_SIM_OBJECT_PARAMS(SimpleDisk) - -CREATE_SIM_OBJECT(SimpleDisk) +SimpleDisk * +SimpleDiskParams::create() { - return new SimpleDisk(getInstanceName(), system, disk); + return new SimpleDisk(name, system, disk); } - -REGISTER_SIM_OBJECT("SimpleDisk", SimpleDisk) -- cgit v1.2.3