summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-12-27 14:38:22 -0500
committerAli Saidi <saidi@eecs.umich.edu>2006-12-27 14:38:22 -0500
commitb48a8fb34706972c7474f2390029ec9f5b8c94f3 (patch)
tree42dbdef8c3fb07333d0c39284c60ff2b54b7c022 /src/mem
parent9e90bfafb5b464dacc983c1c513f264d538bd9fd (diff)
parentba14d6d0e1debea686681e5738bcdb041522dca0 (diff)
downloadgem5-b48a8fb34706972c7474f2390029ec9f5b8c94f3.tar.xz
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem --HG-- extra : convert_revision : afd4266bd494bb8f127c06985f343219ded4f637
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/physical.cc51
1 files changed, 47 insertions, 4 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index 6610e547d..7d616a4e5 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -42,6 +42,7 @@
#include "arch/isa_traits.hh"
#include "base/misc.hh"
#include "config/full_system.hh"
+#include "mem/packet_access.hh"
#include "mem/physical.hh"
#include "sim/builder.hh"
#include "sim/eventq.hh"
@@ -203,18 +204,60 @@ PhysicalMemory::doFunctionalAccess(PacketPtr pkt)
if (pkt->req->isLocked()) {
trackLoadLocked(pkt->req);
}
- DPRINTF(MemoryAccess, "Performing Read of size %i on address 0x%x\n",
- pkt->getSize(), pkt->getAddr());
memcpy(pkt->getPtr<uint8_t>(),
pmemAddr + pkt->getAddr() - params()->addrRange.start,
pkt->getSize());
+#if TRACING_ON
+ switch (pkt->getSize()) {
+ case sizeof(uint64_t):
+ DPRINTF(MemoryAccess, "Read of size %i on address 0x%x data 0x%x\n",
+ pkt->getSize(), pkt->getAddr(),pkt->get<uint64_t>());
+ break;
+ case sizeof(uint32_t):
+ DPRINTF(MemoryAccess, "Read of size %i on address 0x%x data 0x%x\n",
+ pkt->getSize(), pkt->getAddr(),pkt->get<uint32_t>());
+ break;
+ case sizeof(uint16_t):
+ DPRINTF(MemoryAccess, "Read of size %i on address 0x%x data 0x%x\n",
+ pkt->getSize(), pkt->getAddr(),pkt->get<uint16_t>());
+ break;
+ case sizeof(uint8_t):
+ DPRINTF(MemoryAccess, "Read of size %i on address 0x%x data 0x%x\n",
+ pkt->getSize(), pkt->getAddr(),pkt->get<uint8_t>());
+ break;
+ default:
+ DPRINTF(MemoryAccess, "Read of size %i on address 0x%x\n",
+ pkt->getSize(), pkt->getAddr());
+ }
+#endif
}
else if (pkt->isWrite()) {
if (writeOK(pkt->req)) {
- DPRINTF(MemoryAccess, "Performing Write of size %i on address 0x%x\n",
- pkt->getSize(), pkt->getAddr());
memcpy(pmemAddr + pkt->getAddr() - params()->addrRange.start,
pkt->getPtr<uint8_t>(), pkt->getSize());
+#if TRACING_ON
+ switch (pkt->getSize()) {
+ case sizeof(uint64_t):
+ DPRINTF(MemoryAccess, "Write of size %i on address 0x%x data 0x%x\n",
+ pkt->getSize(), pkt->getAddr(),pkt->get<uint64_t>());
+ break;
+ case sizeof(uint32_t):
+ DPRINTF(MemoryAccess, "Write of size %i on address 0x%x data 0x%x\n",
+ pkt->getSize(), pkt->getAddr(),pkt->get<uint32_t>());
+ break;
+ case sizeof(uint16_t):
+ DPRINTF(MemoryAccess, "Write of size %i on address 0x%x data 0x%x\n",
+ pkt->getSize(), pkt->getAddr(),pkt->get<uint16_t>());
+ break;
+ case sizeof(uint8_t):
+ DPRINTF(MemoryAccess, "Write of size %i on address 0x%x data 0x%x\n",
+ pkt->getSize(), pkt->getAddr(),pkt->get<uint8_t>());
+ break;
+ default:
+ DPRINTF(MemoryAccess, "Write of size %i on address 0x%x\n",
+ pkt->getSize(), pkt->getAddr());
+ }
+#endif
}
}
else if (pkt->isInvalidate()) {