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/alpha/tsunami_pchip.cc | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) (limited to 'src/dev/alpha/tsunami_pchip.cc') diff --git a/src/dev/alpha/tsunami_pchip.cc b/src/dev/alpha/tsunami_pchip.cc index f30199337..5c05e667b 100644 --- a/src/dev/alpha/tsunami_pchip.cc +++ b/src/dev/alpha/tsunami_pchip.cc @@ -43,14 +43,13 @@ #include "dev/alpha/tsunami.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" -#include "sim/builder.hh" #include "sim/system.hh" using namespace std; //Should this be AlphaISA? using namespace TheISA; -TsunamiPChip::TsunamiPChip(Params *p) +TsunamiPChip::TsunamiPChip(const Params *p) : BasicPioDevice(p) { pioSize = 0x1000; @@ -334,36 +333,8 @@ TsunamiPChip::unserialize(Checkpoint *cp, const std::string §ion) } -BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiPChip) - - Param pio_addr; - Param pio_latency; - SimObjectParam platform; - SimObjectParam system; - SimObjectParam tsunami; - -END_DECLARE_SIM_OBJECT_PARAMS(TsunamiPChip) - -BEGIN_INIT_SIM_OBJECT_PARAMS(TsunamiPChip) - - INIT_PARAM(pio_addr, "Device Address"), - INIT_PARAM(pio_latency, "Programmed IO latency"), - INIT_PARAM(platform, "platform"), - INIT_PARAM(system, "system object"), - INIT_PARAM(tsunami, "Tsunami") - -END_INIT_SIM_OBJECT_PARAMS(TsunamiPChip) - -CREATE_SIM_OBJECT(TsunamiPChip) +TsunamiPChip * +TsunamiPChipParams::create() { - TsunamiPChip::Params *p = new TsunamiPChip::Params; - p->name = getInstanceName(); - p->pio_addr = pio_addr; - p->pio_delay = pio_latency; - p->platform = platform; - p->system = system; - p->tsunami = tsunami; - return new TsunamiPChip(p); + return new TsunamiPChip(this); } - -REGISTER_SIM_OBJECT("TsunamiPChip", TsunamiPChip) -- cgit v1.2.3