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/etherdump.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/etherdump.cc')
-rw-r--r-- | src/dev/etherdump.cc | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/dev/etherdump.cc b/src/dev/etherdump.cc index 04463f3ee..7dcf1ca97 100644 --- a/src/dev/etherdump.cc +++ b/src/dev/etherdump.cc @@ -40,7 +40,7 @@ #include "base/misc.hh" #include "base/output.hh" #include "dev/etherdump.hh" -#include "sim/builder.hh" +#include "params/EtherDump.hh" #include "sim/core.hh" using std::string; @@ -116,23 +116,8 @@ EtherDump::dumpPacket(EthPacketPtr &packet) stream.flush(); } -BEGIN_DECLARE_SIM_OBJECT_PARAMS(EtherDump) - - Param<string> file; - Param<int> maxlen; - -END_DECLARE_SIM_OBJECT_PARAMS(EtherDump) - -BEGIN_INIT_SIM_OBJECT_PARAMS(EtherDump) - - INIT_PARAM(file, "file to dump packets to"), - INIT_PARAM(maxlen, "max portion of packet data to dump") - -END_INIT_SIM_OBJECT_PARAMS(EtherDump) - -CREATE_SIM_OBJECT(EtherDump) +EtherDump * +EtherDumpParams::create() { - return new EtherDump(getInstanceName(), simout.resolve(file), maxlen); + return new EtherDump(name, simout.resolve(file), maxlen); } - -REGISTER_SIM_OBJECT("EtherDump", EtherDump) |