summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-05-02 00:16:14 -0400
committerKorey Sewell <ksewell@umich.edu>2011-05-02 00:16:14 -0400
commitdd95bc4d44d124abec3580f95db725895027bd1c (patch)
tree772abc2ba41853356ea3cd932eb9256cbd9be704 /src
parent947a5ba9a50d9d19db1028f04c76c5e3f3e9d2b7 (diff)
downloadgem5-dd95bc4d44d124abec3580f95db725895027bd1c.tar.xz
ruby: dbg: use system ticks instead of cycles
Diffstat (limited to 'src')
-rw-r--r--src/mem/ruby/buffers/MessageBuffer.cc14
-rw-r--r--src/mem/ruby/network/simple/PerfectSwitch.cc5
-rw-r--r--src/mem/ruby/system/Sequencer.cc14
-rw-r--r--src/mem/slicc/symbols/StateMachine.py36
-rw-r--r--src/mem/slicc/symbols/Type.py2
5 files changed, 36 insertions, 35 deletions
diff --git a/src/mem/ruby/buffers/MessageBuffer.cc b/src/mem/ruby/buffers/MessageBuffer.cc
index e5df19cab..9bb166e05 100644
--- a/src/mem/ruby/buffers/MessageBuffer.cc
+++ b/src/mem/ruby/buffers/MessageBuffer.cc
@@ -126,8 +126,7 @@ MessageBuffer::getMsgPtrCopy() const
const Message*
MessageBuffer::peekAtHeadOfQueue() const
{
- DPRINTF(RubyQueue, "Peeking at head of queue time: %lld\n",
- g_eventQueue_ptr->getTime());
+ DPRINTF(RubyQueue, "Peeking at head of queue.\n");
assert(isReady());
const Message* msg_ptr = m_prio_heap.front().m_msgptr.get();
@@ -196,8 +195,11 @@ MessageBuffer::enqueue(MsgPtr message, Time delta)
if (arrival_time < m_last_arrival_time) {
panic("FIFO ordering violated: %s name: %s current time: %d "
"delta: %d arrival_time: %d last arrival_time: %d\n",
- *this, m_name, current_time, delta, arrival_time,
- m_last_arrival_time);
+ *this, m_name,
+ current_time * g_eventQueue_ptr->getClock(),
+ delta * g_eventQueue_ptr->getClock(),
+ arrival_time * g_eventQueue_ptr->getClock(),
+ m_last_arrival_time * g_eventQueue_ptr->getClock());
}
}
m_last_arrival_time = arrival_time;
@@ -220,8 +222,8 @@ MessageBuffer::enqueue(MsgPtr message, Time delta)
push_heap(m_prio_heap.begin(), m_prio_heap.end(),
greater<MessageBufferNode>());
- DPRINTF(RubyQueue, "Enqueue with arrival_time %lld (cur_time: %lld).\n",
- arrival_time, g_eventQueue_ptr->getTime());
+ DPRINTF(RubyQueue, "Enqueue with arrival_time %lld.\n",
+ arrival_time * g_eventQueue_ptr->getClock());
DPRINTF(RubyQueue, "Enqueue Message: %s.\n", (*(message.get())));
// Schedule the wakeup
diff --git a/src/mem/ruby/network/simple/PerfectSwitch.cc b/src/mem/ruby/network/simple/PerfectSwitch.cc
index a054cee89..3c35be217 100644
--- a/src/mem/ruby/network/simple/PerfectSwitch.cc
+++ b/src/mem/ruby/network/simple/PerfectSwitch.cc
@@ -302,9 +302,8 @@ PerfectSwitch::wakeup()
// Enqeue msg
DPRINTF(RubyNetwork, "Enqueuing net msg from "
- "inport[%d][%d] to outport [%d][%d] time: %lld.\n",
- incoming, vnet, outgoing, vnet,
- g_eventQueue_ptr->getTime());
+ "inport[%d][%d] to outport [%d][%d].\n",
+ incoming, vnet, outgoing, vnet);
m_out[outgoing][vnet]->enqueue(msg_ptr);
}
diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc
index e260ce865..1b46e680d 100644
--- a/src/mem/ruby/system/Sequencer.cc
+++ b/src/mem/ruby/system/Sequencer.cc
@@ -500,10 +500,10 @@ Sequencer::hitCallback(SequencerRequest* srequest,
g_eventQueue_ptr->getTime());
}
- DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %d cycles\n",
- g_eventQueue_ptr->getTime(), m_version, "Seq",
- success ? "Done" : "SC_Failed", "", "",
- ruby_request.m_PhysicalAddress, miss_latency);
+ DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %d cycles\n",
+ curTick(), m_version, "Seq",
+ success ? "Done" : "SC_Failed", "", "",
+ ruby_request.m_PhysicalAddress, miss_latency);
}
#if 0
if (request.getPrefetch() == PrefetchBit_Yes) {
@@ -685,9 +685,9 @@ Sequencer::issueRequest(const RubyRequest& request)
ctype, amtype, request.pkt,
PrefetchBit_No, proc_id);
- DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\n",
- g_eventQueue_ptr->getTime(), m_version, "Seq", "Begin", "", "",
- request.m_PhysicalAddress, RubyRequestType_to_string(request.m_Type));
+ DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\n",
+ curTick(), m_version, "Seq", "Begin", "", "",
+ request.m_PhysicalAddress, RubyRequestType_to_string(request.m_Type));
Time latency = 0; // initialzed to an null value
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index b1b185ca2..116371e70 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -1104,12 +1104,12 @@ ${ident}_Controller::doTransition(${ident}_Event event,
DPRINTF(RubyGenerated, "next_state: %s\\n",
${ident}_State_to_string(next_state));
m_profiler.countTransition(state, event);
- 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());
+ DPRINTFR(ProtocolTrace, "%15d %3s %10s%20s %6s>%-6s %s %s\\n",
+ curTick(), 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();
''')
@@ -1126,20 +1126,20 @@ ${ident}_Controller::doTransition(${ident}_Event event,
code('''
} else if (result == TransitionResult_ResourceStall) {
- 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");
+ DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\\n",
+ curTick(), 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");
- 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");
+ DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\\n",
+ curTick(), m_version, "${ident}",
+ ${ident}_Event_to_string(event),
+ ${ident}_State_to_string(state),
+ ${ident}_State_to_string(next_state),
+ addr, "Protocol Stall");
}
return result;
diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py
index 9aea286d7..b41ecc00f 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() << " ";')
+ code('out << "Time = " << getTime() * g_eventQueue_ptr->getClock() << " ";')
code.dedent()
# Trailer