summaryrefslogtreecommitdiff
path: root/src/sim/core.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2007-03-06 11:13:43 -0800
committerNathan Binkert <binkertn@umich.edu>2007-03-06 11:13:43 -0800
commitd55b25cde6d2c072885a2c468d209fb18d6628e6 (patch)
tree391c4e66a69818a95037a5f2adccb2e8e0c84648 /src/sim/core.hh
parentf800fddcea850822efee031b9b904280639da4c6 (diff)
downloadgem5-d55b25cde6d2c072885a2c468d209fb18d6628e6.tar.xz
Move all of the parameters of the Root SimObject so they are
directly configured by python. Move stuff from root.(cc|hh) to core.(cc|hh) since it really belogs there now. In the process, simplify how ticks are used in the python code. --HG-- extra : convert_revision : cf82ee1ea20f9343924f30bacc2a38d4edee8df3
Diffstat (limited to 'src/sim/core.hh')
-rw-r--r--src/sim/core.hh49
1 files changed, 47 insertions, 2 deletions
diff --git a/src/sim/core.hh b/src/sim/core.hh
index 2ef21c4b6..7360032c2 100644
--- a/src/sim/core.hh
+++ b/src/sim/core.hh
@@ -29,12 +29,57 @@
* Steve Reinhardt
*/
-#include <Python.h>
+#ifndef __SIM_CORE_HH__
+#define __SIM_CORE_HH__
+
#include <string>
-#include "base/callback.hh"
+#include "sim/host.hh"
+
+/// The universal simulation clock.
+extern Tick curTick;
+const Tick retryTime = 1000;
+
+namespace Clock {
+/// The simulated frequency of curTick.
+extern Tick Frequency;
+
+namespace Float {
+extern double s;
+extern double ms;
+extern double us;
+extern double ns;
+extern double ps;
+
+extern double Hz;
+extern double kHz;
+extern double MHz;
+extern double GHZ;
+/* namespace Float */ }
+namespace Int {
+extern Tick s;
+extern Tick ms;
+extern Tick us;
+extern Tick ns;
+extern Tick ps;
+/* namespace Int */ }
+/* namespace Clock */ }
+
+void setClockFrequency(Tick ticksPerSecond);
+
+/// Output stream for simulator messages (e.g., cprintf()). Also used
+/// as default stream for tracing and DPRINTF() messages (unless
+/// overridden with trace:file option).
+extern std::ostream *outputStream;
+void setOutputFile(const std::string &file);
void setOutputDir(const std::string &dir);
+/// Output stream for configuration dump.
+extern std::ostream *configStream;
+
+struct Callback;
void registerExitCallback(Callback *callback);
void doExitCleanup();
+
+#endif /* __SIM_CORE_HH__ */