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/etherbus.cc | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'src/dev/etherbus.cc') diff --git a/src/dev/etherbus.cc b/src/dev/etherbus.cc index cedb3cd4d..3e59229ad 100644 --- a/src/dev/etherbus.cc +++ b/src/dev/etherbus.cc @@ -42,7 +42,7 @@ #include "dev/etherdump.hh" #include "dev/etherint.hh" #include "dev/etherpkt.hh" -#include "sim/builder.hh" +#include "params/EtherBus.hh" #include "sim/core.hh" using namespace std; @@ -103,25 +103,8 @@ EtherBus::send(EtherInt *sndr, EthPacketPtr &pkt) return true; } -BEGIN_DECLARE_SIM_OBJECT_PARAMS(EtherBus) - - Param loopback; - Param speed; - SimObjectParam packet_dump; - -END_DECLARE_SIM_OBJECT_PARAMS(EtherBus) - -BEGIN_INIT_SIM_OBJECT_PARAMS(EtherBus) - - INIT_PARAM(loopback, "send the packet back to the sending interface"), - INIT_PARAM(speed, "bus speed in ticks per byte"), - INIT_PARAM(packet_dump, "object to dump network packets to") - -END_INIT_SIM_OBJECT_PARAMS(EtherBus) - -CREATE_SIM_OBJECT(EtherBus) +EtherBus * +EtherBusParams::create() { - return new EtherBus(getInstanceName(), speed, loopback, packet_dump); + return new EtherBus(name, speed, loopback, dump); } - -REGISTER_SIM_OBJECT("EtherBus", EtherBus) -- cgit v1.2.3