summaryrefslogtreecommitdiff
path: root/util/systemc/sc_gem5_control.hh
diff options
context:
space:
mode:
authorAndrew Bardsley <Andrew.Bardsley@arm.com>2014-12-02 06:08:06 -0500
committerAndrew Bardsley <Andrew.Bardsley@arm.com>2014-12-02 06:08:06 -0500
commit05bba75cdc346184da7ff40958673da980a06df2 (patch)
tree817b43e5bb0479a968ac10dc6f584c6825133563 /util/systemc/sc_gem5_control.hh
parent726f626e87dbe601b4c608d78d53907b15986681 (diff)
downloadgem5-05bba75cdc346184da7ff40958673da980a06df2.tar.xz
config: SystemC Gem5Control top level additions
This patch cleans up a few style issues and adds a few capabilities to the SystemC top level 'Gem5Control/Gem5System' mechanism. These include: 1) A space to store/retrieve a version string for a model 2) A mechanism for registering functions to be called at the end of elaboration to perform simulation setup tasks in SystemC 3) Adding setGDBRemotePort to the Gem5Control 4) Changing the sc_set_time_resolution behaviour to instead check that the SystemC time resolution is already acceptable
Diffstat (limited to 'util/systemc/sc_gem5_control.hh')
-rw-r--r--util/systemc/sc_gem5_control.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/util/systemc/sc_gem5_control.hh b/util/systemc/sc_gem5_control.hh
index e08ec3cc8..a5a372344 100644
--- a/util/systemc/sc_gem5_control.hh
+++ b/util/systemc/sc_gem5_control.hh
@@ -129,6 +129,9 @@ class Gem5Control
/** Private SystemC module containing top level simulation control */
Gem5TopLevelModule *module;
+ /** One-time-settable version string */
+ std::string version;
+
public:
Gem5Control(const std::string &config_filename);
@@ -138,10 +141,21 @@ class Gem5Control
virtual void setDebugFlag(const char *flag);
virtual void clearDebugFlag(const char *flag);
+ /** Choose a base port number for GDB to connect to the model
+ * (0 disables connections) */
+ virtual void setRemoteGDBPort(unsigned int port);
+
+ /* Register an action to happen at the end of elaboration */
+ virtual void registerEndOfElaboration(void (*func)());
+
/** Make a System from the config file description for system
* system_name and call it instance_name in gem5 */
virtual Gem5System *makeSystem(const std::string &system_name,
const std::string &top_instance);
+
+ /** set/get version string */
+ virtual const std::string &getVersion() const;
+ virtual void setVersion(const std::string &new_version);
};
}