summaryrefslogtreecommitdiff
path: root/src/dev/simple_disk.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2007-07-23 21:51:38 -0700
committerNathan Binkert <nate@binkert.org>2007-07-23 21:51:38 -0700
commitabc76f20cb98c90e8dab416dd16dfd4a954013ba (patch)
treef3131e68a09c1b4537e17df5b14df21df53746e4 /src/dev/simple_disk.cc
parent552097b92e37fb4c0fd27960afe0a03c02894f11 (diff)
downloadgem5-abc76f20cb98c90e8dab416dd16dfd4a954013ba.tar.xz
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
Diffstat (limited to 'src/dev/simple_disk.cc')
-rw-r--r--src/dev/simple_disk.cc23
1 files changed, 4 insertions, 19 deletions
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 *> system;
- SimObjectParam<DiskImage *> 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)