summaryrefslogtreecommitdiff
path: root/src/sim/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/main.cc')
-rw-r--r--src/sim/main.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sim/main.cc b/src/sim/main.cc
index 874d0ac85..8bb0d7aaa 100644
--- a/src/sim/main.cc
+++ b/src/sim/main.cc
@@ -66,6 +66,7 @@
#include "sim/sim_events.hh"
#include "sim/sim_exit.hh"
#include "sim/sim_object.hh"
+#include "sim/system.hh"
#include "sim/stat_control.hh"
#include "sim/stats.hh"
#include "sim/root.hh"
@@ -440,6 +441,17 @@ convertToBaseCPUPtr(SimObject *obj)
return ptr;
}
+System *
+convertToSystemPtr(SimObject *obj)
+{
+ System *ptr = dynamic_cast<System *>(obj);
+
+ if (ptr == NULL)
+ warn("Casting to System pointer failed");
+ return ptr;
+}
+
+
/**
* Do C++ simulator exit processing. Exported to SWIG to be invoked
* when simulator terminates via Python's atexit mechanism.