ruby: dbg: use system ticks instead of cycles
This commit is contained in:
parent
947a5ba9a5
commit
dd95bc4d44
5 changed files with 36 additions and 35 deletions
|
@ -126,8 +126,7 @@ MessageBuffer::getMsgPtrCopy() const
|
||||||
const Message*
|
const Message*
|
||||||
MessageBuffer::peekAtHeadOfQueue() const
|
MessageBuffer::peekAtHeadOfQueue() const
|
||||||
{
|
{
|
||||||
DPRINTF(RubyQueue, "Peeking at head of queue time: %lld\n",
|
DPRINTF(RubyQueue, "Peeking at head of queue.\n");
|
||||||
g_eventQueue_ptr->getTime());
|
|
||||||
assert(isReady());
|
assert(isReady());
|
||||||
|
|
||||||
const Message* msg_ptr = m_prio_heap.front().m_msgptr.get();
|
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) {
|
if (arrival_time < m_last_arrival_time) {
|
||||||
panic("FIFO ordering violated: %s name: %s current time: %d "
|
panic("FIFO ordering violated: %s name: %s current time: %d "
|
||||||
"delta: %d arrival_time: %d last arrival_time: %d\n",
|
"delta: %d arrival_time: %d last arrival_time: %d\n",
|
||||||
*this, m_name, current_time, delta, arrival_time,
|
*this, m_name,
|
||||||
m_last_arrival_time);
|
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;
|
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(),
|
push_heap(m_prio_heap.begin(), m_prio_heap.end(),
|
||||||
greater<MessageBufferNode>());
|
greater<MessageBufferNode>());
|
||||||
|
|
||||||
DPRINTF(RubyQueue, "Enqueue with arrival_time %lld (cur_time: %lld).\n",
|
DPRINTF(RubyQueue, "Enqueue with arrival_time %lld.\n",
|
||||||
arrival_time, g_eventQueue_ptr->getTime());
|
arrival_time * g_eventQueue_ptr->getClock());
|
||||||
DPRINTF(RubyQueue, "Enqueue Message: %s.\n", (*(message.get())));
|
DPRINTF(RubyQueue, "Enqueue Message: %s.\n", (*(message.get())));
|
||||||
|
|
||||||
// Schedule the wakeup
|
// Schedule the wakeup
|
||||||
|
|
|
@ -302,9 +302,8 @@ PerfectSwitch::wakeup()
|
||||||
|
|
||||||
// Enqeue msg
|
// Enqeue msg
|
||||||
DPRINTF(RubyNetwork, "Enqueuing net msg from "
|
DPRINTF(RubyNetwork, "Enqueuing net msg from "
|
||||||
"inport[%d][%d] to outport [%d][%d] time: %lld.\n",
|
"inport[%d][%d] to outport [%d][%d].\n",
|
||||||
incoming, vnet, outgoing, vnet,
|
incoming, vnet, outgoing, vnet);
|
||||||
g_eventQueue_ptr->getTime());
|
|
||||||
|
|
||||||
m_out[outgoing][vnet]->enqueue(msg_ptr);
|
m_out[outgoing][vnet]->enqueue(msg_ptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -500,8 +500,8 @@ Sequencer::hitCallback(SequencerRequest* srequest,
|
||||||
g_eventQueue_ptr->getTime());
|
g_eventQueue_ptr->getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %d cycles\n",
|
DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %d cycles\n",
|
||||||
g_eventQueue_ptr->getTime(), m_version, "Seq",
|
curTick(), m_version, "Seq",
|
||||||
success ? "Done" : "SC_Failed", "", "",
|
success ? "Done" : "SC_Failed", "", "",
|
||||||
ruby_request.m_PhysicalAddress, miss_latency);
|
ruby_request.m_PhysicalAddress, miss_latency);
|
||||||
}
|
}
|
||||||
|
@ -685,8 +685,8 @@ Sequencer::issueRequest(const RubyRequest& request)
|
||||||
ctype, amtype, request.pkt,
|
ctype, amtype, request.pkt,
|
||||||
PrefetchBit_No, proc_id);
|
PrefetchBit_No, proc_id);
|
||||||
|
|
||||||
DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\n",
|
DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\n",
|
||||||
g_eventQueue_ptr->getTime(), m_version, "Seq", "Begin", "", "",
|
curTick(), m_version, "Seq", "Begin", "", "",
|
||||||
request.m_PhysicalAddress, RubyRequestType_to_string(request.m_Type));
|
request.m_PhysicalAddress, RubyRequestType_to_string(request.m_Type));
|
||||||
|
|
||||||
Time latency = 0; // initialzed to an null value
|
Time latency = 0; // initialzed to an null value
|
||||||
|
|
|
@ -1104,8 +1104,8 @@ ${ident}_Controller::doTransition(${ident}_Event event,
|
||||||
DPRINTF(RubyGenerated, "next_state: %s\\n",
|
DPRINTF(RubyGenerated, "next_state: %s\\n",
|
||||||
${ident}_State_to_string(next_state));
|
${ident}_State_to_string(next_state));
|
||||||
m_profiler.countTransition(state, event);
|
m_profiler.countTransition(state, event);
|
||||||
DPRINTFR(ProtocolTrace, "%7d %3s %10s%20s %6s>%-6s %s %s\\n",
|
DPRINTFR(ProtocolTrace, "%15d %3s %10s%20s %6s>%-6s %s %s\\n",
|
||||||
g_eventQueue_ptr->getTime(), m_version, "${ident}",
|
curTick(), m_version, "${ident}",
|
||||||
${ident}_Event_to_string(event),
|
${ident}_Event_to_string(event),
|
||||||
${ident}_State_to_string(state),
|
${ident}_State_to_string(state),
|
||||||
${ident}_State_to_string(next_state),
|
${ident}_State_to_string(next_state),
|
||||||
|
@ -1126,16 +1126,16 @@ ${ident}_Controller::doTransition(${ident}_Event event,
|
||||||
|
|
||||||
code('''
|
code('''
|
||||||
} else if (result == TransitionResult_ResourceStall) {
|
} else if (result == TransitionResult_ResourceStall) {
|
||||||
DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\\n",
|
DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\\n",
|
||||||
g_eventQueue_ptr->getTime(), m_version, "${ident}",
|
curTick(), m_version, "${ident}",
|
||||||
${ident}_Event_to_string(event),
|
${ident}_Event_to_string(event),
|
||||||
${ident}_State_to_string(state),
|
${ident}_State_to_string(state),
|
||||||
${ident}_State_to_string(next_state),
|
${ident}_State_to_string(next_state),
|
||||||
addr, "Resource Stall");
|
addr, "Resource Stall");
|
||||||
} else if (result == TransitionResult_ProtocolStall) {
|
} else if (result == TransitionResult_ProtocolStall) {
|
||||||
DPRINTF(RubyGenerated, "stalling\\n");
|
DPRINTF(RubyGenerated, "stalling\\n");
|
||||||
DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\\n",
|
DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\\n",
|
||||||
g_eventQueue_ptr->getTime(), m_version, "${ident}",
|
curTick(), m_version, "${ident}",
|
||||||
${ident}_Event_to_string(event),
|
${ident}_Event_to_string(event),
|
||||||
${ident}_State_to_string(state),
|
${ident}_State_to_string(state),
|
||||||
${ident}_State_to_string(next_state),
|
${ident}_State_to_string(next_state),
|
||||||
|
|
|
@ -415,7 +415,7 @@ ${{self.c_ident}}::print(ostream& out) const
|
||||||
code('out << "${{dm.ident}} = " << m_${{dm.ident}} << " ";''')
|
code('out << "${{dm.ident}} = " << m_${{dm.ident}} << " ";''')
|
||||||
|
|
||||||
if self.isMessage:
|
if self.isMessage:
|
||||||
code('out << "Time = " << getTime() << " ";')
|
code('out << "Time = " << getTime() * g_eventQueue_ptr->getClock() << " ";')
|
||||||
code.dedent()
|
code.dedent()
|
||||||
|
|
||||||
# Trailer
|
# Trailer
|
||||||
|
|
Loading…
Reference in a new issue