summaryrefslogtreecommitdiff
path: root/src/dev/simconsole.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2007-07-23 21:51:38 -0700
committerNathan Binkert <nate@binkert.org>2007-07-23 21:51:38 -0700
commitabc76f20cb98c90e8dab416dd16dfd4a954013ba (patch)
treef3131e68a09c1b4537e17df5b14df21df53746e4 /src/dev/simconsole.cc
parent552097b92e37fb4c0fd27960afe0a03c02894f11 (diff)
downloadgem5-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/simconsole.cc')
-rw-r--r--src/dev/simconsole.cc31
1 files changed, 5 insertions, 26 deletions
diff --git a/src/dev/simconsole.cc b/src/dev/simconsole.cc
index c6ff9c1c6..7ce462bd0 100644
--- a/src/dev/simconsole.cc
+++ b/src/dev/simconsole.cc
@@ -52,7 +52,7 @@
#include "dev/platform.hh"
#include "dev/simconsole.hh"
#include "dev/uart.hh"
-#include "sim/builder.hh"
+#include "params/SimConsole.hh"
using namespace std;
@@ -325,38 +325,17 @@ SimConsole::out(char c)
}
-BEGIN_DECLARE_SIM_OBJECT_PARAMS(SimConsole)
-
- SimObjectParam<IntrControl *> intr_control;
- Param<string> output;
- Param<int> port;
- Param<bool> append_name;
- Param<int> number;
-
-END_DECLARE_SIM_OBJECT_PARAMS(SimConsole)
-
-BEGIN_INIT_SIM_OBJECT_PARAMS(SimConsole)
-
- INIT_PARAM(intr_control, "interrupt controller"),
- INIT_PARAM(output, "file to dump output to"),
- INIT_PARAM(port, ""),
- INIT_PARAM_DFLT(append_name, "append name() to filename", true),
- INIT_PARAM_DFLT(number, "console number", 0)
-
-END_INIT_SIM_OBJECT_PARAMS(SimConsole)
-
-CREATE_SIM_OBJECT(SimConsole)
+SimConsole *
+SimConsoleParams::create()
{
string filename = output;
ostream *stream = NULL;
if (!filename.empty()) {
if (append_name)
- filename += "." + getInstanceName();
+ filename += "." + name;
stream = simout.find(filename);
}
- return new SimConsole(getInstanceName(), stream, number, port);
+ return new SimConsole(name, stream, number, port);
}
-
-REGISTER_SIM_OBJECT("SimConsole", SimConsole)