diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-26 14:17:33 -0400 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-26 14:17:33 -0400 |
commit | e533fad711fce66bf2e4a6669baeb8eaf02799e1 (patch) | |
tree | 0fdb6011df3204031dd1dec784649aa3cdac5613 /src/dev/tsunami_pchip.cc | |
parent | da6a7b1263cf624790f06a5f944366fb113dffc8 (diff) | |
download | gem5-e533fad711fce66bf2e4a6669baeb8eaf02799e1.tar.xz |
Significant rework of Packet class interface:
- new constructor guarantees initialization of most fields
- flags track status of non-guaranteed fields (addr, size, src)
- accessor functions (getAddr() etc.) check status on access
- Command & Result classes are nested in Packet class scope
- Command now built from vector of behavior bits
- string version of Command for tracing
- reinitFromRequest() and makeTimingResponse() encapsulate
common manipulations of existing packets
src/cpu/simple/atomic.cc:
src/cpu/simple/base.cc:
src/cpu/simple/timing.cc:
src/dev/alpha_console.cc:
src/dev/ide_ctrl.cc:
src/dev/io_device.cc:
src/dev/io_device.hh:
src/dev/isa_fake.cc:
src/dev/ns_gige.cc:
src/dev/pciconfigall.cc:
src/dev/sinic.cc:
src/dev/tsunami_cchip.cc:
src/dev/tsunami_io.cc:
src/dev/tsunami_pchip.cc:
src/dev/uart8250.cc:
src/mem/bus.cc:
src/mem/bus.hh:
src/mem/physical.cc:
src/mem/port.cc:
src/mem/port.hh:
src/mem/request.hh:
Update for new Packet interface.
--HG--
extra : convert_revision : 9973d09ea4fa61795f23772a7d3995fa4df5c269
Diffstat (limited to 'src/dev/tsunami_pchip.cc')
-rw-r--r-- | src/dev/tsunami_pchip.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/dev/tsunami_pchip.cc b/src/dev/tsunami_pchip.cc index 999278e37..c430ca0a0 100644 --- a/src/dev/tsunami_pchip.cc +++ b/src/dev/tsunami_pchip.cc @@ -67,17 +67,17 @@ TsunamiPChip::TsunamiPChip(Params *p) Tick TsunamiPChip::read(Packet *pkt) { - assert(pkt->result == Unknown); - assert(pkt->addr >= pioAddr && pkt->addr < pioAddr + pioSize); + assert(pkt->result == Packet::Unknown); + assert(pkt->getAddr() >= pioAddr && pkt->getAddr() < pioAddr + pioSize); pkt->time += pioDelay; pkt->allocate(); - Addr daddr = (pkt->addr - pioAddr) >> 6;; - assert(pkt->size == sizeof(uint64_t)); + Addr daddr = (pkt->getAddr() - pioAddr) >> 6;; + assert(pkt->getSize() == sizeof(uint64_t)); - DPRINTF(Tsunami, "read va=%#x size=%d\n", pkt->addr, pkt->size); + DPRINTF(Tsunami, "read va=%#x size=%d\n", pkt->getAddr(), pkt->getSize()); switch(daddr) { case TSDEV_PC_WSBA0: @@ -143,7 +143,7 @@ TsunamiPChip::read(Packet *pkt) default: panic("Default in PChip Read reached reading 0x%x\n", daddr); } - pkt->result = Success; + pkt->result = Packet::Success; return pioDelay; } @@ -153,13 +153,13 @@ TsunamiPChip::write(Packet *pkt) { pkt->time += pioDelay; - assert(pkt->result == Unknown); - assert(pkt->addr >= pioAddr && pkt->addr < pioAddr + pioSize); - Addr daddr = (pkt->addr - pioAddr) >> 6; + assert(pkt->result == Packet::Unknown); + assert(pkt->getAddr() >= pioAddr && pkt->getAddr() < pioAddr + pioSize); + Addr daddr = (pkt->getAddr() - pioAddr) >> 6; - assert(pkt->size == sizeof(uint64_t)); + assert(pkt->getSize() == sizeof(uint64_t)); - DPRINTF(Tsunami, "write - va=%#x size=%d \n", pkt->addr, pkt->size); + DPRINTF(Tsunami, "write - va=%#x size=%d \n", pkt->getAddr(), pkt->getSize()); switch(daddr) { case TSDEV_PC_WSBA0: @@ -224,7 +224,7 @@ TsunamiPChip::write(Packet *pkt) } // uint64_t - pkt->result = Success; + pkt->result = Packet::Success; return pioDelay; } |