diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-30 22:30:42 -0400 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-30 22:30:42 -0400 |
commit | 91e3aa629550fcdaa03173f94674a74ac906ae4c (patch) | |
tree | 74be65e6ad56201467cae3f278ebf83eff3b8785 /src/cpu/simple/base.cc | |
parent | 0e5db091e91d576bd5b05d22103115496084bd19 (diff) | |
download | gem5-91e3aa629550fcdaa03173f94674a74ac906ae4c.tar.xz |
Minor further cleanup & commenting of Packet class.
src/cpu/simple/atomic.cc:
Make common ifetch setup based on Request rather than Packet.
Packet::reset() no longer a separate function.
sendAtomic() returns latency, not absolute tick.
src/cpu/simple/atomic.hh:
sendAtomic returns latency, not absolute tick.
src/cpu/simple/base.cc:
src/cpu/simple/base.hh:
src/cpu/simple/timing.cc:
Make common ifetch setup based on Request rather than Packet.
src/dev/alpha_console.cc:
src/dev/ide_ctrl.cc:
src/dev/io_device.cc:
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/physical.cc:
Get rid of redundant Packet time field.
src/mem/packet.cc:
Eliminate reset() method.
src/mem/packet.hh:
Fold reset() function into reinitFromRequest()... it was
only ever called together with that function.
Get rid of redundant time field.
Cleanup/add comments.
src/mem/port.hh:
Document in comment that sendAtomic returns latency, not absolute tick.
--HG--
extra : convert_revision : 0252f1a294043ca3ed58f437232ad24fc0733e0c
Diffstat (limited to 'src/cpu/simple/base.cc')
-rw-r--r-- | src/cpu/simple/base.cc | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc index 18f170449..2e9b4b81f 100644 --- a/src/cpu/simple/base.cc +++ b/src/cpu/simple/base.cc @@ -351,29 +351,21 @@ BaseSimpleCPU::checkForInterrupts() Fault -BaseSimpleCPU::setupFetchPacket(Packet *ifetch_pkt) +BaseSimpleCPU::setupFetchRequest(Request *req) { - // Try to fetch an instruction - // set up memory request for instruction fetch - DPRINTF(Fetch,"Fetch: PC:%08p NPC:%08p NNPC:%08p\n",cpuXC->readPC(), cpuXC->readNextPC(),cpuXC->readNextNPC()); - Request *ifetch_req = ifetch_pkt->req; - ifetch_req->setVaddr(cpuXC->readPC() & ~3); - ifetch_req->setTime(curTick); + req->setVaddr(cpuXC->readPC() & ~3); + req->setTime(curTick); #if FULL_SYSTEM - ifetch_req->setFlags((cpuXC->readPC() & 1) ? PHYSICAL : 0); + req->setFlags((cpuXC->readPC() & 1) ? PHYSICAL : 0); #else - ifetch_req->setFlags(0); + req->setFlags(0); #endif - Fault fault = cpuXC->translateInstReq(ifetch_req); - - if (fault == NoFault) { - ifetch_pkt->reinitFromRequest(); - } + Fault fault = cpuXC->translateInstReq(req); return fault; } |