summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols/StateMachine.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/slicc/symbols/StateMachine.py')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 24b429b28..437fc539c 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -250,7 +250,6 @@ class $py_ident(RubyController):
#include "mem/protocol/TransitionResult.hh"
#include "mem/protocol/Types.hh"
#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/common/Global.hh"
#include "mem/ruby/slicc_interface/AbstractController.hh"
#include "params/$c_ident.hh"
''')
@@ -438,7 +437,6 @@ void unset_tbe(${{self.TBEType.c_ident}}*& m_tbe_ptr);
#include "mem/protocol/${ident}_Event.hh"
#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/Types.hh"
-#include "mem/ruby/common/Global.hh"
#include "mem/ruby/system/System.hh"
''')
for include_path in includes:
@@ -771,9 +769,10 @@ $c_ident::collateStats()
for (${ident}_Event event = ${ident}_Event_FIRST;
event < ${ident}_Event_NUM; ++event) {
for (unsigned int i = 0; i < m_num_controllers; ++i) {
+ RubySystem *rs = params()->ruby_system;
std::map<uint32_t, AbstractController *>::iterator it =
- g_abs_controls[MachineType_${ident}].find(i);
- assert(it != g_abs_controls[MachineType_${ident}].end());
+ rs->m_abstract_controls[MachineType_${ident}].find(i);
+ assert(it != rs->m_abstract_controls[MachineType_${ident}].end());
(*eventVec[event])[i] =
(($c_ident *)(*it).second)->getEventCount(event);
}
@@ -786,9 +785,10 @@ $c_ident::collateStats()
event < ${ident}_Event_NUM; ++event) {
for (unsigned int i = 0; i < m_num_controllers; ++i) {
+ RubySystem *rs = params()->ruby_system;
std::map<uint32_t, AbstractController *>::iterator it =
- g_abs_controls[MachineType_${ident}].find(i);
- assert(it != g_abs_controls[MachineType_${ident}].end());
+ rs->m_abstract_controls[MachineType_${ident}].find(i);
+ assert(it != rs->m_abstract_controls[MachineType_${ident}].end());
(*transVec[state][event])[i] =
(($c_ident *)(*it).second)->getTransitionCount(state, event);
}
@@ -1044,7 +1044,6 @@ $c_ident::functionalWriteBuffers(PacketPtr& pkt)
code('''
#include "mem/protocol/Types.hh"
-#include "mem/ruby/common/Global.hh"
#include "mem/ruby/system/System.hh"
''')
@@ -1120,7 +1119,6 @@ ${ident}_Controller::wakeup()
#include "mem/protocol/${ident}_Event.hh"
#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/Types.hh"
-#include "mem/ruby/common/Global.hh"
#include "mem/ruby/system/System.hh"
#define HASH_FUN(state, event) ((int(state)*${ident}_Event_NUM)+int(event))