diff options
author | Nathan Binkert <nate@binkert.org> | 2007-07-23 21:51:38 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2007-07-23 21:51:38 -0700 |
commit | abc76f20cb98c90e8dab416dd16dfd4a954013ba (patch) | |
tree | f3131e68a09c1b4537e17df5b14df21df53746e4 /src/dev/ide_disk.cc | |
parent | 552097b92e37fb4c0fd27960afe0a03c02894f11 (diff) | |
download | gem5-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/ide_disk.cc')
-rw-r--r-- | src/dev/ide_disk.cc | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/src/dev/ide_disk.cc b/src/dev/ide_disk.cc index 9fa0cedde..cfd743a13 100644 --- a/src/dev/ide_disk.cc +++ b/src/dev/ide_disk.cc @@ -38,18 +38,16 @@ #include <deque> #include <string> +#include "arch/isa_traits.hh" #include "base/chunk_generator.hh" #include "base/cprintf.hh" // csprintf #include "base/trace.hh" #include "dev/disk_image.hh" -#include "dev/ide_disk.hh" #include "dev/ide_ctrl.hh" -#include "dev/alpha/tsunami.hh" -#include "dev/alpha/tsunami_pchip.hh" -#include "sim/builder.hh" -#include "sim/sim_object.hh" +#include "dev/ide_disk.hh" +#include "params/IdeDisk.hh" #include "sim/core.hh" -#include "arch/isa_traits.hh" +#include "sim/sim_object.hh" using namespace std; using namespace TheISA; @@ -1116,32 +1114,8 @@ IdeDisk::unserialize(Checkpoint *cp, const string §ion) UNSERIALIZE_ARRAY(dataBuffer, MAX_DMA_SIZE); } -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -enum DriveID { master, slave }; -static const char *DriveID_strings[] = { "master", "slave" }; -BEGIN_DECLARE_SIM_OBJECT_PARAMS(IdeDisk) - - SimObjectParam<DiskImage *> image; - SimpleEnumParam<DriveID> driveID; - Param<int> delay; - -END_DECLARE_SIM_OBJECT_PARAMS(IdeDisk) - -BEGIN_INIT_SIM_OBJECT_PARAMS(IdeDisk) - - INIT_PARAM(image, "Disk image"), - INIT_ENUM_PARAM(driveID, "Drive ID (0=master 1=slave)", DriveID_strings), - INIT_PARAM_DFLT(delay, "Fixed disk delay in microseconds", 1) - -END_INIT_SIM_OBJECT_PARAMS(IdeDisk) - - -CREATE_SIM_OBJECT(IdeDisk) +IdeDisk * +IdeDiskParams::create() { - return new IdeDisk(getInstanceName(), image, driveID, delay); + return new IdeDisk(name, image, driveID, delay); } - -REGISTER_SIM_OBJECT("IdeDisk", IdeDisk) - -#endif //DOXYGEN_SHOULD_SKIP_THIS |