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/ethertap.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/ethertap.cc')
-rw-r--r-- | src/dev/ethertap.cc | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/dev/ethertap.cc b/src/dev/ethertap.cc index 65089a8b2..0b6ab97fc 100644 --- a/src/dev/ethertap.cc +++ b/src/dev/ethertap.cc @@ -50,7 +50,7 @@ #include "dev/etherint.hh" #include "dev/etherpkt.hh" #include "dev/ethertap.hh" -#include "sim/builder.hh" +#include "params/EtherTap.hh" using namespace std; @@ -313,28 +313,10 @@ EtherTap::unserialize(Checkpoint *cp, const std::string §ion) //===================================================================== -BEGIN_DECLARE_SIM_OBJECT_PARAMS(EtherTap) - - SimObjectParam<EtherInt *> peer; - SimObjectParam<EtherDump *> dump; - Param<unsigned> port; - Param<unsigned> bufsz; - -END_DECLARE_SIM_OBJECT_PARAMS(EtherTap) - -BEGIN_INIT_SIM_OBJECT_PARAMS(EtherTap) - - INIT_PARAM_DFLT(peer, "peer interface", NULL), - INIT_PARAM_DFLT(dump, "object to dump network packets to", NULL), - INIT_PARAM_DFLT(port, "tap port", 3500), - INIT_PARAM_DFLT(bufsz, "tap buffer size", 10000) - -END_INIT_SIM_OBJECT_PARAMS(EtherTap) - - -CREATE_SIM_OBJECT(EtherTap) +EtherTap * +EtherTapParams::create() { - EtherTap *tap = new EtherTap(getInstanceName(), dump, port, bufsz); + EtherTap *tap = new EtherTap(name, dump, port, bufsz); if (peer) { tap->setPeer(peer); @@ -343,5 +325,3 @@ CREATE_SIM_OBJECT(EtherTap) return tap; } - -REGISTER_SIM_OBJECT("EtherTap", EtherTap) |