summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2011-01-10 11:11:20 -0800
committerNathan Binkert <nate@binkert.org>2011-01-10 11:11:20 -0800
commitbd18ac82877072a87745aaf7a104e7bb036c6c66 (patch)
tree0fb980aea5b81d79160105fbf505670be0cf5e72 /src/mem/slicc/symbols
parent8e262adf4fcc009776810b9795f907fcd468591c (diff)
downloadgem5-bd18ac82877072a87745aaf7a104e7bb036c6c66.tar.xz
ruby: get rid of ruby's Debug.hh
Get rid of the Debug class Get rid of ASSERT and use assert Use DPRINTFR for ProtocolTrace
Diffstat (limited to 'src/mem/slicc/symbols')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py56
-rw-r--r--src/mem/slicc/symbols/Type.py1
2 files changed, 31 insertions, 26 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index da6bc681c..145284726 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -338,6 +338,7 @@ static int m_num_controllers;
* Created by slicc definition of Module "${{self.short}}"
*/
+#include <cassert>
#include <sstream>
#include <string>
@@ -760,6 +761,8 @@ $c_ident::${{action.ident}}(const Address& addr)
// Auto generated C++ code started by $__file__:$__line__
// ${ident}: ${{self.short}}
+#include <cassert>
+
#include "base/misc.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/slicc_interface/RubySlicc_includes.hh"
@@ -829,7 +832,10 @@ ${ident}_Controller::wakeup()
// Auto generated C++ code started by $__file__:$__line__
// ${ident}: ${{self.short}}
+#include <cassert>
+
#include "base/misc.hh"
+#include "base/trace.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/protocol/${ident}_Controller.hh"
#include "mem/protocol/${ident}_State.hh"
@@ -863,36 +869,30 @@ ${ident}_Controller::doTransition(${ident}_Event event,
DPRINTF(RubyGenerated, "next_state: %s\\n",
${ident}_State_to_string(next_state));
m_profiler.countTransition(state, event);
- if (Debug::getProtocolTrace()) {
- g_system_ptr->getProfiler()->profileTransition("${ident}",
- m_version, addr,
- ${ident}_State_to_string(state),
- ${ident}_Event_to_string(event),
- ${ident}_State_to_string(next_state),
- GET_TRANSITION_COMMENT());
- }
- CLEAR_TRANSITION_COMMENT();
- ${ident}_setState(addr, next_state);
+ DPRINTFR(ProtocolTrace, "%7d %3s %10s%20s %6s>%-6s %s %s\\n",
+ g_eventQueue_ptr->getTime(), m_version, "${ident}",
+ ${ident}_Event_to_string(event),
+ ${ident}_State_to_string(state),
+ ${ident}_State_to_string(next_state),
+ addr, GET_TRANSITION_COMMENT());
+ CLEAR_TRANSITION_COMMENT();
+ ${ident}_setState(addr, next_state);
} else if (result == TransitionResult_ResourceStall) {
- if (Debug::getProtocolTrace()) {
- g_system_ptr->getProfiler()->profileTransition("${ident}",
- m_version, addr,
- ${ident}_State_to_string(state),
- ${ident}_Event_to_string(event),
- ${ident}_State_to_string(next_state),
- "Resource Stall");
- }
+ DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\\n",
+ g_eventQueue_ptr->getTime(), m_version, "${ident}",
+ ${ident}_Event_to_string(event),
+ ${ident}_State_to_string(state),
+ ${ident}_State_to_string(next_state),
+ addr, "Resource Stall");
} else if (result == TransitionResult_ProtocolStall) {
DPRINTF(RubyGenerated, "stalling\\n");
- if (Debug::getProtocolTrace()) {
- g_system_ptr->getProfiler()->profileTransition("${ident}",
- m_version, addr,
- ${ident}_State_to_string(state),
- ${ident}_Event_to_string(event),
- ${ident}_State_to_string(next_state),
- "Protocol Stall");
- }
+ DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\\n",
+ g_eventQueue_ptr->getTime(), m_version, "${ident}",
+ ${ident}_Event_to_string(event),
+ ${ident}_State_to_string(state),
+ ${ident}_State_to_string(next_state),
+ addr, "Protocol Stall");
}
return result;
@@ -993,6 +993,7 @@ if (!%s.areNSlotsAvailable(%s))
#ifndef __${ident}_PROFILE_DUMPER_HH__
#define __${ident}_PROFILE_DUMPER_HH__
+#include <cassert>
#include <iostream>
#include <vector>
@@ -1088,6 +1089,7 @@ ${ident}_ProfileDumper::dumpStats(std::ostream& out) const
#ifndef __${ident}_PROFILER_HH__
#define __${ident}_PROFILER_HH__
+#include <cassert>
#include <iostream>
#include "mem/ruby/common/Global.hh"
@@ -1125,6 +1127,8 @@ class ${ident}_Profiler
// Auto generated C++ code started by $__file__:$__line__
// ${ident}: ${{self.short}}
+#include <cassert>
+
#include "mem/protocol/${ident}_Profiler.hh"
${ident}_Profiler::${ident}_Profiler()
diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py
index d6e156908..e521d544f 100644
--- a/src/mem/slicc/symbols/Type.py
+++ b/src/mem/slicc/symbols/Type.py
@@ -508,6 +508,7 @@ std::ostream& operator<<(std::ostream& out, const ${{self.c_ident}}& obj);
* Auto generated C++ code started by $__file__:$__line__
*/
+#include <cassert>
#include <iostream>
#include <string>