summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-09-18 13:27:47 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-09-18 13:27:47 -0500
commit96c999fe88a5f600a1a5ddf8c15eadba3051508b (patch)
treeb1fb5220ffcd3b0688d53cb7f41a6c016eadc0fa /src/mem/ruby/slicc_interface
parent216529bf182f58830cfccad090f348e1b8730675 (diff)
downloadgem5-96c999fe88a5f600a1a5ddf8c15eadba3051508b.tar.xz
ruby: print addresses in hex
Changeset 4872dbdea907 replaced Address by Addr, but did not make changes to print statements. So the addresses which were being printed in hex earlier along with their line address, were now being printed in decimals. This patch adds a function printAddress(Addr) that can be used to print the address in hex along with the lines address. This function has been put to use in some of the places. At other places, change has been made to print just the address in hex.
Diffstat (limited to 'src/mem/ruby/slicc_interface')
-rw-r--r--src/mem/ruby/slicc_interface/AbstractCacheEntry.cc6
-rw-r--r--src/mem/ruby/slicc_interface/AbstractController.cc2
-rw-r--r--src/mem/ruby/slicc_interface/RubyRequest.cc6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractCacheEntry.cc b/src/mem/ruby/slicc_interface/AbstractCacheEntry.cc
index 416aea73b..00dfc6c64 100644
--- a/src/mem/ruby/slicc_interface/AbstractCacheEntry.cc
+++ b/src/mem/ruby/slicc_interface/AbstractCacheEntry.cc
@@ -55,21 +55,21 @@ AbstractCacheEntry::changePermission(AccessPermission new_perm)
void
AbstractCacheEntry::setLocked(int context)
{
- DPRINTF(RubyCache, "Setting Lock for addr: %x to %d\n", m_Address, context);
+ DPRINTF(RubyCache, "Setting Lock for addr: %#x to %d\n", m_Address, context);
m_locked = context;
}
void
AbstractCacheEntry::clearLocked()
{
- DPRINTF(RubyCache, "Clear Lock for addr: %x\n", m_Address);
+ DPRINTF(RubyCache, "Clear Lock for addr: %#x\n", m_Address);
m_locked = -1;
}
bool
AbstractCacheEntry::isLocked(int context) const
{
- DPRINTF(RubyCache, "Testing Lock for addr: %llx cur %d con %d\n",
+ DPRINTF(RubyCache, "Testing Lock for addr: %#llx cur %d con %d\n",
m_Address, m_locked, context);
return m_locked == context;
}
diff --git a/src/mem/ruby/slicc_interface/AbstractController.cc b/src/mem/ruby/slicc_interface/AbstractController.cc
index be6438711..370781780 100644
--- a/src/mem/ruby/slicc_interface/AbstractController.cc
+++ b/src/mem/ruby/slicc_interface/AbstractController.cc
@@ -97,7 +97,7 @@ AbstractController::stallBuffer(MessageBuffer* buf, Addr addr)
msgVec->resize(m_in_ports, NULL);
m_waiting_buffers[addr] = msgVec;
}
- DPRINTF(RubyQueue, "stalling %s port %d addr %s\n", buf, m_cur_in_port,
+ DPRINTF(RubyQueue, "stalling %s port %d addr %#x\n", buf, m_cur_in_port,
addr);
assert(m_in_ports > m_cur_in_port);
(*(m_waiting_buffers[addr]))[m_cur_in_port] = buf;
diff --git a/src/mem/ruby/slicc_interface/RubyRequest.cc b/src/mem/ruby/slicc_interface/RubyRequest.cc
index 350508671..c4c5b2faf 100644
--- a/src/mem/ruby/slicc_interface/RubyRequest.cc
+++ b/src/mem/ruby/slicc_interface/RubyRequest.cc
@@ -36,10 +36,10 @@ void
RubyRequest::print(ostream& out) const
{
out << "[RubyRequest: ";
- out << "LineAddress = " << m_LineAddress << " ";
- out << "PhysicalAddress = " << m_PhysicalAddress << " ";
+ out << hex << "LineAddress = 0x" << m_LineAddress << dec << " ";
+ out << hex << "PhysicalAddress = 0x" << m_PhysicalAddress << dec << " ";
out << "Type = " << m_Type << " ";
- out << "ProgramCounter = " << m_ProgramCounter << " ";
+ out << hex << "ProgramCounter = 0x" << m_ProgramCounter << dec << " ";
out << "AccessMode = " << m_AccessMode << " ";
out << "Size = " << m_Size << " ";
out << "Prefetch = " << m_Prefetch << " ";