diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-04-11 13:43:15 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-04-11 13:43:15 -0400 |
commit | 194fb50fbd3f00577ce129762c9a8f13c721e4ad (patch) | |
tree | fa464892deda45dae86ff3c847cc7ae9aea0db22 /dev/tsunami_pchip.cc | |
parent | da7990ab337699ae788809ddaea5ba5c363e0015 (diff) | |
parent | f6fc18f03d639098b1421fa3412329773b0a6ab1 (diff) | |
download | gem5-194fb50fbd3f00577ce129762c9a8f13c721e4ad.tar.xz |
Merge zizzer:/bk/newmem
into zeep.eecs.umich.edu:/z/saidi/work/m5.newmem
--HG--
extra : convert_revision : ef75b46b9c1c267c84e6bb2b2234d46c4edcda16
Diffstat (limited to 'dev/tsunami_pchip.cc')
-rw-r--r-- | dev/tsunami_pchip.cc | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/dev/tsunami_pchip.cc b/dev/tsunami_pchip.cc index 239d12ee9..2f06cf493 100644 --- a/dev/tsunami_pchip.cc +++ b/dev/tsunami_pchip.cc @@ -34,16 +34,11 @@ #include <string> #include <vector> -#include "arch/alpha/ev5.hh" #include "base/trace.hh" #include "dev/tsunami_pchip.hh" #include "dev/tsunamireg.h" #include "dev/tsunami.hh" -#include "mem/bus/bus.hh" -#include "mem/bus/pio_interface.hh" -#include "mem/bus/pio_interface_impl.hh" -#include "mem/functional/memory_control.hh" -#include "mem/functional/physical.hh" +#include "mem/packet.hh" #include "sim/builder.hh" #include "sim/system.hh" @@ -52,7 +47,7 @@ using namespace std; using namespace TheISA; TsunamiPChip::TsunamiPChip(Params *p) -: BasicPioDevice(p), +: BasicPioDevice(p) { pioSize = 0xfff; @@ -122,7 +117,7 @@ TsunamiPChip::read(Packet &pkt) case TSDEV_PC_TBA2: *data64 = tba[2]; break; - case Tbreak; + case TSDEV_PC_TBA3: *data64 = tba[3]; break; case TSDEV_PC_PCTL: @@ -157,7 +152,7 @@ TsunamiPChip::read(Packet &pkt) } -Fault +Tick TsunamiPChip::write(Packet &pkt) { pkt.time = curTick + pioDelay; @@ -166,7 +161,7 @@ TsunamiPChip::write(Packet &pkt) assert(pkt.addr >= pioAddr && pkt.addr < pioAddr + pioSize); Addr daddr = pkt.addr - pioAddr; - uint64_t val = *(uint64_t *)pkt.data; + uint64_t data64 = *(uint64_t *)pkt.data; assert(pkt.size == sizeof(uint64_t)); DPRINTF(Tsunami, "write - va=%#x size=%d \n", pkt.addr, pkt.size); @@ -295,7 +290,7 @@ TsunamiPChip::translatePciToDma(Addr busAddr) baMask = (wsm[i] & (ULL(0xfff) << 20)) | (ULL(0x7f) << 13); pteAddr = (tba[i] & tbaMask) | ((busAddr & baMask) >> 10); - pioPort->readBlob(&pteEntry, pteAddr, sizeof(uint64_t)); + pioPort->readBlob(pteAddr, (uint8_t*)&pteEntry, sizeof(uint64_t)); dmaAddr = ((pteEntry & ~ULL(0x1)) << 12) | (busAddr & ULL(0x1fff)); @@ -332,11 +327,6 @@ TsunamiPChip::unserialize(Checkpoint *cp, const std::string §ion) UNSERIALIZE_ARRAY(tba, 4); } -Tick -TsunamiPChip::cacheAccess(MemReqPtr &req) -{ - return curTick + pioLatency; -} BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiPChip) |