summaryrefslogtreecommitdiff
path: root/src/mem/slicc
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-08-27 01:00:55 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2012-08-27 01:00:55 -0500
commit9190940511b5783811bc6288dd4f22f8d18c9d26 (patch)
tree72a07f80a772d7c6f2a6f0255cee173ac631cb35 /src/mem/slicc
parent7122b83d8f92d77bccae432b4e90ba12f1babad5 (diff)
downloadgem5-9190940511b5783811bc6288dd4f22f8d18c9d26.tar.xz
Ruby: Remove RubyEventQueue
This patch removes RubyEventQueue. Consumer objects now rely on RubySystem or themselves for scheduling events.
Diffstat (limited to 'src/mem/slicc')
-rw-r--r--src/mem/slicc/ast/AST.py2
-rw-r--r--src/mem/slicc/ast/FuncCallExprAST.py4
-rw-r--r--src/mem/slicc/symbols/StateMachine.py12
-rw-r--r--src/mem/slicc/symbols/Type.py2
4 files changed, 8 insertions, 12 deletions
diff --git a/src/mem/slicc/ast/AST.py b/src/mem/slicc/ast/AST.py
index b74867114..b99451019 100644
--- a/src/mem/slicc/ast/AST.py
+++ b/src/mem/slicc/ast/AST.py
@@ -56,7 +56,7 @@ class AST(PairContainer):
code('''
char c;
cerr << "Runtime Error at ${{self.location}}, Ruby Time: "
- << g_eventQueue_ptr->getTime() << ": "
+ << g_system_ptr->getTime() << ": "
<< $message
<< ", PID: " << getpid() << endl
<< "press return to continue." << endl;
diff --git a/src/mem/slicc/ast/FuncCallExprAST.py b/src/mem/slicc/ast/FuncCallExprAST.py
index 3747d0dfd..ab6261de2 100644
--- a/src/mem/slicc/ast/FuncCallExprAST.py
+++ b/src/mem/slicc/ast/FuncCallExprAST.py
@@ -142,7 +142,7 @@ class FuncCallExprAST(ExprAST):
}
if (result == TransitionResult_ResourceStall) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(this, 1);
// Cannot do anything with this transition, go check next doable transition (mostly likely of next port)
}
@@ -173,7 +173,7 @@ class FuncCallExprAST(ExprAST):
}
if (result1 == TransitionResult_ResourceStall) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(this, 1);
// Cannot do anything with this transition, go check next
// doable transition (mostly likely of next port)
}
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 39f3a4b43..83ad88e8b 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -1037,7 +1037,7 @@ ${ident}_Controller::wakeup()
g_system_ptr->getProfiler()->controllerBusy(m_machineID);
// Wakeup in another cycle and try again
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(this, 1);
break;
}
''')
@@ -1064,7 +1064,6 @@ ${ident}_Controller::wakeup()
code('''
break; // If we got this far, we have nothing left todo
}
- // g_eventQueue_ptr->scheduleEvent(this, 1);
}
''')
@@ -1126,11 +1125,8 @@ ${ident}_Controller::doTransition(${ident}_Event event,
${ident}_State next_state = state;
DPRINTF(RubyGenerated, "%s, Time: %lld, state: %s, event: %s, addr: %s\\n",
- *this,
- g_eventQueue_ptr->getTime(),
- ${ident}_State_to_string(state),
- ${ident}_Event_to_string(event),
- addr);
+ *this, g_system_ptr->getTime(), ${ident}_State_to_string(state),
+ ${ident}_Event_to_string(event), addr);
TransitionResult result =
''')
@@ -1302,7 +1298,7 @@ if (!checkResourceAvailable(%s_RequestType_%s, addr)) {
default:
fatal("Invalid transition\\n"
"%s time: %d addr: %s event: %s state: %s\\n",
- name(), g_eventQueue_ptr->getTime(), addr, event, state);
+ name(), g_system_ptr->getTime(), addr, event, state);
}
return TransitionResult_Valid;
}
diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py
index ad00f2ac1..42ee8894a 100644
--- a/src/mem/slicc/symbols/Type.py
+++ b/src/mem/slicc/symbols/Type.py
@@ -415,7 +415,7 @@ ${{self.c_ident}}::print(ostream& out) const
code('out << "${{dm.ident}} = " << m_${{dm.ident}} << " ";''')
if self.isMessage:
- code('out << "Time = " << getTime() * g_eventQueue_ptr->getClock() << " ";')
+ code('out << "Time = " << getTime() * g_system_ptr->getClock() << " ";')
code.dedent()
# Trailer