summaryrefslogtreecommitdiff
path: root/util/tlm/sim_control.hh
diff options
context:
space:
mode:
Diffstat (limited to 'util/tlm/sim_control.hh')
-rw-r--r--util/tlm/sim_control.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/tlm/sim_control.hh b/util/tlm/sim_control.hh
index b411022de..399372c7f 100644
--- a/util/tlm/sim_control.hh
+++ b/util/tlm/sim_control.hh
@@ -77,6 +77,22 @@ class Gem5SimControl : public Module, public Gem5SimControlInterface
/// Pointer to a previously created instance.
static Gem5SimControl* instance;
+ /** A callback that is called from the run thread before gem5 simulation is
+ * started.
+ *
+ * A derived class may use this to perform any additional initializations
+ * prior simulation.
+ */
+ virtual void beforeSimulate() {}
+
+ /** A callback that is called from the run thread after gem5 simulation
+ * completed.
+ *
+ * A derived class may use this to perform any additional tasks after gem5
+ * exits. For instance, a derived class could use this to call sc_stop().
+ */
+ virtual void afterSimulate() {}
+
public:
SC_HAS_PROCESS(Gem5SimControl);