summaryrefslogtreecommitdiff
path: root/src/mem/slicc
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2015-07-10 16:05:23 -0500
committerBrandon Potter <brandon.potter@amd.com>2015-07-10 16:05:23 -0500
commitf9a370f1728fe5d752fa6962ba23774eec8c883e (patch)
treea81a0331b75c72ec801d1ecf1ce62a8bc6f3d112 /src/mem/slicc
parentc38f5098b152ea1e1dde96220d3f9e50d3411780 (diff)
downloadgem5-f9a370f1728fe5d752fa6962ba23774eec8c883e.tar.xz
ruby: replace global g_system_ptr with per-object pointers
This is another step in the process of removing global variables from Ruby to enable multiple RubySystem instances in a single simulation. With possibly multiple RubySystem objects, we can no longer use a global variable to find "the" RubySystem object. Instead, each Ruby component has to carry a pointer to the RubySystem object to which it belongs.
Diffstat (limited to 'src/mem/slicc')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py4
-rw-r--r--src/mem/slicc/symbols/Type.py2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index c5ad75145..24b429b28 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -735,7 +735,7 @@ $c_ident::regStats()
event < ${ident}_Event_NUM; ++event) {
Stats::Vector *t = new Stats::Vector();
t->init(m_num_controllers);
- t->name(g_system_ptr->name() + ".${c_ident}." +
+ t->name(params()->ruby_system->name() + ".${c_ident}." +
${ident}_Event_to_string(event));
t->flags(Stats::pdf | Stats::total | Stats::oneline |
Stats::nozero);
@@ -753,7 +753,7 @@ $c_ident::regStats()
Stats::Vector *t = new Stats::Vector();
t->init(m_num_controllers);
- t->name(g_system_ptr->name() + ".${c_ident}." +
+ t->name(params()->ruby_system->name() + ".${c_ident}." +
${ident}_State_to_string(state) +
"." + ${ident}_Event_to_string(event));
diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py
index fecc637d9..eb1dead0f 100644
--- a/src/mem/slicc/symbols/Type.py
+++ b/src/mem/slicc/symbols/Type.py
@@ -418,8 +418,6 @@ ${{self.c_ident}}::print(ostream& out) const
for dm in self.data_members.values():
code('out << "${{dm.ident}} = " << m_${{dm.ident}} << " ";''')
- if self.isMessage:
- code('out << "Time = " << g_system_ptr->clockPeriod() * getTime() << " ";')
code.dedent()
# Trailer